Debian Codegraph @

src/gpu/ganesh/mtl/GrMtlFramebuffer.h

raw
1 /*
2 * Copyright 2021 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrMtlFramebuffer_DEFINED
9 #define GrMtlFramebuffer_DEFINED
10
11 #include "include/core/SkRefCnt.h"
12 #include "include/gpu/ganesh/GrTypes.h"
13 #include "include/gpu/ganesh/mtl/GrMtlTypes.h"
14 #include "include/private/gpu/ganesh/GrTypesPriv.h"
15
16 class GrMtlAttachment;
17
18 class GrMtlFramebuffer : public SkRefCnt {
19 public:
20 static sk_sp<const GrMtlFramebuffer> Make(GrMtlAttachment* colorAttachment,
21 GrMtlAttachment* resolveAttachment,
22 GrMtlAttachment* stencilAttachment);
23
24 GrMtlAttachment* colorAttachment() { return fColorAttachment.get(); }
25 GrMtlAttachment* resolveAttachment() { return fResolveAttachment.get(); }
26 GrMtlAttachment* stencilAttachment() { return fStencilAttachment.get(); }
27
28 private:
29 GrMtlFramebuffer(sk_sp<GrMtlAttachment> colorAttachment,
30 sk_sp<GrMtlAttachment> resolveAttachment,
31 sk_sp<GrMtlAttachment> stencilAttachment);
32
33 ~GrMtlFramebuffer() override;
34
35 sk_sp<GrMtlAttachment> fColorAttachment;
36 sk_sp<GrMtlAttachment> fResolveAttachment;
37 sk_sp<GrMtlAttachment> fStencilAttachment;
38 };
39
40 #endif