aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-03-10 07:22:25 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-10 07:22:25 -0800
commite6d665e24feabf6c633452885910efd17e5f025e (patch)
treec1098fb5ebe5452e91f54d30f94c037c5dfac428 /src/gpu/gl
parent6b4985c6d163e378551010eecd44abd4141ab4bc (diff)
Fix readback of 565 on Mac and enable tests
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLGpu.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 86c4cc3bbc..f9cba433c7 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2603,6 +2603,12 @@ bool GrGLGpu::onGetReadPixelsInfo(GrSurface* srcSurface, int width, int height,
SkASSERT(tempDrawInfo->fTempSurfaceDesc.fConfig == srcConfig);
SkASSERT(tempDrawInfo->fReadConfig == kAlpha_8_GrPixelConfig);
}
+ } else if (this->caps()->isConfigRenderable(readConfig, false) &&
+ this->readPixelsSupported(readConfig, readConfig)) {
+ // Do a draw to convert from the src config to the read config.
+ ElevateDrawPreference(drawPreference, kRequireDraw_DrawPreference);
+ tempDrawInfo->fTempSurfaceDesc.fConfig = readConfig;
+ tempDrawInfo->fReadConfig = readConfig;
} else {
return false;
}