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 | 7 |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "cc/base/region.h" | 9 #include "cc/base/region.h" |
10 #include "cc/debug/debug_colors.h" | 10 #include "cc/debug/debug_colors.h" |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
369 layer_rect.Intersect(gfx::Rect(tiling_.total_size())); | 369 layer_rect.Intersect(gfx::Rect(tiling_.total_size())); |
370 | 370 |
371 skia::AnalysisCanvas canvas(layer_rect.width(), layer_rect.height()); | 371 skia::AnalysisCanvas canvas(layer_rect.width(), layer_rect.height()); |
372 | 372 |
373 RasterForAnalysis(&canvas, layer_rect, 1.0f, stats_instrumentation); | 373 RasterForAnalysis(&canvas, layer_rect, 1.0f, stats_instrumentation); |
374 | 374 |
375 analysis->is_solid_color = canvas.GetColorIfSolid(&analysis->solid_color); | 375 analysis->is_solid_color = canvas.GetColorIfSolid(&analysis->solid_color); |
376 analysis->has_text = canvas.HasText(); | 376 analysis->has_text = canvas.HasText(); |
377 } | 377 } |
378 | 378 |
379 PicturePileImpl::Analysis::Analysis() | 379 PicturePileImpl::Analysis::Analysis() : is_solid_color(false), has_text(true) {} |
alokp
2014/03/27 05:20:45
Please add a comment why the default value is true
vmpstr
2014/03/27 17:02:53
Done.
| |
380 : is_solid_color(false), | |
381 has_text(false) { | |
382 } | |
383 | 380 |
384 PicturePileImpl::Analysis::~Analysis() { | 381 PicturePileImpl::Analysis::~Analysis() { |
385 } | 382 } |
386 | 383 |
387 PicturePileImpl::PixelRefIterator::PixelRefIterator( | 384 PicturePileImpl::PixelRefIterator::PixelRefIterator( |
388 const gfx::Rect& content_rect, | 385 const gfx::Rect& content_rect, |
389 float contents_scale, | 386 float contents_scale, |
390 const PicturePileImpl* picture_pile) | 387 const PicturePileImpl* picture_pile) |
391 : picture_pile_(picture_pile), | 388 : picture_pile_(picture_pile), |
392 layer_rect_( | 389 layer_rect_( |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
442 ++it) { | 439 ++it) { |
443 Picture* picture = it->second.GetPicture(); | 440 Picture* picture = it->second.GetPicture(); |
444 if (picture && (processed_pictures.count(picture) == 0)) { | 441 if (picture && (processed_pictures.count(picture) == 0)) { |
445 picture->EmitTraceSnapshot(); | 442 picture->EmitTraceSnapshot(); |
446 processed_pictures.insert(picture); | 443 processed_pictures.insert(picture); |
447 } | 444 } |
448 } | 445 } |
449 } | 446 } |
450 | 447 |
451 } // namespace cc | 448 } // namespace cc |
OLD | NEW |