| 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 <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class CC_EXPORT PicturePile { | 22 class CC_EXPORT PicturePile { |
| 23 public: | 23 public: |
| 24 PicturePile(); | 24 PicturePile(); |
| 25 ~PicturePile(); | 25 ~PicturePile(); |
| 26 | 26 |
| 27 // Resize the PicturePile, invalidating / dropping recorded pictures as | 27 // Resize the PicturePile, invalidating / dropping recorded pictures as |
| 28 // necessary. | 28 // necessary. |
| 29 void Resize(gfx::Size); | 29 void Resize(gfx::Size); |
| 30 gfx::Size size() const { return size_; } | 30 gfx::Size size() const { return size_; } |
| 31 | 31 |
| 32 void SetMinContentsScale(float min_contents_scale); |
| 33 |
| 32 // Re-record parts of the picture that are invalid. | 34 // Re-record parts of the picture that are invalid. |
| 33 // Invalidations are in layer space. | 35 // Invalidations are in layer space. |
| 34 void Update( | 36 void Update( |
| 35 ContentLayerClient* painter, | 37 ContentLayerClient* painter, |
| 36 const Region& invalidation, | 38 const Region& invalidation, |
| 37 RenderingStats& stats); | 39 RenderingStats& stats); |
| 38 | 40 |
| 39 // Update other with a shallow copy of this (main => compositor thread commit) | 41 // Update other with a shallow copy of this (main => compositor thread commit) |
| 40 void PushPropertiesTo(PicturePileImpl* other); | 42 void PushPropertiesTo(PicturePileImpl* other); |
| 41 | 43 |
| 42 private: | 44 private: |
| 43 friend class PicturePileImpl; | 45 friend class PicturePileImpl; |
| 44 | 46 |
| 45 void InvalidateRect(gfx::Rect invalidation); | 47 void InvalidateRect(gfx::Rect invalidation); |
| 46 void ResetPile(ContentLayerClient* painter, RenderingStats& stats); | 48 void ResetPile(ContentLayerClient* painter, RenderingStats& stats); |
| 47 | 49 |
| 48 typedef std::list<scoped_refptr<Picture> > Pile; | 50 typedef std::list<scoped_refptr<Picture> > Pile; |
| 49 Pile pile_; | 51 Pile pile_; |
| 50 gfx::Size size_; | 52 gfx::Size size_; |
| 53 float min_contents_scale_; |
| 54 int buffer_pixels_; |
| 51 | 55 |
| 52 DISALLOW_COPY_AND_ASSIGN(PicturePile); | 56 DISALLOW_COPY_AND_ASSIGN(PicturePile); |
| 53 }; | 57 }; |
| 54 | 58 |
| 55 } // namespace cc | 59 } // namespace cc |
| 56 | 60 |
| 57 #endif // CC_PICTURE_PILE_H_ | 61 #endif // CC_PICTURE_PILE_H_ |
| OLD | NEW |