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

Unified Diff: cc/output/gl_renderer.cc

Issue 14060015: cc: Async readback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/gl_renderer.h ('k') | cc/output/gl_renderer_pixeltest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index e822023aed4d354856b9e80f8a87a3bff353c6fa..9ff3853a9a50b075413e08fc164f8a2ec8a80c67 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -1763,6 +1763,19 @@ void GLRenderer::EnsureScissorTestDisabled() {
is_scissor_enabled_ = false;
}
+void GLRenderer::CopyCurrentRenderPassToBitmap(DrawingFrame* frame,
+ SkBitmap* bitmap) {
+ gfx::Size render_pass_size = frame->current_render_pass->output_rect.size();
+ bitmap->setConfig(SkBitmap::kARGB_8888_Config,
+ render_pass_size.width(),
+ render_pass_size.height());
+ if (bitmap->allocPixels()) {
+ bitmap->lockPixels();
+ GetFramebufferPixels(bitmap->getPixels(), gfx::Rect(render_pass_size));
piman 2013/04/25 02:13:52 How hard would it be to add the flexibility, and a
danakj 2013/04/25 18:39:15 Flexibility is fine, pass around a struct with mor
+ bitmap->unlockPixels();
+ }
+}
+
void GLRenderer::ToGLMatrix(float* gl_matrix, const gfx::Transform& transform) {
transform.matrix().asColMajorf(gl_matrix);
}
« no previous file with comments | « cc/output/gl_renderer.h ('k') | cc/output/gl_renderer_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698