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

Side by Side Diff: cc/output/software_renderer.cc

Issue 334133002: cc: Support on demand raster with ganesh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review3 Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/output/renderer.h ('k') | cc/output/software_renderer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/software_renderer.h" 5 #include "cc/output/software_renderer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_ack.h" 10 #include "cc/output/compositor_frame_ack.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 TRACE_EVENT0("cc", 389 TRACE_EVENT0("cc",
390 "SoftwareRenderer::DrawPictureQuad"); 390 "SoftwareRenderer::DrawPictureQuad");
391 391
392 // Create and run on-demand raster task for tile. 392 // Create and run on-demand raster task for tile.
393 scoped_refptr<Task> on_demand_raster_task( 393 scoped_refptr<Task> on_demand_raster_task(
394 new OnDemandRasterTaskImpl(quad->picture_pile, 394 new OnDemandRasterTaskImpl(quad->picture_pile,
395 current_canvas_, 395 current_canvas_,
396 quad->content_rect, 396 quad->content_rect,
397 quad->contents_scale)); 397 quad->contents_scale));
398 RunOnDemandRasterTask(on_demand_raster_task.get()); 398 client_->RunOnDemandRasterTask(on_demand_raster_task.get());
399 399
400 current_canvas_->setDrawFilter(NULL); 400 current_canvas_->setDrawFilter(NULL);
401 } 401 }
402 402
403 void SoftwareRenderer::DrawSolidColorQuad(const DrawingFrame* frame, 403 void SoftwareRenderer::DrawSolidColorQuad(const DrawingFrame* frame,
404 const SolidColorDrawQuad* quad) { 404 const SolidColorDrawQuad* quad) {
405 gfx::RectF visible_quad_vertex_rect = MathUtil::ScaleRectProportional( 405 gfx::RectF visible_quad_vertex_rect = MathUtil::ScaleRectProportional(
406 QuadVertexRect(), quad->rect, quad->visible_rect); 406 QuadVertexRect(), quad->rect, quad->visible_rect);
407 current_paint_.setColor(quad->color); 407 current_paint_.setColor(quad->color);
408 current_paint_.setAlpha(quad->opacity() * SkColorGetA(quad->color)); 408 current_paint_.setAlpha(quad->opacity() * SkColorGetA(quad->color));
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 645 }
646 646
647 void SoftwareRenderer::DidChangeVisibility() { 647 void SoftwareRenderer::DidChangeVisibility() {
648 if (visible()) 648 if (visible())
649 EnsureBackbuffer(); 649 EnsureBackbuffer();
650 else 650 else
651 DiscardBackbuffer(); 651 DiscardBackbuffer();
652 } 652 }
653 653
654 } // namespace cc 654 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/renderer.h ('k') | cc/output/software_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698