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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 skia::AnalysisCanvas canvas(layer_rect.width(), layer_rect.height()); | 294 skia::AnalysisCanvas canvas(layer_rect.width(), layer_rect.height()); |
295 | 295 |
296 RasterForAnalysis(&canvas, layer_rect, 1.0f); | 296 RasterForAnalysis(&canvas, layer_rect, 1.0f); |
297 | 297 |
298 analysis->is_solid_color = canvas.GetColorIfSolid(&analysis->solid_color); | 298 analysis->is_solid_color = canvas.GetColorIfSolid(&analysis->solid_color); |
299 } | 299 } |
300 | 300 |
301 void PicturePileImpl::GatherPixelRefs( | 301 void PicturePileImpl::GatherPixelRefs( |
302 const gfx::Rect& content_rect, | 302 const gfx::Rect& content_rect, |
303 float contents_scale, | 303 float contents_scale, |
304 std::vector<SkPixelRef*>* pixel_refs) const { | 304 std::vector<skia::PositionPixelRef>* pixel_refs) const { |
305 DCHECK_EQ(0u, pixel_refs->size()); | 305 DCHECK_EQ(0u, pixel_refs->size()); |
306 for (PixelRefIterator iter(content_rect, contents_scale, this); iter; | 306 for (PixelRefIterator iter(content_rect, contents_scale, this); iter; |
307 ++iter) { | 307 ++iter) { |
308 pixel_refs->push_back(*iter); | 308 pixel_refs->push_back(*iter); |
309 } | 309 } |
310 } | 310 } |
311 | 311 |
312 bool PicturePileImpl::CoversRect(const gfx::Rect& content_rect, | 312 bool PicturePileImpl::CoversRect(const gfx::Rect& content_rect, |
313 float contents_scale) const { | 313 float contents_scale) const { |
314 if (tiling_.tiling_size().IsEmpty()) | 314 if (tiling_.tiling_size().IsEmpty()) |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 for (const auto& map_pair : picture_map_) { | 456 for (const auto& map_pair : picture_map_) { |
457 const Picture* picture = map_pair.second.get(); | 457 const Picture* picture = map_pair.second.get(); |
458 if (processed_pictures.count(picture) == 0) { | 458 if (processed_pictures.count(picture) == 0) { |
459 picture->EmitTraceSnapshot(); | 459 picture->EmitTraceSnapshot(); |
460 processed_pictures.insert(picture); | 460 processed_pictures.insert(picture); |
461 } | 461 } |
462 } | 462 } |
463 } | 463 } |
464 | 464 |
465 } // namespace cc | 465 } // namespace cc |
OLD | NEW |