Fix vulkan onGetWritePixelsInfo

When the configs are the same in Vulkan we know we can do write pixels,
but the caller may need to do a draw, so make sure we set up the
tempDrawInfo before returning.

BUG=skia:5461, skia:5458
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2108873003

Review-Url: https://codereview.chromium.org/2108873003
This commit is contained in:
egdaniel 2016-06-28 13:38:26 -07:00 committed by Commit bot
parent 0a0f67ecec
commit d66110f597

View File

@ -252,10 +252,6 @@ bool GrVkGpu::onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height,
return false;
}
if (dstSurface->config() == srcConfig) {
return true;
}
GrRenderTarget* renderTarget = dstSurface->asRenderTarget();
// Start off assuming no swizzling
@ -271,6 +267,10 @@ bool GrVkGpu::onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height,
tempDrawInfo->fTempSurfaceDesc.fSampleCnt = 0;
tempDrawInfo->fTempSurfaceDesc.fOrigin = kTopLeft_GrSurfaceOrigin;
if (dstSurface->config() == srcConfig) {
return true;
}
if (renderTarget && this->vkCaps().isConfigRenderable(renderTarget->config(), false)) {
ElevateDrawPreference(drawPreference, kRequireDraw_DrawPreference);