Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/paint/display_item_list.h" | 5 #include "cc/paint/display_item_list.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 // contribute to memory usage? | 329 // contribute to memory usage? |
| 330 // TODO(vmpstr): Probably DiscardableImageMap is worth counting here. | 330 // TODO(vmpstr): Probably DiscardableImageMap is worth counting here. |
| 331 | 331 |
| 332 return memory_usage; | 332 return memory_usage; |
| 333 } | 333 } |
| 334 | 334 |
| 335 bool DisplayItemList::ShouldBeAnalyzedForSolidColor() const { | 335 bool DisplayItemList::ShouldBeAnalyzedForSolidColor() const { |
| 336 return ApproximateOpCount() <= kOpCountThatIsOkToAnalyze; | 336 return ApproximateOpCount() <= kOpCountThatIsOkToAnalyze; |
| 337 } | 337 } |
| 338 | 338 |
| 339 bool DisplayItemList::HasNonSRGBContent() const { | |
| 340 return image_map_.has_non_srgb_images(); | |
|
vmpstr
2017/05/09 22:58:27
One thing to note (and I think we're pretty far do
| |
| 341 } | |
| 342 | |
| 339 void DisplayItemList::EmitTraceSnapshot() const { | 343 void DisplayItemList::EmitTraceSnapshot() const { |
| 340 bool include_items; | 344 bool include_items; |
| 341 TRACE_EVENT_CATEGORY_GROUP_ENABLED( | 345 TRACE_EVENT_CATEGORY_GROUP_ENABLED( |
| 342 TRACE_DISABLED_BY_DEFAULT("cc.debug.display_items"), &include_items); | 346 TRACE_DISABLED_BY_DEFAULT("cc.debug.display_items"), &include_items); |
| 343 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( | 347 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( |
| 344 TRACE_DISABLED_BY_DEFAULT("cc.debug.display_items") "," | 348 TRACE_DISABLED_BY_DEFAULT("cc.debug.display_items") "," |
| 345 TRACE_DISABLED_BY_DEFAULT("cc.debug.picture") "," | 349 TRACE_DISABLED_BY_DEFAULT("cc.debug.picture") "," |
| 346 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.picture"), | 350 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.picture"), |
| 347 "cc::DisplayItemList", this, CreateTracedValue(include_items)); | 351 "cc::DisplayItemList", this, CreateTracedValue(include_items)); |
| 348 } | 352 } |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 558 std::vector<DrawImage>* images) { | 562 std::vector<DrawImage>* images) { |
| 559 image_map_.GetDiscardableImagesInRect(rect, contents_scale, | 563 image_map_.GetDiscardableImagesInRect(rect, contents_scale, |
| 560 target_color_space, images); | 564 target_color_space, images); |
| 561 } | 565 } |
| 562 | 566 |
| 563 gfx::Rect DisplayItemList::GetRectForImage(ImageId image_id) const { | 567 gfx::Rect DisplayItemList::GetRectForImage(ImageId image_id) const { |
| 564 return image_map_.GetRectForImage(image_id); | 568 return image_map_.GetRectForImage(image_id); |
| 565 } | 569 } |
| 566 | 570 |
| 567 } // namespace cc | 571 } // namespace cc |
| OLD | NEW |