diff options
author | Greg Daniel <egdaniel@google.com> | 2018-03-13 16:44:48 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-14 14:12:42 +0000 |
commit | 7d2b16ad13fd3262c776ae75ae35da4ad69df690 (patch) | |
tree | 768403578659fe038f155a8a78bd0244faa3b51a /src/gpu/GrBackendSurface.cpp | |
parent | b78dd5d01eb16ae3cb9104ce8c0fa7e861431259 (diff) |
Improve handling of GrPixelConfig in GrBackendTex/RT ctors
Make sure that no client facing code was relying on what we set as the
default value for fConfig by making in kUnkown.
Bug: skia:
Change-Id: Ie52ff08ba8deeacc16fe06eb0dd0c7292b2edf91
Reviewed-on: https://skia-review.googlesource.com/114261
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrBackendSurface.cpp')
-rw-r--r-- | src/gpu/GrBackendSurface.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrBackendSurface.cpp b/src/gpu/GrBackendSurface.cpp index fa2582a18e..49a8c5f762 100644 --- a/src/gpu/GrBackendSurface.cpp +++ b/src/gpu/GrBackendSurface.cpp @@ -69,7 +69,7 @@ GrBackendTexture::GrBackendTexture(int width, const GrVkImageInfo& vkInfo) : fWidth(width) , fHeight(height) - , fConfig(GrVkFormatToPixelConfig(vkInfo.fFormat)) + , fConfig(kUnknown_GrPixelConfig) , fMipMapped(GrMipMapped(vkInfo.fLevelCount > 1)) , fBackend(kVulkan_GrBackend) , fVkInfo(vkInfo) {} @@ -99,7 +99,7 @@ GrBackendTexture::GrBackendTexture(int width, const GrGLTextureInfo& glInfo) : fWidth(width) , fHeight(height) - , fConfig(GrGLSizedFormatToPixelConfig(glInfo.fFormat)) + , fConfig(kUnknown_GrPixelConfig) , fMipMapped(mipMapped) , fBackend(kOpenGL_GrBackend) , fGLInfo(glInfo) {} @@ -159,7 +159,7 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width, , fHeight(height) , fSampleCnt(SkTMax(1, sampleCnt)) , fStencilBits(0) // We always create stencil buffers internally for vulkan - , fConfig(GrVkFormatToPixelConfig(vkInfo.fFormat)) + , fConfig(kUnknown_GrPixelConfig) , fBackend(kVulkan_GrBackend) , fVkInfo(vkInfo) {} #endif @@ -187,7 +187,7 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width, , fHeight(height) , fSampleCnt(SkTMax(1, sampleCnt)) , fStencilBits(stencilBits) - , fConfig(GrGLSizedFormatToPixelConfig(glInfo.fFormat)) + , fConfig(kUnknown_GrPixelConfig) , fBackend(kOpenGL_GrBackend) , fGLInfo(glInfo) {} |