| 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 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 PicturePile(); | 21 PicturePile(); |
| 22 ~PicturePile() override; | 22 ~PicturePile() override; |
| 23 | 23 |
| 24 // RecordingSource overrides. | 24 // RecordingSource overrides. |
| 25 bool UpdateAndExpandInvalidation( | 25 bool UpdateAndExpandInvalidation( |
| 26 ContentLayerClient* painter, | 26 ContentLayerClient* painter, |
| 27 Region* invalidation, | 27 Region* invalidation, |
| 28 SkColor background_color, | 28 SkColor background_color, |
| 29 bool contents_opaque, | 29 bool contents_opaque, |
| 30 bool contents_fill_bounds_completely, | 30 bool contents_fill_bounds_completely, |
| 31 bool can_use_lcd_text, | |
| 32 const gfx::Size& layer_size, | 31 const gfx::Size& layer_size, |
| 33 const gfx::Rect& visible_layer_rect, | 32 const gfx::Rect& visible_layer_rect, |
| 34 int frame_number, | 33 int frame_number, |
| 35 Picture::RecordingMode recording_mode) override; | 34 Picture::RecordingMode recording_mode) override; |
| 36 gfx::Size GetSize() const final; | 35 gfx::Size GetSize() const final; |
| 37 void SetEmptyBounds() override; | 36 void SetEmptyBounds() override; |
| 38 void SetMinContentsScale(float min_contents_scale) override; | 37 void SetMinContentsScale(float min_contents_scale) override; |
| 39 void SetTileGridSize(const gfx::Size& tile_grid_size) override; | 38 void SetTileGridSize(const gfx::Size& tile_grid_size) override; |
| 40 void SetSlowdownRasterScaleFactor(int factor) override; | 39 void SetSlowdownRasterScaleFactor(int factor) override; |
| 41 void SetIsMask(bool is_mask) override; | 40 void SetIsMask(bool is_mask) override; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // If non-empty, all pictures tiles inside this rect are recorded. There may | 94 // If non-empty, all pictures tiles inside this rect are recorded. There may |
| 96 // be recordings outside this rect, but everything inside the rect is | 95 // be recordings outside this rect, but everything inside the rect is |
| 97 // recorded. | 96 // recorded. |
| 98 gfx::Rect recorded_viewport_; | 97 gfx::Rect recorded_viewport_; |
| 99 float min_contents_scale_; | 98 float min_contents_scale_; |
| 100 SkTileGridFactory::TileGridInfo tile_grid_info_; | 99 SkTileGridFactory::TileGridInfo tile_grid_info_; |
| 101 SkColor background_color_; | 100 SkColor background_color_; |
| 102 int slow_down_raster_scale_factor_for_debug_; | 101 int slow_down_raster_scale_factor_for_debug_; |
| 103 bool contents_opaque_; | 102 bool contents_opaque_; |
| 104 bool contents_fill_bounds_completely_; | 103 bool contents_fill_bounds_completely_; |
| 105 bool can_use_lcd_text_; | |
| 106 bool clear_canvas_with_debug_color_; | 104 bool clear_canvas_with_debug_color_; |
| 107 // A hint about whether there are any recordings. This may be a false | 105 // A hint about whether there are any recordings. This may be a false |
| 108 // positive. | 106 // positive. |
| 109 bool has_any_recordings_; | 107 bool has_any_recordings_; |
| 110 bool is_mask_; | 108 bool is_mask_; |
| 111 bool is_solid_color_; | 109 bool is_solid_color_; |
| 112 SkColor solid_color_; | 110 SkColor solid_color_; |
| 113 int pixel_record_distance_; | 111 int pixel_record_distance_; |
| 114 | 112 |
| 115 private: | 113 private: |
| 116 friend class PicturePileImpl; | 114 friend class PicturePileImpl; |
| 117 | 115 |
| 118 void DetermineIfSolidColor(); | 116 void DetermineIfSolidColor(); |
| 119 void SetBufferPixels(int buffer_pixels); | 117 void SetBufferPixels(int buffer_pixels); |
| 120 | 118 |
| 121 bool is_suitable_for_gpu_rasterization_; | 119 bool is_suitable_for_gpu_rasterization_; |
| 122 | 120 |
| 123 DISALLOW_COPY_AND_ASSIGN(PicturePile); | 121 DISALLOW_COPY_AND_ASSIGN(PicturePile); |
| 124 }; | 122 }; |
| 125 | 123 |
| 126 } // namespace cc | 124 } // namespace cc |
| 127 | 125 |
| 128 #endif // CC_RESOURCES_PICTURE_PILE_H_ | 126 #endif // CC_RESOURCES_PICTURE_PILE_H_ |
| OLD | NEW |