blob: 9c2efa74884f5054c10190355ff579712571ef1c [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include <Metal/Metal.h>
#include "flutter/fml/macros.h"
#include "impeller/base/backend_cast.h"
#include "impeller/renderer/pipeline.h"
namespace impeller {
class ComputePipelineMTL final
: public Pipeline<ComputePipelineDescriptor>,
public BackendCast<ComputePipelineMTL,
Pipeline<ComputePipelineDescriptor>> {
public:
// |Pipeline|
~ComputePipelineMTL() override;
id<MTLComputePipelineState> GetMTLComputePipelineState() const;
private:
friend class PipelineLibraryMTL;
id<MTLComputePipelineState> pipeline_state_;
bool is_valid_ = false;
ComputePipelineMTL(std::weak_ptr<PipelineLibrary> library,
const ComputePipelineDescriptor& desc,
id<MTLComputePipelineState> state);
// |Pipeline|
bool IsValid() const override;
FML_DISALLOW_COPY_AND_ASSIGN(ComputePipelineMTL);
};
} // namespace impeller