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

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

Issue 1138923005: Remove SK_LEGACY_DRAWPICTURECALLBACK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: analysis_canvas_unittest fix Created 5 years, 7 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/picture_pile_impl.h ('k') | cc/playback/transform_display_item.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 <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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 DCHECK(clip_region->Contains(content_clip)) 197 DCHECK(clip_region->Contains(content_clip))
198 << "Content clips should not overlap."; 198 << "Content clips should not overlap.";
199 clip_region->Subtract(content_clip); 199 clip_region->Subtract(content_clip);
200 last_content_rect = content_clip; 200 last_content_rect = content_clip;
201 } 201 }
202 } 202 }
203 203
204 void PicturePileImpl::RasterCommon(SkCanvas* canvas, 204 void PicturePileImpl::RasterCommon(SkCanvas* canvas,
205 SkDrawPictureCallback* callback, 205 SkPicture::AbortCallback* callback,
206 const gfx::Rect& canvas_rect, 206 const gfx::Rect& canvas_rect,
207 float contents_scale) const { 207 float contents_scale) const {
208 DCHECK(contents_scale >= min_contents_scale_); 208 DCHECK(contents_scale >= min_contents_scale_);
209 209
210 canvas->translate(-canvas_rect.x(), -canvas_rect.y()); 210 canvas->translate(-canvas_rect.x(), -canvas_rect.y());
211 gfx::Rect content_tiling_rect = gfx::ToEnclosingRect( 211 gfx::Rect content_tiling_rect = gfx::ToEnclosingRect(
212 gfx::ScaleRect(gfx::Rect(tiling_.tiling_size()), contents_scale)); 212 gfx::ScaleRect(gfx::Rect(tiling_.tiling_size()), contents_scale));
213 content_tiling_rect.Intersect(canvas_rect); 213 content_tiling_rect.Intersect(canvas_rect);
214 214
215 canvas->clipRect(gfx::RectToSkRect(content_tiling_rect), 215 canvas->clipRect(gfx::RectToSkRect(content_tiling_rect),
(...skipping 238 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/picture_pile_impl.h ('k') | cc/playback/transform_display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698