blob: 0ac4eab33b7a34b4040e34f36d80c373a90d1d01 [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/renderer/pipeline_library.h"
namespace impeller {
class ContextMTL;
class PipelineLibraryMTL final : public PipelineLibrary {
public:
PipelineLibraryMTL();
// |PipelineLibrary|
~PipelineLibraryMTL() override;
private:
friend ContextMTL;
id<MTLDevice> device_ = nullptr;
PipelineMap pipelines_;
PipelineLibraryMTL(id<MTLDevice> device);
// |PipelineLibrary|
bool IsValid() const override;
// |PipelineLibrary|
PipelineFuture GetRenderPipeline(PipelineDescriptor descriptor) override;
FML_DISALLOW_COPY_AND_ASSIGN(PipelineLibraryMTL);
};
} // namespace impeller