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 #ifndef CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ | 5 #ifndef CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ |
6 #define CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ | 6 #define CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/playback/recording_source.h" | 9 #include "cc/playback/recording_source.h" |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 RecordingMode recording_mode) override; | 26 RecordingMode recording_mode) override; |
27 scoped_refptr<RasterSource> CreateRasterSource( | 27 scoped_refptr<RasterSource> CreateRasterSource( |
28 bool can_use_lcd_text) const override; | 28 bool can_use_lcd_text) const override; |
29 gfx::Size GetSize() const final; | 29 gfx::Size GetSize() const final; |
30 void SetEmptyBounds() override; | 30 void SetEmptyBounds() override; |
31 void SetSlowdownRasterScaleFactor(int factor) override; | 31 void SetSlowdownRasterScaleFactor(int factor) override; |
32 void SetGatherDiscardableImages(bool gather_images) override; | 32 void SetGatherDiscardableImages(bool gather_images) override; |
33 void SetBackgroundColor(SkColor background_color) override; | 33 void SetBackgroundColor(SkColor background_color) override; |
34 void SetRequiresClear(bool requires_clear) override; | 34 void SetRequiresClear(bool requires_clear) override; |
35 bool IsSuitableForGpuRasterization() const override; | 35 bool IsSuitableForGpuRasterization() const override; |
36 void SetUnsuitableForGpuRasterizationForTesting() override; | |
37 // Returns true if the new recorded viewport exposes enough new area to be | 36 // Returns true if the new recorded viewport exposes enough new area to be |
38 // worth re-recording. | 37 // worth re-recording. |
39 static bool ExposesEnoughNewArea( | 38 static bool ExposesEnoughNewArea( |
40 const gfx::Rect& current_recorded_viewport, | 39 const gfx::Rect& current_recorded_viewport, |
41 const gfx::Rect& potential_new_recorded_viewport, | 40 const gfx::Rect& potential_new_recorded_viewport, |
42 const gfx::Size& layer_size); | 41 const gfx::Size& layer_size); |
43 | 42 |
44 gfx::Rect recorded_viewport() const { return recorded_viewport_; } | 43 gfx::Rect recorded_viewport() const { return recorded_viewport_; } |
45 | 44 |
46 protected: | 45 protected: |
(...skipping 12 matching lines...) Expand all Loading... |
59 gfx::Size grid_cell_size_; | 58 gfx::Size grid_cell_size_; |
60 | 59 |
61 scoped_refptr<DisplayItemList> display_list_; | 60 scoped_refptr<DisplayItemList> display_list_; |
62 size_t painter_reported_memory_usage_; | 61 size_t painter_reported_memory_usage_; |
63 | 62 |
64 private: | 63 private: |
65 friend class DisplayListRasterSource; | 64 friend class DisplayListRasterSource; |
66 | 65 |
67 void DetermineIfSolidColor(); | 66 void DetermineIfSolidColor(); |
68 | 67 |
69 bool is_suitable_for_gpu_rasterization_; | |
70 | |
71 DISALLOW_COPY_AND_ASSIGN(DisplayListRecordingSource); | 68 DISALLOW_COPY_AND_ASSIGN(DisplayListRecordingSource); |
72 }; | 69 }; |
73 | 70 |
74 } // namespace cc | 71 } // namespace cc |
75 | 72 |
76 #endif // CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ | 73 #endif // CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ |
OLD | NEW |