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

Side by Side Diff: cc/playback/picture_pile_impl.cc

Issue 1314943008: cc: Remove implicit conversions from Rect to RectF in src/cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rectfconvert-cc: rebase-and-sandwich-strategy Created 5 years, 3 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/playback/display_list_raster_source.cc ('k') | cc/playback/picture_pile_impl_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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 #include <set> 7 #include <set>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/base/region.h" 10 #include "cc/base/region.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 } 204 }
205 205
206 void PicturePileImpl::RasterCommon(SkCanvas* canvas, 206 void PicturePileImpl::RasterCommon(SkCanvas* canvas,
207 SkPicture::AbortCallback* callback, 207 SkPicture::AbortCallback* callback,
208 const gfx::Rect& canvas_rect, 208 const gfx::Rect& canvas_rect,
209 float contents_scale) const { 209 float contents_scale) const {
210 DCHECK(contents_scale >= min_contents_scale_); 210 DCHECK(contents_scale >= min_contents_scale_);
211 211
212 canvas->translate(-canvas_rect.x(), -canvas_rect.y()); 212 canvas->translate(-canvas_rect.x(), -canvas_rect.y());
213 gfx::Rect content_tiling_rect = gfx::ToEnclosingRect( 213 gfx::Rect content_tiling_rect = gfx::ScaleToEnclosingRect(
214 gfx::ScaleRect(gfx::Rect(tiling_.tiling_size()), contents_scale)); 214 gfx::Rect(tiling_.tiling_size()), contents_scale);
215 content_tiling_rect.Intersect(canvas_rect); 215 content_tiling_rect.Intersect(canvas_rect);
216 216
217 canvas->clipRect(gfx::RectToSkRect(content_tiling_rect), 217 canvas->clipRect(gfx::RectToSkRect(content_tiling_rect),
218 SkRegion::kIntersect_Op); 218 SkRegion::kIntersect_Op);
219 219
220 PictureRegionMap picture_region_map; 220 PictureRegionMap picture_region_map;
221 CoalesceRasters( 221 CoalesceRasters(
222 canvas_rect, content_tiling_rect, contents_scale, &picture_region_map); 222 canvas_rect, content_tiling_rect, contents_scale, &picture_region_map);
223 223
224 #ifndef NDEBUG 224 #ifndef NDEBUG
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 for (const auto& map_pair : picture_map_) { 454 for (const auto& map_pair : picture_map_) {
455 const Picture* picture = map_pair.second.get(); 455 const Picture* picture = map_pair.second.get();
456 if (processed_pictures.count(picture) == 0) { 456 if (processed_pictures.count(picture) == 0) {
457 picture->EmitTraceSnapshot(); 457 picture->EmitTraceSnapshot();
458 processed_pictures.insert(picture); 458 processed_pictures.insert(picture);
459 } 459 }
460 } 460 }
461 } 461 }
462 462
463 } // namespace cc 463 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/display_list_raster_source.cc ('k') | cc/playback/picture_pile_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698