Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1778143003: Fix readback of 565 on Mac and enable tests (Closed) Base URL: https://skia.googlesource.com/skia.git@newtexfrompixmap
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/ImageTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 86c4cc3bbc0e3314cf006d6114cbcc3fd9d8482d..f9cba433c742e29b03951d773a009d2dda0e5a06 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;
}
« no previous file with comments | « no previous file | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698