/* * Copyright 2021 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GrMtlFramebuffer_DEFINED #define GrMtlFramebuffer_DEFINED #include "include/gpu/GrTypes.h" #include "include/gpu/mtl/GrMtlTypes.h" #include "include/private/GrTypesPriv.h" class GrMtlAttachment; class GrMtlFramebuffer : public SkRefCnt { public: static sk_sp Make(GrMtlAttachment* colorAttachment, GrMtlAttachment* resolveAttachment, GrMtlAttachment* stencilAttachment); GrMtlAttachment* colorAttachment() { return fColorAttachment.get(); } GrMtlAttachment* resolveAttachment() { return fResolveAttachment.get(); } GrMtlAttachment* stencilAttachment() { return fStencilAttachment.get(); } private: GrMtlFramebuffer(sk_sp colorAttachment, sk_sp resolveAttachment, sk_sp stencilAttachment); ~GrMtlFramebuffer() override {} sk_sp fColorAttachment; sk_sp fResolveAttachment; sk_sp fStencilAttachment; }; #endif