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

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

Issue 1279843004: cc: Plumb more details about pixel refs to tile manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « cc/playback/picture_pile_impl.h ('k') | cc/playback/picture_pile_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698