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/GrTextureProxy.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/GrTextureProxy.cpp')
-rw-r--r-- | src/gpu/GrTextureProxy.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp index 03acd7ce44..b25efd95f5 100644 --- a/src/gpu/GrTextureProxy.cpp +++ b/src/gpu/GrTextureProxy.cpp @@ -12,6 +12,7 @@ #include "GrContextPriv.h" #include "GrDeferredProxyUploader.h" #include "GrProxyProvider.h" +#include "GrSurfacePriv.h" #include "GrTexturePriv.h" // Deferred version - with data @@ -159,13 +160,18 @@ void GrTextureProxy::clearUniqueKey() { } #ifdef SK_DEBUG -void GrTextureProxy::validateLazySurface(const GrSurface* surface) { +void GrTextureProxy::onValidateSurface(const GrSurface* surface) { SkASSERT(!surface->asRenderTarget()); // Anything that is checked here should be duplicated in GrTextureRenderTargetProxy's version SkASSERT(surface->asTexture()); SkASSERT(GrMipMapped::kNo == this->texPriv().proxyMipMapped() || GrMipMapped::kYes == surface->asTexture()->texturePriv().mipMapped()); + + GrInternalSurfaceFlags proxyFlags = fSurfaceFlags; + GrInternalSurfaceFlags surfaceFlags = surface->surfacePriv().flags(); + SkASSERT((proxyFlags & GrInternalSurfaceFlags::kTextureMask) == + (surfaceFlags & GrInternalSurfaceFlags::kTextureMask)); } #endif |