Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: cc/picture_pile_impl.h

Issue 11299324: Make PicturePile pile. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix signed/unsigned mismatch warning Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/picture_pile.cc ('k') | cc/picture_pile_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_IMPL_H_ 5 #ifndef CC_PICTURE_PILE_IMPL_H_
6 #define CC_PICTURE_PILE_IMPL_H_ 6 #define CC_PICTURE_PILE_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "cc/cc_export.h" 10 #include "cc/cc_export.h"
11 #include "cc/picture.h" 11 #include "cc/picture.h"
12 #include "cc/picture_pile.h"
12 #include "cc/scoped_ptr_vector.h" 13 #include "cc/scoped_ptr_vector.h"
13 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
14 15
15 namespace cc { 16 namespace cc {
16 class PicturePile;
17 struct RenderingStats; 17 struct RenderingStats;
18 18
19 class CC_EXPORT PicturePileImpl : public base::RefCounted<PicturePileImpl> { 19 class CC_EXPORT PicturePileImpl : public base::RefCounted<PicturePileImpl> {
20 public: 20 public:
21 static scoped_refptr<PicturePileImpl> Create(); 21 static scoped_refptr<PicturePileImpl> Create();
22 22
23 // Clone a paint-safe version of this picture. 23 // Clone a paint-safe version of this picture.
24 scoped_refptr<PicturePileImpl> CloneForDrawing() const; 24 scoped_refptr<PicturePileImpl> CloneForDrawing() const;
25 25
26 // Raster a subrect of this PicturePileImpl into the given canvas. 26 // Raster a subrect of this PicturePileImpl into the given canvas.
27 // It's only safe to call paint on a cloned version. 27 // It's only safe to call paint on a cloned version.
28 // It is assumed that contentsScale has already been applied to this canvas. 28 // It is assumed that contentsScale has already been applied to this canvas.
29 void Raster(SkCanvas* canvas, gfx::Rect rect, RenderingStats* stats); 29 void Raster(SkCanvas* canvas, gfx::Rect rect, RenderingStats* stats);
30 30
31 private: 31 private:
32 friend class PicturePile; 32 friend class PicturePile;
33 33
34 PicturePileImpl(); 34 PicturePileImpl();
35 ~PicturePileImpl(); 35 ~PicturePileImpl();
36 36
37 std::vector<scoped_refptr<Picture> > pile_; 37 PicturePile::Pile pile_;
38 38
39 friend class base::RefCounted<PicturePileImpl>; 39 friend class base::RefCounted<PicturePileImpl>;
40 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); 40 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl);
41 }; 41 };
42 42
43 } // namespace cc 43 } // namespace cc
44 44
45 #endif // CC_PICTURE_PILE_IMPL_H_ 45 #endif // CC_PICTURE_PILE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/picture_pile.cc ('k') | cc/picture_pile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698