OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |