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

Unified Diff: cc/output/direct_renderer.cc

Issue 15435003: cc: Add CopyAsBitmapRequest class to hold the readback callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nolint 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/output/direct_renderer.h ('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 429ac22bc5de82624461d1bdff5fc5e7949a4369..e2c17b8a7cdb320d480f5b4905c49bc848a8982b 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -11,6 +11,7 @@
#include "base/hash_tables.h"
#include "base/metrics/histogram.h"
#include "cc/base/math_util.h"
+#include "cc/output/copy_output_request.h"
#include "cc/quads/draw_quad.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/transform.h"
@@ -200,16 +201,19 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order) {
BeginDrawingFrame(&frame);
for (size_t i = 0; i < render_passes_in_draw_order->size(); ++i) {
- DrawRenderPass(&frame, render_passes_in_draw_order->at(i));
+ RenderPass* pass = render_passes_in_draw_order->at(i);
+ DrawRenderPass(&frame, pass);
- const RenderPass* pass = frame.current_render_pass;
- for (size_t i = 0; i < pass->copy_callbacks.size(); ++i) {
+ for (ScopedPtrVector<CopyOutputRequest>::iterator it =
+ pass->copy_requests.begin();
+ it != pass->copy_requests.end();
+ ++it) {
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]);
+ CopyCurrentRenderPassToBitmap(&frame, pass->copy_requests.take(it));
}
}
FinishDrawingFrame(&frame);
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698