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
3 // found in the LICENSE file.
5 #ifndef CC_PICTURE_PILE_H_
6 #define CC_PICTURE_PILE_H_
8 #include "base/basictypes.h"
9 #include "cc/cc_export.h"
10 #include "cc/picture.h"
11 #include "cc/region.h"
12 #include "cc/scoped_ptr_vector.h"
13 #include "ui/gfx/rect.h"
14 #include "ui/gfx/size.h"
17 class PicturePileImpl
;
18 struct RenderingStats
;
20 class CC_EXPORT PicturePile
{
25 // Resize the PicturePile, invalidating / dropping recorded pictures as
27 void Resize(gfx::Size
);
28 gfx::Size
size() const { return size_
; }
30 // Re-record parts of the picture that are invalid.
31 // Invalidations are in layer space.
33 ContentLayerClient
* painter
,
34 const Region
& invalidation
,
35 RenderingStats
& stats
);
37 // Update other with a shallow copy of this (main => compositor thread commit)
38 void PushPropertiesTo(PicturePileImpl
* other
);
41 std::vector
<scoped_refptr
<Picture
> > pile_
;
44 DISALLOW_COPY_AND_ASSIGN(PicturePile
);
49 #endif // CC_PICTURE_PILE_H_