Flutter Engine
The Flutter Engine
GrGLTextureRenderTarget.h
Go to the documentation of this file.
1/*
2 * Copyright 2014 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
9#ifndef GrGLTextureRenderTarget_DEFINED
10#define GrGLTextureRenderTarget_DEFINED
11
14
15class GrGLGpu;
16
17#ifdef SK_BUILD_FOR_WIN
18// Windows gives bogus warnings about inheriting asTexture/asRenderTarget via dominance.
19#pragma warning(push)
20#pragma warning(disable: 4250)
21#endif
22
24public:
25 // We're virtually derived from GrSurface (via both GrGLTexture and GrGLRenderTarget) so its
26 // constructor must be explicitly called.
28 skgpu::Budgeted budgeted,
29 int sampleCount,
30 const GrGLTexture::Desc& texDesc,
33 std::string_view label);
34
35 bool canAttemptStencilAttachment(bool useMultisampleFBO) const override;
36
37 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const override;
38
40 int sampleCount,
41 const GrGLTexture::Desc&,
46 std::string_view label);
47
48 GrBackendFormat backendFormat() const override {
49 // It doesn't matter if we take the texture or render target path, so just pick texture.
51 }
52
53protected:
54 void onAbandon() override {
57 }
58
59 void onRelease() override {
62 }
63
64private:
65 // Constructor for instances wrapping backend objects.
67 int sampleCount,
68 const GrGLTexture::Desc& texDesc,
70 const GrGLRenderTarget::IDs& ids,
73 std::string_view label);
74
75 size_t onGpuMemorySize() const override;
76
77 void onSetLabel() override;
78};
79
80#ifdef SK_BUILD_FOR_WIN
81#pragma warning(pop)
82#endif
83
84#endif
GrWrapCacheable
Definition: GrTypesPriv.h:85
GrMipmapStatus
Definition: GrTypesPriv.h:523
void onAbandon() override
void onRelease() override
static sk_sp< GrGLTextureRenderTarget > MakeWrapped(GrGLGpu *gpu, int sampleCount, const GrGLTexture::Desc &, sk_sp< GrGLTextureParameters >, const GrGLRenderTarget::IDs &, GrWrapCacheable, GrMipmapStatus, std::string_view label)
void dumpMemoryStatistics(SkTraceMemoryDump *traceMemoryDump) const override
GrGLTextureRenderTarget(GrGLGpu *gpu, skgpu::Budgeted budgeted, int sampleCount, const GrGLTexture::Desc &texDesc, const GrGLRenderTarget::IDs &, GrMipmapStatus, std::string_view label)
bool canAttemptStencilAttachment(bool useMultisampleFBO) const override
GrBackendFormat backendFormat() const override
GrBackendFormat backendFormat() const override
GrGLTextureParameters * parameters()
Definition: GrGLTexture.h:44
void onRelease() override
void onAbandon() override
Budgeted
Definition: GpuTypes.h:35