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

Unified Diff: cc/output/gl_renderer.cc

Issue 14060015: cc: Async readback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 19b215b76dc0d4cc90edabc6a35dc36537cdb29c..4a0c7ba1fcf3d132ce09bcb04e7b269e748b19bc 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -1776,6 +1776,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));
+ 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