Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
ganesh
GrTextureRenderTargetProxy.h
Go to the documentation of this file.
1
/*
2
* Copyright 2016 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
#ifndef GrTextureRenderTargetProxy_DEFINED
8
#define GrTextureRenderTargetProxy_DEFINED
9
10
#include "
include/core/SkRefCnt.h
"
11
#include "
include/gpu/GrTypes.h
"
12
#include "
include/private/base/SkDebug.h
"
13
#include "
src/gpu/ganesh/GrCaps.h
"
14
#include "
src/gpu/ganesh/GrRenderTargetProxy.h
"
15
#include "
src/gpu/ganesh/GrTextureProxy.h
"
16
17
#include <cstddef>
18
#include <string_view>
19
20
class
GrBackendFormat
;
21
class
GrResourceProvider
;
22
class
GrSurface
;
23
enum class
GrDDLProvider
: bool;
24
enum class
GrInternalSurfaceFlags
;
25
enum class
GrMipmapStatus
;
26
enum class
SkBackingFit
;
27
struct
SkISize
;
28
29
namespace
skgpu
{
30
enum class
Budgeted
: bool;
31
enum class
Mipmapped
: bool;
32
}
// namespace skgpu
33
34
#ifdef SK_BUILD_FOR_WIN
35
// Windows gives warnings about inheriting asTextureProxy/asRenderTargetProxy via dominance.
36
#pragma warning(push)
37
#pragma warning(disable: 4250)
38
#endif
39
40
// This class delays the acquisition of RenderTargets that are also textures until
41
// they are actually required
42
// Beware: the uniqueID of the TextureRenderTargetProxy will usually be different than
43
// the uniqueID of the RenderTarget/Texture it represents!
44
class
GrTextureRenderTargetProxy
:
public
GrRenderTargetProxy
,
public
GrTextureProxy
{
45
private
:
46
// DDL TODO: rm the GrSurfaceProxy friending
47
friend
class
GrSurfaceProxy
;
// for ctors
48
friend
class
GrProxyProvider
;
// for ctors
49
50
// Deferred version
51
GrTextureRenderTargetProxy
(
const
GrCaps
&,
52
const
GrBackendFormat
&,
53
SkISize
,
54
int
sampleCnt,
55
skgpu::Mipmapped
,
56
GrMipmapStatus
,
57
SkBackingFit
,
58
skgpu::Budgeted
,
59
GrProtected
,
60
GrInternalSurfaceFlags
,
61
UseAllocator
,
62
GrDDLProvider
creatingProvider,
63
std::string_view label);
64
65
// Lazy-callback version
66
GrTextureRenderTargetProxy
(
const
GrCaps
&,
67
LazyInstantiateCallback
&&,
68
const
GrBackendFormat
&,
69
SkISize
,
70
int
sampleCnt,
71
skgpu::Mipmapped
,
72
GrMipmapStatus
,
73
SkBackingFit
,
74
skgpu::Budgeted
,
75
GrProtected
,
76
GrInternalSurfaceFlags
,
77
UseAllocator
,
78
GrDDLProvider
creatingProvider,
79
std::string_view label);
80
81
// Wrapped version
82
GrTextureRenderTargetProxy
(
sk_sp<GrSurface>
,
83
UseAllocator
,
84
GrDDLProvider
creatingProvider);
85
86
void
initSurfaceFlags(
const
GrCaps
&);
87
88
bool
instantiate(
GrResourceProvider
*)
override
;
89
sk_sp<GrSurface>
createSurface(
GrResourceProvider
*)
const override
;
90
91
size_t
onUninstantiatedGpuMemorySize()
const override
;
92
LazySurfaceDesc
callbackDesc()
const override
;
93
SkDEBUGCODE
(
void
onValidateSurface(
const
GrSurface
*)
override
;)
94
};
95
96
#ifdef SK_BUILD_FOR_WIN
97
#pragma warning(pop)
98
#endif
99
100
#endif
GrCaps.h
GrRenderTargetProxy.h
GrTextureProxy.h
GrDDLProvider
GrDDLProvider
Definition:
GrTypesPriv.h:71
GrMipmapStatus
GrMipmapStatus
Definition:
GrTypesPriv.h:523
GrInternalSurfaceFlags
GrInternalSurfaceFlags
Definition:
GrTypesPriv.h:436
GrTypes.h
SkBackingFit
SkBackingFit
Definition:
SkBackingFit.h:16
SkDebug.h
SkRefCnt.h
SkDEBUGCODE
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
GrBackendFormat
Definition:
GrBackendSurface.h:44
GrCaps
Definition:
GrCaps.h:57
GrProxyProvider
Definition:
GrProxyProvider.h:28
GrRenderTargetProxy
Definition:
GrRenderTargetProxy.h:64
GrResourceProvider
Definition:
GrResourceProvider.h:59
GrSurfaceProxy
Definition:
GrSurfaceProxy.h:49
GrSurfaceProxy::UseAllocator
UseAllocator
Definition:
GrSurfaceProxy.h:124
GrSurfaceProxy::LazyInstantiateCallback
std::function< LazyCallbackResult(GrResourceProvider *, const LazySurfaceDesc &)> LazyInstantiateCallback
Definition:
GrSurfaceProxy.h:122
GrSurface
Definition:
GrSurface.h:22
GrTextureProxy
Definition:
GrTextureProxy.h:34
GrTextureRenderTargetProxy
Definition:
GrTextureRenderTargetProxy.h:44
sk_sp< GrSurface >
skgpu
Definition:
GpuTools.h:21
skgpu::Budgeted
Budgeted
Definition:
GpuTypes.h:35
skgpu::Mipmapped
Mipmapped
Definition:
GpuTypes.h:53
skgpu::Protected
Protected
Definition:
GpuTypes.h:61
GrSurfaceProxy::LazySurfaceDesc
Definition:
GrSurfaceProxy.h:87
SkISize
Definition:
SkSize.h:16
Generated on Sun Jun 23 2024 21:56:21 for Flutter Engine by
1.9.4