aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLTexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLTexture.cpp')
-rw-r--r--src/gpu/gl/GrGLTexture.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index 0f36dd0f32..771006919b 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -98,7 +98,15 @@ GrBackendObject GrGLTexture::getTextureHandle() const {
}
GrBackendTexture GrGLTexture::getBackendTexture() const {
- return GrBackendTexture(this->width(), this->height(), this->texturePriv().mipMapped(), fInfo);
+ 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;
}
void GrGLTexture::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump,