Add intro to any Chrome app API with no overview docs.
[chromium-blink-merge.git] / cc / picture_pile.h
blob892fc392ac1eeb1a2afedf8c27491482308f91b9
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"
16 namespace cc {
17 class PicturePileImpl;
18 struct RenderingStats;
20 class CC_EXPORT PicturePile {
21 public:
22 PicturePile();
23 ~PicturePile();
25 // Resize the PicturePile, invalidating / dropping recorded pictures as
26 // necessary.
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.
32 void Update(
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);
40 private:
41 std::vector<scoped_refptr<Picture> > pile_;
42 gfx::Size size_;
44 DISALLOW_COPY_AND_ASSIGN(PicturePile);
47 } // namespace cc
49 #endif // CC_PICTURE_PILE_H_