#include <TextureProxy.h>
|
static bool | InstantiateIfNotLazy (ResourceProvider *, TextureProxy *) |
|
static sk_sp< TextureProxy > | Make (const Caps *, ResourceProvider *, SkISize dimensions, const TextureInfo &, 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 27 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 119 of file TextureProxy.cpp.
119 {
121
122 fTexture.reset();
123}
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 80 of file TextureProxy.cpp.
80 {
82
83 if (fTexture) {
84 return true;
85 }
86
87 fTexture = resourceProvider->findOrCreateScratchTexture(fDimensions, fInfo, fBudgeted);
88 if (!fTexture) {
89 return false;
90 }
92 return true;
93}
◆ InstantiateIfNotLazy()
Definition at line 110 of file TextureProxy.cpp.
111 {
112 if (textureProxy->isLazy()) {
113 return true;
114 }
115
116 return textureProxy->instantiate(resourceProvider);
117}
◆ isFullyLazy()
bool skgpu::graphite::TextureProxy::isFullyLazy |
( |
| ) |
const |
Definition at line 59 of file TextureProxy.cpp.
59 {
64}
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 |
◆ lazyInstantiate()
bool skgpu::graphite::TextureProxy::lazyInstantiate |
( |
ResourceProvider * |
resourceProvider | ) |
|
Definition at line 95 of file TextureProxy.cpp.
95 {
97
98 if (fTexture) {
99 return true;
100 }
101
102 fTexture = fLazyInstantiateCallback(resourceProvider);
103 if (!fTexture) {
104 return false;
105 }
106 SkDEBUGCODE(this->validateTexture(fTexture.get()));
107 return true;
108}
◆ Make()
Definition at line 133 of file TextureProxy.cpp.
137 {
142 return nullptr;
143 }
144
147
148
149 if (!proxy->instantiate(resourceProvider)) {
150 return nullptr;
151 }
152 }
153 return proxy;
154}
SkISize dimensions() const
const TextureInfo & textureInfo() const
◆ MakeFullyLazy()
Definition at line 173 of file TextureProxy.cpp.
176 {
178
181}
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
static constexpr SkISize Make(int32_t w, int32_t h)
◆ MakeLazy()
◆ 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 76 of file TextureProxy.cpp.
76 {
78}
size_t ComputeSize(SkISize dimensions, const TextureInfo &info)
◆ Wrap()
The documentation for this class was generated from the following files: