diff options
author | Greg Daniel <egdaniel@google.com> | 2018-04-06 09:27:20 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-06 14:42:23 +0000 |
commit | 9ca3065ca5bac6cc45c0ea5de23aebab92282227 (patch) | |
tree | f0cb50532b33281d2cccf414403f1a837cf52891 /src/gpu/GrBackendSurface.cpp | |
parent | a39991ebd70f4aaf1290dd516467d729811e45ee (diff) |
Don't use GrPixelConfig value as proxy for valid on GrBackendSurface.
Bug: skia:
Change-Id: I275b74b915240c9918bb2efa6a9708341f3bb189
Reviewed-on: https://skia-review.googlesource.com/119004
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrBackendSurface.cpp')
-rw-r--r-- | src/gpu/GrBackendSurface.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/gpu/GrBackendSurface.cpp b/src/gpu/GrBackendSurface.cpp index 97b4d64706..5832fa6e0a 100644 --- a/src/gpu/GrBackendSurface.cpp +++ b/src/gpu/GrBackendSurface.cpp @@ -67,7 +67,8 @@ const GrPixelConfig* GrBackendFormat::getMockFormat() const { GrBackendTexture::GrBackendTexture(int width, int height, const GrVkImageInfo& vkInfo) - : fWidth(width) + : fIsValid(true) + , fWidth(width) , fHeight(height) , fConfig(GrVkFormatToPixelConfig(vkInfo.fFormat)) , fMipMapped(GrMipMapped(vkInfo.fLevelCount > 1)) @@ -88,7 +89,8 @@ GrBackendTexture::GrBackendTexture(int width, GrPixelConfig config, GrMipMapped mipMapped, const GrGLTextureInfo& glInfo) - : fWidth(width) + : fIsValid(true) + , fWidth(width) , fHeight(height) , fConfig(config) , fMipMapped(mipMapped) @@ -100,7 +102,8 @@ GrBackendTexture::GrBackendTexture(int width, int height, GrMipMapped mipMapped, const GrGLTextureInfo& glInfo) - : fWidth(width) + : fIsValid(true) + , fWidth(width) , fHeight(height) , fConfig(GrGLSizedFormatToPixelConfig(glInfo.fFormat)) , fMipMapped(mipMapped) @@ -111,7 +114,8 @@ GrBackendTexture::GrBackendTexture(int width, int height, GrMipMapped mipMapped, const GrMockTextureInfo& mockInfo) - : fWidth(width) + : fIsValid(true) + , fWidth(width) , fHeight(height) , fConfig(mockInfo.fConfig) , fMipMapped(mipMapped) @@ -217,7 +221,8 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width, int height, int sampleCnt, const GrVkImageInfo& vkInfo) - : fWidth(width) + : fIsValid(true) + , fWidth(width) , fHeight(height) , fSampleCnt(SkTMax(1, sampleCnt)) , fStencilBits(0) // We always create stencil buffers internally for vulkan @@ -234,7 +239,8 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width, int stencilBits, GrPixelConfig config, const GrGLFramebufferInfo& glInfo) - : fWidth(width) + : fIsValid(true) + , fWidth(width) , fHeight(height) , fSampleCnt(SkTMax(1, sampleCnt)) , fStencilBits(stencilBits) @@ -248,7 +254,8 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width, int sampleCnt, int stencilBits, const GrGLFramebufferInfo& glInfo) - : fWidth(width) + : fIsValid(true) + , fWidth(width) , fHeight(height) , fSampleCnt(SkTMax(1, sampleCnt)) , fStencilBits(stencilBits) @@ -261,7 +268,8 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width, int sampleCnt, int stencilBits, const GrMockRenderTargetInfo& mockInfo) - : fWidth(width) + : fIsValid(true) + , fWidth(width) , fHeight(height) , fSampleCnt(SkTMax(1, sampleCnt)) , fStencilBits(stencilBits) |