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

Unified Diff: cc/output/direct_renderer.cc

Issue 15004009: cc: Fix readback from non-root layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « cc/cc_tests.gyp ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/direct_renderer.cc
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index e0cedb6f757c64470563b96afa050454992ce4af..523c39aa4e33b41107bb73e80d81fbf3776de639 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -198,8 +198,14 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order) {
DrawRenderPass(&frame, render_passes_in_draw_order->at(i));
const RenderPass* pass = frame.current_render_pass;
- for (size_t i = 0; i < pass->copy_callbacks.size(); ++i)
+ for (size_t i = 0; i < pass->copy_callbacks.size(); ++i) {
+ if (i > 0) {
+ // Doing a readback is destructive of our state on Mac, so make sure
+ // we restore the state between readbacks. http://crbug.com/99393.
+ UseRenderPass(&frame, pass);
+ }
CopyCurrentRenderPassToBitmap(&frame, pass->copy_callbacks[i]);
+ }
}
FinishDrawingFrame(&frame);
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698