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/playback/display_list_recording_source.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "cc/base/region.h" | 9 #include "cc/base/region.h" |
10 #include "cc/layers/content_layer_client.h" | 10 #include "cc/layers/content_layer_client.h" |
11 #include "cc/resources/display_item_list.h" | 11 #include "cc/playback/display_item_list.h" |
12 #include "cc/resources/display_list_raster_source.h" | 12 #include "cc/playback/display_list_raster_source.h" |
13 #include "skia/ext/analysis_canvas.h" | 13 #include "skia/ext/analysis_canvas.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Layout pixel buffer around the visible layer rect to record. Any base | 17 // Layout pixel buffer around the visible layer rect to record. Any base |
18 // picture that intersects the visible layer rect expanded by this distance | 18 // picture that intersects the visible layer rect expanded by this distance |
19 // will be recorded. | 19 // will be recorded. |
20 const int kPixelDistanceToRecord = 8000; | 20 const int kPixelDistanceToRecord = 8000; |
21 // We don't perform solid color analysis on images that have more than 10 skia | 21 // We don't perform solid color analysis on images that have more than 10 skia |
22 // operations. | 22 // operations. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 183 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |
184 } | 184 } |
185 | 185 |
186 void DisplayListRecordingSource::Clear() { | 186 void DisplayListRecordingSource::Clear() { |
187 recorded_viewport_ = gfx::Rect(); | 187 recorded_viewport_ = gfx::Rect(); |
188 display_list_ = NULL; | 188 display_list_ = NULL; |
189 is_solid_color_ = false; | 189 is_solid_color_ = false; |
190 } | 190 } |
191 | 191 |
192 } // namespace cc | 192 } // namespace cc |
OLD | NEW |