summaryrefslogtreecommitdiffstats
path: root/cc/output/software_renderer.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 16:18:25 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 16:18:25 +0000
commit18a7019dbdee8d72bcdf060fb656295f3b64b60d (patch)
tree7e4dceed39c7dee39ccb37dd34c33c9e4fe6cdae /cc/output/software_renderer.cc
parentebf258d7abe7d118039b56fa3a0c12ed5eb5ceee (diff)
downloadchromium_src-18a7019dbdee8d72bcdf060fb656295f3b64b60d.zip
chromium_src-18a7019dbdee8d72bcdf060fb656295f3b64b60d.tar.gz
chromium_src-18a7019dbdee8d72bcdf060fb656295f3b64b60d.tar.bz2
cc: Async readback.
Provide a path to get a readback of a layer's subtree via an asynchronous mechanism. This path is used for all the cc pixel tests, to show that it works. Also by some unit tests: LayerTreeHostTestAsyncReadback.GLRenderer_RunSingleThread LayerTreeHostTestAsyncReadback.GLRenderer_RunMultiThread LayerTreeHostTestAsyncReadback.SoftwareRenderer_RunSingleThread LayerTreeHostTestAsyncReadback.SoftwareRenderer_RunMultiThread LayerTreeHostTestAsyncReadbackLayerDestroyed.RunSingleThread LayerTreeHostTestAsyncReadbackLayerDestroyed.RunMultiThread BUG=179896 Review URL: https://chromiumcodereview.appspot.com/14060015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/software_renderer.cc')
-rw-r--r--cc/output/software_renderer.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index fec4f3e..69c3b7e 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -407,6 +407,15 @@ void SoftwareRenderer::DrawUnsupportedQuad(const DrawingFrame* frame,
current_paint_);
}
+void SoftwareRenderer::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());
+ current_canvas_->readPixels(bitmap, 0, 0);
+}
+
void SoftwareRenderer::GetFramebufferPixels(void* pixels, gfx::Rect rect) {
TRACE_EVENT0("cc", "SoftwareRenderer::GetFramebufferPixels");
SkBitmap subset_bitmap;