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_PICTURE_PILE_H_ | 5 #ifndef CC_PICTURE_PILE_H_ |
6 #define CC_PICTURE_PILE_H_ | 6 #define CC_PICTURE_PILE_H_ |
7 | 7 |
8 #include "cc/picture_pile_base.h" | 8 #include "cc/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 RenderingStats; |
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 const Region& invalidation, | 25 const Region& invalidation, |
25 gfx::Rect visible_layer_rect, | 26 gfx::Rect visible_layer_rect, |
26 RenderingStats* stats); | 27 RenderingStats* stats); |
27 | 28 |
28 // Update other with a shallow copy of this (main => compositor thread commit) | 29 // Update other with a shallow copy of this (main => compositor thread commit) |
29 void PushPropertiesTo(PicturePileImpl* other); | 30 void PushPropertiesTo(PicturePileImpl* other); |
30 | 31 |
31 private: | 32 private: |
32 virtual ~PicturePile(); | 33 virtual ~PicturePile(); |
33 friend class PicturePileImpl; | 34 friend class PicturePileImpl; |
34 | 35 |
35 // Add an invalidation to this picture list. If the list needs to be | 36 // Add an invalidation to this picture list. If the list needs to be |
36 // entirely recreated, leave it empty. Do not call this on an empty list. | 37 // entirely recreated, leave it empty. Do not call this on an empty list. |
37 void InvalidateRect( | 38 void InvalidateRect( |
38 PictureList& picture_list, | 39 PictureList& picture_list, |
39 gfx::Rect invalidation); | 40 gfx::Rect invalidation); |
40 | 41 |
41 DISALLOW_COPY_AND_ASSIGN(PicturePile); | 42 DISALLOW_COPY_AND_ASSIGN(PicturePile); |
42 }; | 43 }; |
43 | 44 |
44 } // namespace cc | 45 } // namespace cc |
45 | 46 |
46 #endif // CC_PICTURE_PILE_H_ | 47 #endif // CC_PICTURE_PILE_H_ |
OLD | NEW |