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/resources/display_list_recording_source.h" | 5 #include "cc/resources/display_list_recording_source.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "cc/base/histograms.h" | 9 #include "cc/base/histograms.h" |
10 #include "cc/base/region.h" | 10 #include "cc/base/region.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 if (slow_down_raster_scale_factor_for_debug_ > 1) { | 117 if (slow_down_raster_scale_factor_for_debug_ > 1) { |
118 repeat_count = slow_down_raster_scale_factor_for_debug_; | 118 repeat_count = slow_down_raster_scale_factor_for_debug_; |
119 painting_control = ContentLayerClient::DISPLAY_LIST_CACHING_DISABLED; | 119 painting_control = ContentLayerClient::DISPLAY_LIST_CACHING_DISABLED; |
120 } | 120 } |
121 for (int i = 0; i < repeat_count; ++i) { | 121 for (int i = 0; i < repeat_count; ++i) { |
122 display_list_ = | 122 display_list_ = |
123 DisplayItemList::Create(recorded_viewport_, use_cached_picture_); | 123 DisplayItemList::Create(recorded_viewport_, use_cached_picture_); |
124 painter->PaintContentsToDisplayList(display_list_.get(), recorded_viewport_, | 124 painter->PaintContentsToDisplayList(display_list_.get(), recorded_viewport_, |
125 painting_control); | 125 painting_control); |
126 } | 126 } |
| 127 display_list_->ProcessAppendedItems(); |
127 if (use_cached_picture_) | 128 if (use_cached_picture_) |
128 display_list_->CreateAndCacheSkPicture(); | 129 display_list_->CreateAndCacheSkPicture(); |
129 | 130 |
130 is_suitable_for_gpu_rasterization_ = | 131 is_suitable_for_gpu_rasterization_ = |
131 display_list_->IsSuitableForGpuRasterization(); | 132 display_list_->IsSuitableForGpuRasterization(); |
132 DetermineIfSolidColor(); | 133 DetermineIfSolidColor(); |
133 display_list_->EmitTraceSnapshot(); | 134 display_list_->EmitTraceSnapshot(); |
134 if (gather_pixel_refs_) | 135 if (gather_pixel_refs_) |
135 display_list_->GatherPixelRefs(grid_cell_size_); | 136 display_list_->GatherPixelRefs(grid_cell_size_); |
136 | 137 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 196 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |
196 } | 197 } |
197 | 198 |
198 void DisplayListRecordingSource::Clear() { | 199 void DisplayListRecordingSource::Clear() { |
199 recorded_viewport_ = gfx::Rect(); | 200 recorded_viewport_ = gfx::Rect(); |
200 display_list_ = NULL; | 201 display_list_ = NULL; |
201 is_solid_color_ = false; | 202 is_solid_color_ = false; |
202 } | 203 } |
203 | 204 |
204 } // namespace cc | 205 } // namespace cc |
OLD | NEW |