Updating lazy proxys to support the case where we know a lot more info about the texture.
This is needed for future DDL texture work.
Bug: skia:
Change-Id: I07e0b9c67509e63b9cac00adc355254d03784df8
Reviewed-on: https://skia-review.googlesource.com/91500
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
diff --git a/include/private/GrRenderTargetProxy.h b/include/private/GrRenderTargetProxy.h
index a5f876b..bccb6a8 100644
--- a/include/private/GrRenderTargetProxy.h
+++ b/include/private/GrRenderTargetProxy.h
@@ -68,7 +68,17 @@
SkBackingFit, SkBudgeted, uint32_t flags);
// Lazy-callback version
- GrRenderTargetProxy(LazyInstantiateCallback&&, GrPixelConfig);
+ // There are two main use cases for lazily-instantiated proxies:
+ // basic knowledge - width, height, config, samples, origin are known
+ // minimal knowledge - only config is known.
+ //
+ // The basic knowledge version is used for DDL where we know the type of proxy we are going to
+ // use, but we don't have access to the GPU yet to instantiate it.
+ //
+ // The minimal knowledge version is used for CCPR where we are generating an atlas but we do not
+ // know the final size until flush time.
+ GrRenderTargetProxy(LazyInstantiateCallback&&, const GrSurfaceDesc&, SkBackingFit, SkBudgeted,
+ uint32_t flags);
// Wrapped version
GrRenderTargetProxy(sk_sp<GrSurface>, GrSurfaceOrigin);
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index b5ea486..1a558fe 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -231,25 +231,53 @@
/**
* Creates a texture proxy that will be instantiated by a user-supplied callback during flush.
- * (Mipmapping, MSAA, and stencil are not supported by this method.)
+ * (Stencil is not supported by this method.) The width and height must either both be greater
+ * than 0 or both less than or equal to zero. A non-positive value is a signal that the width
+ * and height are currently unknown.
*/
- static sk_sp<GrTextureProxy> MakeLazy(LazyInstantiateCallback&&, Renderable, GrPixelConfig);
+ static sk_sp<GrTextureProxy> MakeLazy(LazyInstantiateCallback&&, const GrSurfaceDesc& desc,
+ GrMipMapped, SkBackingFit fit, SkBudgeted budgeted);
+
+ static sk_sp<GrTextureProxy> MakeFullyLazy(LazyInstantiateCallback&&, Renderable,
+ GrPixelConfig);
+
+ enum class LazyState {
+ kNot, // The proxy has no lazy callback that must be made.
+ kPartially, // The proxy has a lazy callback but knows basic information about itself.
+ kFully, // The proxy has a lazy callback and also doesn't know its width, height, etc.
+ };
+
+ LazyState lazyInstantiationState() const {
+ if (!SkToBool(fLazyInstantiateCallback)) {
+ return LazyState::kNot;
+ } else {
+ if (fWidth <= 0) {
+ SkASSERT(fHeight <= 0);
+ return LazyState::kFully;
+ } else {
+ SkASSERT(fHeight > 0);
+ return LazyState::kPartially;
+ }
+ }
+ }
GrPixelConfig config() const { return fConfig; }
- int width() const { SkASSERT(!this->isPendingLazyInstantiation()); return fWidth; }
- int height() const { SkASSERT(!this->isPendingLazyInstantiation()); return fHeight; }
+ int width() const {
+ SkASSERT(LazyState::kFully != this->lazyInstantiationState());
+ return fWidth;
+ }
+ int height() const {
+ SkASSERT(LazyState::kFully != this->lazyInstantiationState());
+ return fHeight;
+ }
int worstCaseWidth() const;
int worstCaseHeight() const;
GrSurfaceOrigin origin() const {
- SkASSERT(!this->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kFully != this->lazyInstantiationState());
SkASSERT(kTopLeft_GrSurfaceOrigin == fOrigin || kBottomLeft_GrSurfaceOrigin == fOrigin);
return fOrigin;
}
- // If the client gave us a LazyInstantiateCallback (via MakeLazy), then we will invoke that
- // callback during flush. fWidth, fHeight, and fOrigin will be undefined until that time.
- bool isPendingLazyInstantiation() const { return SkToBool(fLazyInstantiateCallback); }
-
class UniqueID {
public:
static UniqueID InvalidID() {
@@ -310,7 +338,7 @@
* Helper that gets the width and height of the surface as a bounding rectangle.
*/
SkRect getBoundsRect() const {
- SkASSERT(!this->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kFully != this->lazyInstantiationState());
return SkRect::MakeIWH(this->width(), this->height());
}
@@ -345,7 +373,7 @@
* @return the amount of GPU memory used in bytes
*/
size_t gpuMemorySize() const {
- SkASSERT(!this->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kFully != this->lazyInstantiationState());
if (fTarget) {
return fTarget->gpuMemorySize();
}
@@ -382,21 +410,13 @@
protected:
// Deferred version
GrSurfaceProxy(const GrSurfaceDesc& desc, SkBackingFit fit, SkBudgeted budgeted, uint32_t flags)
- : fConfig(desc.fConfig)
- , fWidth(desc.fWidth)
- , fHeight(desc.fHeight)
- , fOrigin(desc.fOrigin)
- , fFit(fit)
- , fBudgeted(budgeted)
- , fFlags(flags)
- , fNeedsClear(SkToBool(desc.fFlags & kPerformInitialClear_GrSurfaceFlag))
- , fGpuMemorySize(kInvalidGpuMemorySize)
- , fLastOpList(nullptr) {
+ : GrSurfaceProxy(nullptr, desc, fit, budgeted, flags) {
// Note: this ctor pulls a new uniqueID from the same pool at the GrGpuResources
}
// Lazy-callback version
- GrSurfaceProxy(LazyInstantiateCallback&& callback, GrPixelConfig config);
+ GrSurfaceProxy(LazyInstantiateCallback&& callback, const GrSurfaceDesc& desc,
+ SkBackingFit fit, SkBudgeted budgeted, uint32_t flags);
// Wrapped version
GrSurfaceProxy(sk_sp<GrSurface> surface, GrSurfaceOrigin origin, SkBackingFit fit);
diff --git a/include/private/GrTextureProxy.h b/include/private/GrTextureProxy.h
index 2e7c002..d4daa8e 100644
--- a/include/private/GrTextureProxy.h
+++ b/include/private/GrTextureProxy.h
@@ -69,14 +69,27 @@
const void* srcData, size_t srcRowBytes, uint32_t flags);
// Lazy-callback version
- GrTextureProxy(LazyInstantiateCallback&&, GrPixelConfig);
+ // There are two main use cases for lazily-instantiated proxies:
+ // basic knowledge - width, height, config, origin are known
+ // minimal knowledge - only config is known.
+ //
+ // The basic knowledge version is used for DDL where we know the type of proxy we are going to
+ // use, but we don't have access to the GPU yet to instantiate it.
+ //
+ // The minimal knowledge version is used for CCPR where we are generating an atlas but we do not
+ // know the final size until flush time.
+ GrTextureProxy(LazyInstantiateCallback&&, const GrSurfaceDesc& desc, GrMipMapped,
+ SkBackingFit fit, SkBudgeted budgeted, uint32_t flags);
// Wrapped version
GrTextureProxy(sk_sp<GrSurface>, GrSurfaceOrigin);
~GrTextureProxy() override;
- SkDestinationSurfaceColorMode mipColorMode() const { return fMipColorMode; }
+ SkDestinationSurfaceColorMode mipColorMode() const {
+ SkASSERT(LazyState::kNot == this->lazyInstantiationState());
+ return fMipColorMode;
+ }
sk_sp<GrSurface> createSurface(GrResourceProvider*) const override;
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 420c43b..7a7e0a3 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -146,7 +146,7 @@
// handle resource allocation & usage on their own. (No deferred or lazy proxies!)
onFlushOpList->visitProxies_debugOnly([](GrSurfaceProxy* p) {
SkASSERT(!p->asTextureProxy() || !p->asTextureProxy()->texPriv().isDeferred());
- SkASSERT(!p->isPendingLazyInstantiation());
+ SkASSERT(GrSurfaceProxy::LazyState::kNot == p->lazyInstantiationState());
});
#endif
onFlushOpList->makeClosed(*fContext->caps());
diff --git a/src/gpu/GrRenderTargetProxy.cpp b/src/gpu/GrRenderTargetProxy.cpp
index dea47e6..d1b77d2 100644
--- a/src/gpu/GrRenderTargetProxy.cpp
+++ b/src/gpu/GrRenderTargetProxy.cpp
@@ -35,11 +35,15 @@
}
// Lazy-callback version
-GrRenderTargetProxy::GrRenderTargetProxy(LazyInstantiateCallback&& callback, GrPixelConfig config)
- : INHERITED(std::move(callback), config)
- , fSampleCnt(0)
+GrRenderTargetProxy::GrRenderTargetProxy(LazyInstantiateCallback&& callback,
+ const GrSurfaceDesc& desc,
+ SkBackingFit fit, SkBudgeted budgeted,
+ uint32_t flags)
+ : INHERITED(std::move(callback), desc, fit, budgeted, flags)
+ , fSampleCnt(desc.fSampleCnt)
, fNeedsStencil(false)
, fRenderTargetFlags(GrRenderTargetFlags::kNone) {
+ SkASSERT(SkToBool(kRenderTarget_GrSurfaceFlag & desc.fFlags));
}
// Wrapped version
diff --git a/src/gpu/GrResourceAllocator.cpp b/src/gpu/GrResourceAllocator.cpp
index 5f40a92..d346a7e 100644
--- a/src/gpu/GrResourceAllocator.cpp
+++ b/src/gpu/GrResourceAllocator.cpp
@@ -81,7 +81,7 @@
#ifdef SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION
// FIXME: remove this once we can do the lazy instantiation from assign instead.
- if (proxy->isPendingLazyInstantiation()) {
+ if (GrSurfaceProxy::LazyState::kNot != proxy->lazyInstantiationState()) {
proxy->priv().doLazyInstantiation(fResourceProvider);
}
#endif
@@ -236,7 +236,7 @@
continue;
}
- if (cur->proxy()->isPendingLazyInstantiation()) {
+ if (GrSurfaceProxy::LazyState::kNot != cur->proxy()->lazyInstantiationState()) {
cur->proxy()->priv().doLazyInstantiation(fResourceProvider);
} else if (sk_sp<GrSurface> surface = this->findSurfaceFor(cur->proxy(), needsStencil)) {
// TODO: make getUniqueKey virtual on GrSurfaceProxy
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 1090d0d..e505a9c 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -21,20 +21,49 @@
#include "SkMathPriv.h"
#include "SkMipMap.h"
+#ifdef SK_DEBUG
+static bool is_valid_fully_lazy(const GrSurfaceDesc& desc, SkBackingFit fit) {
+ return desc.fWidth <= 0 &&
+ desc.fHeight <= 0 &&
+ desc.fConfig != kUnknown_GrPixelConfig &&
+ desc.fSampleCnt == 0 &&
+ SkBackingFit::kApprox == fit;
+}
+
+static bool is_valid_partially_lazy(const GrSurfaceDesc& desc) {
+ return ((desc.fWidth > 0 && desc.fHeight > 0) ||
+ (desc.fWidth <= 0 && desc.fHeight <= 0)) &&
+ desc.fConfig != kUnknown_GrPixelConfig;
+}
+
+static bool is_valid_non_lazy(const GrSurfaceDesc& desc) {
+ return desc.fWidth > 0 &&
+ desc.fHeight > 0 &&
+ desc.fConfig != kUnknown_GrPixelConfig;
+}
+#endif
+
// Lazy-callback version
-GrSurfaceProxy::GrSurfaceProxy(LazyInstantiateCallback&& callback, GrPixelConfig config)
- : fConfig(config)
- , fWidth(-1) // Width, height, and origin will be initialized upon lazy instantiation.
- , fHeight(-1)
- , fOrigin(kTopLeft_GrSurfaceOrigin)
- , fFit(SkBackingFit::kApprox)
- , fBudgeted(SkBudgeted::kYes)
- , fFlags(GrResourceProvider::kNoPendingIO_Flag)
+GrSurfaceProxy::GrSurfaceProxy(LazyInstantiateCallback&& callback, const GrSurfaceDesc& desc,
+ SkBackingFit fit, SkBudgeted budgeted, uint32_t flags)
+ : fConfig(desc.fConfig)
+ , fWidth(desc.fWidth)
+ , fHeight(desc.fHeight)
+ , fOrigin(desc.fOrigin)
+ , fFit(fit)
+ , fBudgeted(budgeted)
+ , fFlags(flags)
, fLazyInstantiateCallback(std::move(callback))
- , fNeedsClear(false)
+ , fNeedsClear(SkToBool(desc.fFlags & kPerformInitialClear_GrSurfaceFlag))
, fGpuMemorySize(kInvalidGpuMemorySize)
, fLastOpList(nullptr) {
// NOTE: the default fUniqueID ctor pulls a value from the same pool as the GrGpuResources.
+ if (fLazyInstantiateCallback) {
+ SkASSERT(is_valid_fully_lazy(desc, fit) || is_valid_partially_lazy(desc));
+ } else {
+ SkASSERT(is_valid_non_lazy(desc));
+ }
+
}
// Wrapped version
@@ -81,7 +110,7 @@
int sampleCnt, bool needsStencil,
GrSurfaceFlags flags, GrMipMapped mipMapped,
SkDestinationSurfaceColorMode mipColorMode) const {
- SkASSERT(!this->isPendingLazyInstantiation());
+ SkASSERT(GrSurfaceProxy::LazyState::kNot == this->lazyInstantiationState());
SkASSERT(GrMipMapped::kNo == mipMapped);
GrSurfaceDesc desc;
desc.fFlags = flags;
@@ -114,7 +143,7 @@
}
void GrSurfaceProxy::assign(sk_sp<GrSurface> surface) {
- SkASSERT(!this->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kNot == this->lazyInstantiationState());
SkASSERT(!fTarget && surface);
fTarget = surface.release();
this->INHERITED::transferRefs();
@@ -130,7 +159,7 @@
bool needsStencil, GrSurfaceFlags flags, GrMipMapped mipMapped,
SkDestinationSurfaceColorMode mipColorMode,
const GrUniqueKey* uniqueKey) {
- SkASSERT(!this->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kNot == this->lazyInstantiationState());
if (fTarget) {
if (uniqueKey) {
SkASSERT(fTarget->getUniqueKey() == *uniqueKey);
@@ -155,7 +184,7 @@
}
void GrSurfaceProxy::computeScratchKey(GrScratchKey* key) const {
- SkASSERT(!this->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kFully != this->lazyInstantiationState());
const GrRenderTargetProxy* rtp = this->asRenderTargetProxy();
int sampleCount = 0;
if (rtp) {
@@ -392,14 +421,38 @@
}
sk_sp<GrTextureProxy> GrSurfaceProxy::MakeLazy(LazyInstantiateCallback&& callback,
- Renderable renderable, GrPixelConfig config) {
- return sk_sp<GrTextureProxy>(Renderable::kYes == renderable ?
- new GrTextureRenderTargetProxy(std::move(callback), config) :
- new GrTextureProxy(std::move(callback), config));
+ const GrSurfaceDesc& desc,
+ GrMipMapped mipMapped,
+ SkBackingFit fit,
+ SkBudgeted budgeted) {
+ SkASSERT((desc.fWidth <= 0 && desc.fHeight <= 0) ||
+ (desc.fWidth > 0 && desc.fHeight > 0));
+ uint32_t flags = GrResourceProvider::kNoPendingIO_Flag;
+ return sk_sp<GrTextureProxy>(SkToBool(kRenderTarget_GrSurfaceFlag & desc.fFlags) ?
+ new GrTextureRenderTargetProxy(std::move(callback), desc,
+ mipMapped, fit, budgeted, flags) :
+ new GrTextureProxy(std::move(callback), desc, mipMapped, fit,
+ budgeted, flags));
+}
+
+sk_sp<GrTextureProxy> GrSurfaceProxy::MakeFullyLazy(LazyInstantiateCallback&& callback,
+ Renderable renderable, GrPixelConfig config) {
+ GrSurfaceDesc desc;
+ if (Renderable::kYes == renderable) {
+ desc.fFlags = kRenderTarget_GrSurfaceFlag;
+ }
+ desc.fOrigin = kTopLeft_GrSurfaceOrigin;
+ desc.fWidth = -1;
+ desc.fHeight = -1;
+ desc.fConfig = config;
+ desc.fSampleCnt = 0;
+
+ return MakeLazy(std::move(callback), desc, GrMipMapped::kNo, SkBackingFit::kApprox,
+ SkBudgeted::kYes);
}
int GrSurfaceProxy::worstCaseWidth() const {
- SkASSERT(!this->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kFully != this->lazyInstantiationState());
if (fTarget) {
return fTarget->width();
}
@@ -411,7 +464,7 @@
}
int GrSurfaceProxy::worstCaseHeight() const {
- SkASSERT(!this->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kFully != this->lazyInstantiationState());
if (fTarget) {
return fTarget->height();
}
@@ -437,7 +490,7 @@
GrMipMapped mipMapped,
SkIRect srcRect,
SkBudgeted budgeted) {
- SkASSERT(!src->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kFully != src->lazyInstantiationState());
if (!srcRect.intersect(SkIRect::MakeWH(src->width(), src->height()))) {
return nullptr;
}
@@ -466,13 +519,13 @@
sk_sp<GrTextureProxy> GrSurfaceProxy::Copy(GrContext* context, GrSurfaceProxy* src,
GrMipMapped mipMapped, SkBudgeted budgeted) {
- SkASSERT(!src->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kFully != src->lazyInstantiationState());
return Copy(context, src, mipMapped, SkIRect::MakeWH(src->width(), src->height()), budgeted);
}
sk_sp<GrSurfaceContext> GrSurfaceProxy::TestCopy(GrContext* context, const GrSurfaceDesc& dstDesc,
GrSurfaceProxy* srcProxy) {
- SkASSERT(!srcProxy->isPendingLazyInstantiation());
+ SkASSERT(LazyState::kFully != srcProxy->lazyInstantiationState());
sk_sp<GrSurfaceContext> dstContext(context->contextPriv().makeDeferredSurfaceContext(
dstDesc,
GrMipMapped::kNo,
@@ -490,7 +543,7 @@
}
void GrSurfaceProxyPriv::exactify() {
- SkASSERT(!fProxy->isPendingLazyInstantiation());
+ SkASSERT(GrSurfaceProxy::LazyState::kFully != fProxy->lazyInstantiationState());
if (this->isExact()) {
return;
}
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp
index c42df8b..68153dd 100644
--- a/src/gpu/GrTextureProxy.cpp
+++ b/src/gpu/GrTextureProxy.cpp
@@ -26,9 +26,11 @@
}
// Lazy-callback version
-GrTextureProxy::GrTextureProxy(LazyInstantiateCallback&& callback, GrPixelConfig config)
- : INHERITED(std::move(callback), config)
- , fMipMapped(GrMipMapped::kNo)
+GrTextureProxy::GrTextureProxy(LazyInstantiateCallback&& callback, const GrSurfaceDesc& desc,
+ GrMipMapped mipMapped, SkBackingFit fit, SkBudgeted budgeted,
+ uint32_t flags)
+ : INHERITED(std::move(callback), desc, fit, budgeted, flags)
+ , fMipMapped(mipMapped)
, fMipColorMode(SkDestinationSurfaceColorMode::kLegacy)
, fProxyProvider(nullptr)
, fDeferredUploader(nullptr) {
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp
index 9435231..fe12a0a 100644
--- a/src/gpu/GrTextureRenderTargetProxy.cpp
+++ b/src/gpu/GrTextureRenderTargetProxy.cpp
@@ -7,6 +7,7 @@
#include "GrTextureRenderTargetProxy.h"
+#include "GrCaps.h"
#include "GrTexture.h"
#include "GrRenderTarget.h"
#include "GrSurfaceProxyPriv.h"
@@ -27,12 +28,16 @@
// Lazy-callback version
GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(LazyInstantiateCallback&& callback,
- GrPixelConfig config)
- : GrSurfaceProxy(std::move(callback), config)
+ const GrSurfaceDesc& desc,
+ GrMipMapped mipMapped,
+ SkBackingFit fit,
+ SkBudgeted budgeted,
+ uint32_t flags)
+ : GrSurfaceProxy(std::move(callback), desc, fit, budgeted, flags)
// Since we have virtual inheritance, we initialize GrSurfaceProxy directly. Send null
// callbacks to the texture and RT proxies simply to route to the appropriate constructors.
- , GrTextureProxy(LazyInstantiateCallback(), config)
- , GrRenderTargetProxy(LazyInstantiateCallback(), config) {
+ , GrTextureProxy(LazyInstantiateCallback(), desc, mipMapped, fit, budgeted, flags)
+ , GrRenderTargetProxy(LazyInstantiateCallback(), desc, fit, budgeted, flags) {
}
// Wrapped version
diff --git a/src/gpu/GrTextureRenderTargetProxy.h b/src/gpu/GrTextureRenderTargetProxy.h
index 5719366..739f797 100644
--- a/src/gpu/GrTextureRenderTargetProxy.h
+++ b/src/gpu/GrTextureRenderTargetProxy.h
@@ -30,7 +30,8 @@
SkBackingFit, SkBudgeted, uint32_t flags);
// Lazy-callback version
- GrTextureRenderTargetProxy(LazyInstantiateCallback&&, GrPixelConfig);
+ GrTextureRenderTargetProxy(LazyInstantiateCallback&&, const GrSurfaceDesc& desc, GrMipMapped,
+ SkBackingFit, SkBudgeted, uint32_t flags);
// Wrapped version
GrTextureRenderTargetProxy(sk_sp<GrSurface>, GrSurfaceOrigin);
diff --git a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
index 62d3a06..67098cc 100644
--- a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
@@ -225,7 +225,7 @@
int rtHeight) {
SkASSERT(this->isUninitialized());
- fAtlasLazyProxy = GrSurfaceProxy::MakeLazy(
+ fAtlasLazyProxy = GrSurfaceProxy::MakeFullyLazy(
[this](GrResourceProvider* resourceProvider, GrSurfaceOrigin* outOrigin) {
SkASSERT(fHasAtlas);
SkASSERT(!fHasAtlasTransform);
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index a5cda4e..a555931 100644
--- a/tests/LazyProxyTest.cpp
+++ b/tests/LazyProxyTest.cpp
@@ -54,8 +54,8 @@
DEFINE_OP_CLASS_ID
Op(LazyProxyTest* test, bool nullTexture) : GrDrawOp(ClassID()), fTest(test) {
- fProxy = GrSurfaceProxy::MakeLazy([this, nullTexture](GrResourceProvider* rp,
- GrSurfaceOrigin* origin) {
+ fProxy = GrSurfaceProxy::MakeFullyLazy([this, nullTexture](GrResourceProvider* rp,
+ GrSurfaceOrigin* origin) {
REPORTER_ASSERT(fTest->fReporter, !fTest->fHasOpTexture);
fTest->fHasOpTexture = true;
*origin = kTopLeft_GrSurfaceOrigin;
@@ -105,8 +105,8 @@
: GrFragmentProcessor(kTestFP_ClassID, kNone_OptimizationFlags)
, fTest(test)
, fAtlas(atlas) {
- fLazyProxy = GrSurfaceProxy::MakeLazy([this](GrResourceProvider* rp,
- GrSurfaceOrigin* origin) {
+ fLazyProxy = GrSurfaceProxy::MakeFullyLazy([this](GrResourceProvider* rp,
+ GrSurfaceOrigin* origin) {
REPORTER_ASSERT(fTest->fReporter, !fTest->fHasClipTexture);
fTest->fHasClipTexture = true;
*origin = kBottomLeft_GrSurfaceOrigin;