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

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

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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
« no previous file with comments | « cc/output/shader.cc ('k') | cc/quads/checkerboard_draw_quad.h » ('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/trace_event/trace_event.h" 7 #include "base/trace_event/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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 } 307 }
308 308
309 current_canvas_->resetMatrix(); 309 current_canvas_->resetMatrix();
310 } 310 }
311 311
312 void SoftwareRenderer::DrawCheckerboardQuad(const DrawingFrame* frame, 312 void SoftwareRenderer::DrawCheckerboardQuad(const DrawingFrame* frame,
313 const CheckerboardDrawQuad* quad) { 313 const CheckerboardDrawQuad* quad) {
314 gfx::RectF visible_quad_vertex_rect = MathUtil::ScaleRectProportional( 314 gfx::RectF visible_quad_vertex_rect = MathUtil::ScaleRectProportional(
315 QuadVertexRect(), quad->rect, quad->visible_rect); 315 QuadVertexRect(), quad->rect, quad->visible_rect);
316 current_paint_.setColor(quad->color); 316 current_paint_.setColor(quad->color);
317 current_paint_.setAlpha(quad->opacity() * SkColorGetA(quad->color)); 317 current_paint_.setAlpha(quad->opacity());
318 current_canvas_->drawRect(gfx::RectFToSkRect(visible_quad_vertex_rect), 318 current_canvas_->drawRect(gfx::RectFToSkRect(visible_quad_vertex_rect),
319 current_paint_); 319 current_paint_);
320 } 320 }
321 321
322 void SoftwareRenderer::DrawDebugBorderQuad(const DrawingFrame* frame, 322 void SoftwareRenderer::DrawDebugBorderQuad(const DrawingFrame* frame,
323 const DebugBorderDrawQuad* quad) { 323 const DebugBorderDrawQuad* quad) {
324 // We need to apply the matrix manually to have pixel-sized stroke width. 324 // We need to apply the matrix manually to have pixel-sized stroke width.
325 SkPoint vertices[4]; 325 SkPoint vertices[4];
326 gfx::RectFToSkRect(QuadVertexRect()).toQuad(vertices); 326 gfx::RectFToSkRect(QuadVertexRect()).toQuad(vertices);
327 SkPoint transformed_vertices[4]; 327 SkPoint transformed_vertices[4];
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 } 612 }
613 613
614 void SoftwareRenderer::DidChangeVisibility() { 614 void SoftwareRenderer::DidChangeVisibility() {
615 if (visible()) 615 if (visible())
616 EnsureBackbuffer(); 616 EnsureBackbuffer();
617 else 617 else
618 DiscardBackbuffer(); 618 DiscardBackbuffer();
619 } 619 }
620 620
621 } // namespace cc 621 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/shader.cc ('k') | cc/quads/checkerboard_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698