diff options
author | Robert Phillips <robertphillips@google.com> | 2018-02-04 14:33:21 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-04 20:01:28 +0000 |
commit | e8fabb2665d12ee289bc3af5b7e93c5b12396e2d (patch) | |
tree | 3f7cde3336c04ae74c09b102d3fefd7f8c7fb5cd /src/gpu/GrRenderTargetProxy.cpp | |
parent | d2807d5115ad0f6954fa0d77e761db5afdb38d68 (diff) |
Update LazyProxy creation to allow for a non-textureable result
Change-Id: Ic284b4f4220afa714159e07f57798a94fd40d63a
Reviewed-on: https://skia-review.googlesource.com/102484
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetProxy.cpp')
-rw-r--r-- | src/gpu/GrRenderTargetProxy.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/GrRenderTargetProxy.cpp b/src/gpu/GrRenderTargetProxy.cpp index 841d4b18fd..59dcd73a3e 100644 --- a/src/gpu/GrRenderTargetProxy.cpp +++ b/src/gpu/GrRenderTargetProxy.cpp @@ -115,3 +115,13 @@ bool GrRenderTargetProxy::refsWrappedObjects() const { return fTarget->resourcePriv().refsWrappedObjects(); } + +#ifdef SK_DEBUG +void GrRenderTargetProxy::validateLazySurface(const GrSurface* surface) { + SkASSERT(!surface->asTexture()); + + // Anything that is checked here should be duplicated in GrTextureRenderTargetProxy's version + SkASSERT(surface->asRenderTarget()); + SkASSERT(surface->asRenderTarget()->numStencilSamples() == this->numStencilSamples()); +} +#endif |