Index: cc/raster/gpu_rasterizer.cc |
diff --git a/cc/raster/gpu_rasterizer.cc b/cc/raster/gpu_rasterizer.cc |
index 9525d8f9f2220e8e5085b17f9ddb7d30bb848f29..8beaccd11ab7fadcc923a026731a3aaef5515e20 100644 |
--- a/cc/raster/gpu_rasterizer.cc |
+++ b/cc/raster/gpu_rasterizer.cc |
@@ -79,7 +79,16 @@ void GpuRasterizer::RasterizeSource( |
SkMultiPictureDraw multi_picture_draw; |
multi_picture_draw.add(sk_surface->getCanvas(), picture.get()); |
- multi_picture_draw.draw(msaa_sample_count_ > 0); |
+ // This is undocumented: |
bsalomon
2016/02/01 14:55:59
What is undocumented? Are we missing something on
|
+ // SkCanvas::flush must be explicitly called in order to flush possibly |
+ // deferred rendering in SkGpuDevice. |
+ // This also prepares the GrRenderTarget of the sk_surface for external |
+ // read. |
+ // Correct point of preparing would be in |
+ // ScopedWriteLockGr::ReleaseSkSurface, but this would be redundant, as |
+ // SkGpuDevice::flush forces it. |
+ // Passing true SkMultiPictureDraw::draw(bool flush) makes this happen. |
+ multi_picture_draw.draw(true); |
write_lock->ReleaseSkSurface(); |
} |
} |