| 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 "cc/resources/picture_pile_base.h" | 8 #include "cc/resources/picture_pile_base.h" |
| 9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
| 10 | 10 |
| 11 namespace cc { | 11 namespace cc { |
| 12 class PicturePileImpl; | 12 class PicturePileImpl; |
| 13 class Region; | 13 class Region; |
| 14 struct RenderingStats; | 14 struct RenderingStatsInstrumentation; |
| 15 | 15 |
| 16 class CC_EXPORT PicturePile : public PicturePileBase { | 16 class CC_EXPORT PicturePile : public PicturePileBase { |
| 17 public: | 17 public: |
| 18 PicturePile(); | 18 PicturePile(); |
| 19 | 19 |
| 20 // Re-record parts of the picture that are invalid. | 20 // Re-record parts of the picture that are invalid. |
| 21 // Invalidations are in layer space. | 21 // Invalidations are in layer space. |
| 22 void Update( | 22 void Update( |
| 23 ContentLayerClient* painter, | 23 ContentLayerClient* painter, |
| 24 SkColor background_color, | 24 SkColor background_color, |
| 25 const Region& invalidation, | 25 const Region& invalidation, |
| 26 gfx::Rect visible_layer_rect, | 26 gfx::Rect visible_layer_rect, |
| 27 RenderingStats* stats); | 27 RenderingStatsInstrumentation* stats_instrumentation); |
| 28 | 28 |
| 29 void set_num_raster_threads(int num_raster_threads) { | 29 void set_num_raster_threads(int num_raster_threads) { |
| 30 num_raster_threads_ = num_raster_threads; | 30 num_raster_threads_ = num_raster_threads; |
| 31 } | 31 } |
| 32 | 32 |
| 33 void set_slow_down_raster_scale_factor(int factor) { | 33 void set_slow_down_raster_scale_factor(int factor) { |
| 34 slow_down_raster_scale_factor_for_debug_ = factor; | 34 slow_down_raster_scale_factor_for_debug_ = factor; |
| 35 } | 35 } |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 virtual ~PicturePile(); | 38 virtual ~PicturePile(); |
| 39 friend class PicturePileImpl; | 39 friend class PicturePileImpl; |
| 40 | 40 |
| 41 // Add an invalidation to this picture list. If the list needs to be | 41 // Add an invalidation to this picture list. If the list needs to be |
| 42 // entirely recreated, leave it empty. Do not call this on an empty list. | 42 // entirely recreated, leave it empty. Do not call this on an empty list. |
| 43 void InvalidateRect( | 43 void InvalidateRect( |
| 44 PictureList& picture_list, | 44 PictureList& picture_list, |
| 45 gfx::Rect invalidation); | 45 gfx::Rect invalidation); |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(PicturePile); | 47 DISALLOW_COPY_AND_ASSIGN(PicturePile); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace cc | 50 } // namespace cc |
| 51 | 51 |
| 52 #endif // CC_RESOURCES_PICTURE_PILE_H_ | 52 #endif // CC_RESOURCES_PICTURE_PILE_H_ |
| OLD | NEW |