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

Side by Side Diff: cc/picture.h

Issue 11265046: cc: Add some impl-side painting stub classes and APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « cc/cc.gyp ('k') | cc/picture.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef CC_PICTURE_H_
6 #define CC_PICTURE_H_
7
8 #include "base/basictypes.h"
9 #include "cc/cc_export.h"
10 #include "cc/picture_record.h"
11 #include "cc/scoped_ptr_vector.h"
12 #include "ui/gfx/rect.h"
13 #include "ui/gfx/size.h"
14
15 namespace cc {
16
17 class CC_EXPORT Picture {
18 public:
19 Picture();
20 ~Picture();
21
22 // Mark a portion of the Picture as invalid and needing to be re-recorded
23 // the next time update is called.
24 void invalidate(gfx::Rect);
25
26 // Resize the Picture, invalidating / dropping recorded pictures as necessary.
27 void resize(gfx::Size);
28
29 // Rerecord parts of the picture that are invalid.
30 void update(ContentLayerClient* painter);
31
32 // Update other with a shallow copy of this (main => compositor thread commit)
33 void pushPropertiesTo(Picture& other);
34
35 // Clone a paint-safe version of this picture (with cloned PictureRecords)
nduca 2012/11/08 00:49:35 lets add this method later when we wrap our head a
36 scoped_ptr<Picture> cloneForDrawing(gfx::Rect rect);
37
38 // Raster a subrect of this Picture into the given canvas.
39 // It's only safe to call paint on a cloned version.
40 void paint(SkCanvas* canvas, gfx::Rect rect);
41
42 protected:
43 std::vector<scoped_refptr<PictureRecord> > pile_;
44 gfx::Size size_;
45
46 DISALLOW_COPY_AND_ASSIGN(Picture);
47 };
48
49 } // namespace cc
50
51 #endif // CC_PICTURE_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698