Revert "Improve handling of GrPixelConfig in GrBackendTex/RT ctors"
This reverts commit 7d2b16ad13fd3262c776ae75ae35da4ad69df690.
Reason for revert: Maybe breaking chrome?
Original change's description:
> 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>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I91e190d72407f9c4bee93a031a557f740bb49b66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/114423
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index 7710069..0f36dd0 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -98,15 +98,7 @@
}
GrBackendTexture GrGLTexture::getBackendTexture() const {
- GrBackendTexture beTex = GrBackendTexture(this->width(), this->height(),
- this->texturePriv().mipMapped(), fInfo);
-#if GR_TEST_UTILS
- // We shouldn't have to set this since the client can't access it and we will handle the config
- // correctly if we go through our public SkSurface and SkImage APIs. However, some of our tests
- // bypass the public APIs so we need to set this manually here.
- beTex.setPixelConfig(this->config());
-#endif
- return beTex;
+ return GrBackendTexture(this->width(), this->height(), this->texturePriv().mipMapped(), fInfo);
}
void GrGLTexture::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump,