diff options
author | Greg Daniel <egdaniel@google.com> | 2018-04-24 14:32:53 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-24 18:59:16 +0000 |
commit | 849dce1d7bc10b532c3d8f81a503416caf5f444e (patch) | |
tree | e60653b3a87a7e73ce4ba923ff4f83dd354c430d /src/gpu/GrTextureRenderTargetProxy.cpp | |
parent | 55d330c32dce20b56e4c104fa4d844f2fb3b2fc7 (diff) |
Update flag checks when validating surface being assigned to proxy.
Bug: skia:7748
Change-Id: Id87c0b1be2efbdefd96740e9591fd102e09b4d95
Reviewed-on: https://skia-review.googlesource.com/123423
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTextureRenderTargetProxy.cpp')
-rw-r--r-- | src/gpu/GrTextureRenderTargetProxy.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp index 61bec05a29..dfc3d13432 100644 --- a/src/gpu/GrTextureRenderTargetProxy.cpp +++ b/src/gpu/GrTextureRenderTargetProxy.cpp @@ -12,6 +12,7 @@ #include "GrTexturePriv.h" #include "GrTextureProxyPriv.h" #include "GrRenderTarget.h" +#include "GrSurfacePriv.h" #include "GrSurfaceProxyPriv.h" // Deferred version @@ -110,7 +111,7 @@ sk_sp<GrSurface> GrTextureRenderTargetProxy::createSurface( } #ifdef SK_DEBUG -void GrTextureRenderTargetProxy::validateLazySurface(const GrSurface* surface) { +void GrTextureRenderTargetProxy::onValidateSurface(const GrSurface* surface) { // Anything checked here should also be checking the GrTextureProxy version SkASSERT(surface->asTexture()); SkASSERT(GrMipMapped::kNo == this->texPriv().proxyMipMapped() || @@ -119,6 +120,15 @@ void GrTextureRenderTargetProxy::validateLazySurface(const GrSurface* surface) { // Anything checked here should also be checking the GrRenderTargetProxy version SkASSERT(surface->asRenderTarget()); SkASSERT(surface->asRenderTarget()->numStencilSamples() == this->numStencilSamples()); + + GrInternalSurfaceFlags proxyFlags = fSurfaceFlags; + GrInternalSurfaceFlags surfaceFlags = surface->surfacePriv().flags(); + SkASSERT((proxyFlags & GrInternalSurfaceFlags::kTextureMask) == + (surfaceFlags & GrInternalSurfaceFlags::kTextureMask)); + // DDL TODO: re-enable this after skbug.com/7748 (Add FBO-0-ness to SkSurfaceCharacterization) + // is fixed. + // SkASSERT((proxyFlags & GrInternalSurfaceFlags::kRenderTargetMask) == + // (surfaceFlags & GrInternalSurfaceFlags::kRenderTargetMask)); } #endif |