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

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

Issue 2629233002: cc: Remove separate x/y raster scales. (Closed)
Patch Set: Created 3 years, 11 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/layers/picture_layer_impl_unittest.cc ('k') | cc/playback/discardable_image_map.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/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/output/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 // cases and fall back to a persistent bitmap backing 350 // cases and fall back to a persistent bitmap backing
351 // (http://crbug.com/280374). 351 // (http://crbug.com/280374).
352 // TODO(vmpstr): Fold this canvas into playback and have raster source 352 // TODO(vmpstr): Fold this canvas into playback and have raster source
353 // accept a set of settings on playback that will determine which canvas to 353 // accept a set of settings on playback that will determine which canvas to
354 // apply. (http://crbug.com/594679) 354 // apply. (http://crbug.com/594679)
355 skia::OpacityFilterCanvas filtered_canvas(current_canvas_, 355 skia::OpacityFilterCanvas filtered_canvas(current_canvas_,
356 quad->shared_quad_state->opacity, 356 quad->shared_quad_state->opacity,
357 disable_image_filtering); 357 disable_image_filtering);
358 quad->raster_source->PlaybackToCanvas( 358 quad->raster_source->PlaybackToCanvas(
359 &filtered_canvas, quad->content_rect, quad->content_rect, 359 &filtered_canvas, quad->content_rect, quad->content_rect,
360 gfx::SizeF(quad->contents_scale, quad->contents_scale), 360 quad->contents_scale, playback_settings);
361 playback_settings);
362 } else { 361 } else {
363 quad->raster_source->PlaybackToCanvas( 362 quad->raster_source->PlaybackToCanvas(
364 current_canvas_, quad->content_rect, quad->content_rect, 363 current_canvas_, quad->content_rect, quad->content_rect,
365 gfx::SizeF(quad->contents_scale, quad->contents_scale), 364 quad->contents_scale, playback_settings);
366 playback_settings);
367 } 365 }
368 } 366 }
369 367
370 void SoftwareRenderer::DrawSolidColorQuad(const DrawingFrame* frame, 368 void SoftwareRenderer::DrawSolidColorQuad(const DrawingFrame* frame,
371 const SolidColorDrawQuad* quad) { 369 const SolidColorDrawQuad* quad) {
372 gfx::RectF visible_quad_vertex_rect = MathUtil::ScaleRectProportional( 370 gfx::RectF visible_quad_vertex_rect = MathUtil::ScaleRectProportional(
373 QuadVertexRect(), gfx::RectF(quad->rect), gfx::RectF(quad->visible_rect)); 371 QuadVertexRect(), gfx::RectF(quad->rect), gfx::RectF(quad->visible_rect));
374 current_paint_.setColor(quad->color); 372 current_paint_.setColor(quad->color);
375 current_paint_.setAlpha(quad->shared_quad_state->opacity * 373 current_paint_.setAlpha(quad->shared_quad_state->opacity *
376 SkColorGetA(quad->color)); 374 SkColorGetA(quad->color));
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); 719 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr);
722 720
723 if (!filter_backdrop_image) 721 if (!filter_backdrop_image)
724 return nullptr; 722 return nullptr;
725 723
726 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, 724 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode,
727 &filter_backdrop_transform); 725 &filter_backdrop_transform);
728 } 726 }
729 727
730 } // namespace cc 728 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/playback/discardable_image_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698