OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_RESOURCES_PICTURE_PILE_H_ | 5 #ifndef CC_RESOURCES_PICTURE_PILE_H_ |
6 #define CC_RESOURCES_PICTURE_PILE_H_ | 6 #define CC_RESOURCES_PICTURE_PILE_H_ |
7 | 7 |
8 #include <bitset> | 8 #include <bitset> |
9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> |
10 | 11 |
11 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
13 #include "cc/base/tiling_data.h" | 14 #include "cc/base/tiling_data.h" |
14 #include "cc/resources/recording_source.h" | 15 #include "cc/resources/recording_source.h" |
15 | 16 |
16 namespace cc { | 17 namespace cc { |
17 class PicturePileImpl; | 18 class PicturePileImpl; |
18 | 19 |
19 class CC_EXPORT PicturePile : public RecordingSource { | 20 class CC_EXPORT PicturePile : public RecordingSource { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // A hint about whether there are any recordings. This may be a false | 100 // A hint about whether there are any recordings. This may be a false |
100 // positive. | 101 // positive. |
101 bool has_any_recordings_; | 102 bool has_any_recordings_; |
102 bool is_solid_color_; | 103 bool is_solid_color_; |
103 SkColor solid_color_; | 104 SkColor solid_color_; |
104 int pixel_record_distance_; | 105 int pixel_record_distance_; |
105 | 106 |
106 private: | 107 private: |
107 friend class PicturePileImpl; | 108 friend class PicturePileImpl; |
108 | 109 |
| 110 void CreatePictures(ContentLayerClient* painter, |
| 111 Picture::RecordingMode recording_mode, |
| 112 const std::vector<gfx::Rect>& record_rects); |
| 113 void GetInvalidTileRects(const gfx::Rect& interest_rect, |
| 114 Region* invalidation, |
| 115 const gfx::Rect& visible_layer_rect, |
| 116 int frame_number, |
| 117 std::vector<gfx::Rect>* invalid_tiles); |
| 118 bool ApplyInvalidationAndResize(const gfx::Rect& interest_rect, |
| 119 Region* invalidation, |
| 120 const gfx::Size& layer_size, |
| 121 int frame_number, |
| 122 bool can_use_lcd_text_changed); |
109 void DetermineIfSolidColor(); | 123 void DetermineIfSolidColor(); |
110 void SetBufferPixels(int buffer_pixels); | 124 void SetBufferPixels(int buffer_pixels); |
111 | 125 |
112 bool is_suitable_for_gpu_rasterization_; | 126 bool is_suitable_for_gpu_rasterization_; |
113 | 127 |
114 DISALLOW_COPY_AND_ASSIGN(PicturePile); | 128 DISALLOW_COPY_AND_ASSIGN(PicturePile); |
115 }; | 129 }; |
116 | 130 |
117 } // namespace cc | 131 } // namespace cc |
118 | 132 |
119 #endif // CC_RESOURCES_PICTURE_PILE_H_ | 133 #endif // CC_RESOURCES_PICTURE_PILE_H_ |
OLD | NEW |