#include <TextureProxy.h>
|
static bool | InstantiateIfNotLazy (ResourceProvider *, TextureProxy *) |
|
static bool | InstantiateIfNotLazy (ScratchResourceManager *, TextureProxy *) |
|
static sk_sp< TextureProxy > | Make (const Caps *, ResourceProvider *, SkISize dimensions, const TextureInfo &, std::string_view label, skgpu::Budgeted) |
|
static sk_sp< TextureProxy > | MakeLazy (const Caps *, SkISize dimensions, const TextureInfo &, skgpu::Budgeted, Volatile, LazyInstantiateCallback &&) |
|
static sk_sp< TextureProxy > | MakeFullyLazy (const TextureInfo &, skgpu::Budgeted, Volatile, LazyInstantiateCallback &&) |
|
static sk_sp< TextureProxy > | Wrap (sk_sp< Texture >) |
|
Definition at line 28 of file TextureProxy.h.
◆ LazyInstantiateCallback
◆ TextureProxy()
skgpu::graphite::TextureProxy::TextureProxy |
( |
| ) |
|
|
delete |
◆ ~TextureProxy()
skgpu::graphite::TextureProxy::~TextureProxy |
( |
| ) |
|
|
override |
◆ deinstantiate()
void skgpu::graphite::TextureProxy::deinstantiate |
( |
| ) |
|
Definition at line 145 of file TextureProxy.cpp.
145 {
147
148 fTexture.reset();
149}
static constexpr bool SkToBool(const T &x)
◆ dimensions()
SkISize skgpu::graphite::TextureProxy::dimensions |
( |
| ) |
const |
◆ instantiate()
bool skgpu::graphite::TextureProxy::instantiate |
( |
ResourceProvider * |
resourceProvider | ) |
|
Definition at line 89 of file TextureProxy.cpp.
89 {
91
92 if (fTexture) {
93 return true;
94 }
95
96 fTexture = resourceProvider->findOrCreateScratchTexture(fDimensions, fInfo, fLabel, fBudgeted);
97 if (!fTexture) {
98 return false;
99 }
100 SkDEBUGCODE(this->validateTexture(fTexture.get()));
101 return true;
102}
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
◆ InstantiateIfNotLazy() [1/2]
Definition at line 119 of file TextureProxy.cpp.
120 {
121 if (textureProxy->isLazy()) {
122 return true;
123 }
124
125 return textureProxy->instantiate(resourceProvider);
126}
◆ InstantiateIfNotLazy() [2/2]
Definition at line 128 of file TextureProxy.cpp.
129 {
130 if (textureProxy->isLazy() || textureProxy->isInstantiated()) {
131 return true;
132 }
133
134 textureProxy->fTexture = scratchManager->getScratchTexture(textureProxy->dimensions(),
135 textureProxy->textureInfo(),
136 textureProxy->fLabel);
137 if (!textureProxy->fTexture) {
138 return false;
139 }
140 SkDEBUGCODE(textureProxy->validateTexture(textureProxy->fTexture.get()));
141 return true;
142}
◆ isFullyLazy()
bool skgpu::graphite::TextureProxy::isFullyLazy |
( |
| ) |
const |
Definition at line 68 of file TextureProxy.cpp.
68 {
73}
constexpr int32_t width() const
constexpr int32_t height() const
◆ isInstantiated()
bool skgpu::graphite::TextureProxy::isInstantiated |
( |
| ) |
const |
|
inline |
◆ isLazy()
bool skgpu::graphite::TextureProxy::isLazy |
( |
| ) |
const |
◆ isProtected()
bool skgpu::graphite::TextureProxy::isProtected |
( |
| ) |
const |
◆ isVolatile()
bool skgpu::graphite::TextureProxy::isVolatile |
( |
| ) |
const |
◆ label()
const char * skgpu::graphite::TextureProxy::label |
( |
| ) |
const |
|
inline |
◆ lazyInstantiate()
bool skgpu::graphite::TextureProxy::lazyInstantiate |
( |
ResourceProvider * |
resourceProvider | ) |
|
Definition at line 104 of file TextureProxy.cpp.
104 {
106
107 if (fTexture) {
108 return true;
109 }
110
111 fTexture = fLazyInstantiateCallback(resourceProvider);
112 if (!fTexture) {
113 return false;
114 }
115 SkDEBUGCODE(this->validateTexture(fTexture.get()));
116 return true;
117}
◆ Make()
Definition at line 159 of file TextureProxy.cpp.
164 {
169 return nullptr;
170 }
171
175 budgeted)};
177
178
179 if (!proxy->instantiate(resourceProvider)) {
180 return nullptr;
181 }
182 }
183 return proxy;
184}
SkISize dimensions() const
const char * label() const
const TextureInfo & textureInfo() const
◆ MakeFullyLazy()
Definition at line 206 of file TextureProxy.cpp.
209 {
211
214 budgeted,
217}
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
static constexpr SkISize Make(int32_t w, int32_t h)
◆ MakeLazy()
Definition at line 186 of file TextureProxy.cpp.
191 {
196 return nullptr;
197 }
198
201 budgeted,
204}
◆ mipmapped()
Mipmapped skgpu::graphite::TextureProxy::mipmapped |
( |
| ) |
const |
|
inline |
◆ numSamples()
int skgpu::graphite::TextureProxy::numSamples |
( |
| ) |
const |
|
inline |
◆ refTexture()
sk_sp< Texture > skgpu::graphite::TextureProxy::refTexture |
( |
| ) |
const |
◆ texture() [1/2]
Texture * skgpu::graphite::TextureProxy::texture |
( |
| ) |
|
|
inline |
◆ texture() [2/2]
const Texture * skgpu::graphite::TextureProxy::texture |
( |
| ) |
const |
◆ textureInfo()
const TextureInfo & skgpu::graphite::TextureProxy::textureInfo |
( |
| ) |
const |
|
inline |
◆ uninstantiatedGpuMemorySize()
size_t skgpu::graphite::TextureProxy::uninstantiatedGpuMemorySize |
( |
| ) |
const |
Definition at line 85 of file TextureProxy.cpp.
85 {
87}
size_t ComputeSize(SkISize dimensions, const TextureInfo &info)
◆ Wrap()
The documentation for this class was generated from the following files: