| 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/playback/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/histograms.h" | 9 #include "cc/base/histograms.h" |
| 10 #include "cc/base/region.h" | 10 #include "cc/base/region.h" |
| 11 #include "cc/layers/content_layer_client.h" | 11 #include "cc/layers/content_layer_client.h" |
| 12 #include "cc/playback/display_item_list.h" | 12 #include "cc/playback/display_item_list.h" |
| 13 #include "cc/playback/display_list_raster_source.h" | 13 #include "cc/playback/display_list_raster_source.h" |
| 14 #include "skia/ext/analysis_canvas.h" | 14 #include "skia/ext/analysis_canvas.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // Layout pixel buffer around the visible layer rect to record. Any base | 18 // Layout pixel buffer around the visible layer rect to record. Any base |
| 19 // picture that intersects the visible layer rect expanded by this distance | 19 // picture that intersects the visible layer rect expanded by this distance |
| 20 // will be recorded. | 20 // will be recorded. |
| 21 const int kPixelDistanceToRecord = 8000; | 21 const int kPixelDistanceToRecord = 4000; |
| 22 | 22 |
| 23 // This is the distance, in layer space, by which the recorded viewport has to | 23 // This is the distance, in layer space, by which the recorded viewport has to |
| 24 // change before causing a paint of the new content. For example, it means | 24 // change before causing a paint of the new content. For example, it means |
| 25 // that one has to scroll a very large page by 512 pixels before we will | 25 // that one has to scroll a very large page by 512 pixels before we will |
| 26 // re-record a new DisplayItemList for an updated recorded viewport. | 26 // re-record a new DisplayItemList for an updated recorded viewport. |
| 27 const int kMinimumDistanceBeforeUpdatingRecordedViewport = 512; | 27 const int kMinimumDistanceBeforeUpdatingRecordedViewport = 512; |
| 28 | 28 |
| 29 #ifdef NDEBUG | 29 #ifdef NDEBUG |
| 30 const bool kDefaultClearCanvasSetting = false; | 30 const bool kDefaultClearCanvasSetting = false; |
| 31 #else | 31 #else |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 } | 252 } |
| 253 | 253 |
| 254 void DisplayListRecordingSource::Clear() { | 254 void DisplayListRecordingSource::Clear() { |
| 255 recorded_viewport_ = gfx::Rect(); | 255 recorded_viewport_ = gfx::Rect(); |
| 256 display_list_ = NULL; | 256 display_list_ = NULL; |
| 257 painter_reported_memory_usage_ = 0; | 257 painter_reported_memory_usage_ = 0; |
| 258 is_solid_color_ = false; | 258 is_solid_color_ = false; |
| 259 } | 259 } |
| 260 | 260 |
| 261 } // namespace cc | 261 } // namespace cc |
| OLD | NEW |