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

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

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/draw_quad_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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // (http://crbug.com/280374). 343 // (http://crbug.com/280374).
344 skia::RefPtr<SkDrawFilter> opacity_filter = 344 skia::RefPtr<SkDrawFilter> opacity_filter =
345 skia::AdoptRef(new skia::OpacityDrawFilter( 345 skia::AdoptRef(new skia::OpacityDrawFilter(
346 quad->opacity(), frame->disable_picture_quad_image_filtering)); 346 quad->opacity(), frame->disable_picture_quad_image_filtering));
347 DCHECK(!current_canvas_->getDrawFilter()); 347 DCHECK(!current_canvas_->getDrawFilter());
348 current_canvas_->setDrawFilter(opacity_filter.get()); 348 current_canvas_->setDrawFilter(opacity_filter.get());
349 349
350 TRACE_EVENT0("cc", 350 TRACE_EVENT0("cc",
351 "SoftwareRenderer::DrawPictureQuad"); 351 "SoftwareRenderer::DrawPictureQuad");
352 352
353 quad->picture_pile->RasterDirect(current_canvas_, quad->content_rect, 353 quad->raster_source->PlaybackToSharedCanvas(
354 quad->contents_scale); 354 current_canvas_, quad->content_rect, quad->contents_scale);
355 355
356 current_canvas_->setDrawFilter(NULL); 356 current_canvas_->setDrawFilter(NULL);
357 } 357 }
358 358
359 void SoftwareRenderer::DrawSolidColorQuad(const DrawingFrame* frame, 359 void SoftwareRenderer::DrawSolidColorQuad(const DrawingFrame* frame,
360 const SolidColorDrawQuad* quad) { 360 const SolidColorDrawQuad* quad) {
361 gfx::RectF visible_quad_vertex_rect = MathUtil::ScaleRectProportional( 361 gfx::RectF visible_quad_vertex_rect = MathUtil::ScaleRectProportional(
362 QuadVertexRect(), quad->rect, quad->visible_rect); 362 QuadVertexRect(), quad->rect, quad->visible_rect);
363 current_paint_.setColor(quad->color); 363 current_paint_.setColor(quad->color);
364 current_paint_.setAlpha(quad->opacity() * SkColorGetA(quad->color)); 364 current_paint_.setAlpha(quad->opacity() * SkColorGetA(quad->color));
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 } 600 }
601 601
602 void SoftwareRenderer::DidChangeVisibility() { 602 void SoftwareRenderer::DidChangeVisibility() {
603 if (visible()) 603 if (visible())
604 EnsureBackbuffer(); 604 EnsureBackbuffer();
605 else 605 else
606 DiscardBackbuffer(); 606 DiscardBackbuffer();
607 } 607 }
608 608
609 } // namespace cc 609 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/shader.cc ('k') | cc/quads/draw_quad_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698