blob: c47eaf6799fd3b1c7cf155e167893e3517416df5 [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/shader_function.h"
namespace impeller {
class ShaderFunctionMTL final
: public ShaderFunction,
public BackendCast<ShaderFunctionMTL, ShaderFunction> {
public:
// |ShaderFunction|
~ShaderFunctionMTL() override;
id<MTLFunction> GetMTLFunction() const;
private:
friend class ShaderLibraryMTL;
id<MTLFunction> function_ = nullptr;
ShaderFunctionMTL(UniqueID parent_library_id,
id<MTLFunction> function,
std::string name,
ShaderStage stage);
ShaderFunctionMTL(const ShaderFunctionMTL&) = delete;
ShaderFunctionMTL& operator=(const ShaderFunctionMTL&) = delete;
};
} // namespace impeller