diff options
author | 2016-03-10 07:22:25 -0800 | |
---|---|---|
committer | 2016-03-10 07:22:25 -0800 | |
commit | e6d665e24feabf6c633452885910efd17e5f025e (patch) | |
tree | c1098fb5ebe5452e91f54d30f94c037c5dfac428 /src/gpu/gl | |
parent | 6b4985c6d163e378551010eecd44abd4141ab4bc (diff) |
Fix readback of 565 on Mac and enable tests
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1778143003
Review URL: https://codereview.chromium.org/1778143003
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 6 |
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; } |