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

Side by Side Diff: cc/picture_layer_impl.h

Issue 11731002: Implement a method to access the non-composited content root layer picture pile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. Created 7 years, 11 months 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/picture.h ('k') | cc/picture_layer_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_LAYER_IMPL_H_ 5 #ifndef CC_PICTURE_LAYER_IMPL_H_
6 #define CC_PICTURE_LAYER_IMPL_H_ 6 #define CC_PICTURE_LAYER_IMPL_H_
7 7
8 #include "cc/layer_impl.h" 8 #include "cc/layer_impl.h"
9 #include "cc/picture_layer_tiling.h" 9 #include "cc/picture_layer_tiling.h"
10 #include "cc/picture_layer_tiling_set.h" 10 #include "cc/picture_layer_tiling_set.h"
11 #include "cc/picture_pile_impl.h" 11 #include "cc/picture_pile_impl.h"
12 #include "cc/scoped_ptr_vector.h" 12 #include "cc/scoped_ptr_vector.h"
13 #include "skia/ext/refptr.h"
14 #include "third_party/skia/include/core/SkPicture.h"
13 15
14 namespace cc { 16 namespace cc {
15 17
16 struct AppendQuadsData; 18 struct AppendQuadsData;
17 class QuadSink; 19 class QuadSink;
18 20
19 class CC_EXPORT PictureLayerImpl : public LayerImpl, 21 class CC_EXPORT PictureLayerImpl : public LayerImpl,
20 public PictureLayerTilingClient { 22 public PictureLayerTilingClient {
21 public: 23 public:
22 static scoped_ptr<PictureLayerImpl> create(LayerTreeImpl* treeImpl, int id) 24 static scoped_ptr<PictureLayerImpl> create(LayerTreeImpl* treeImpl, int id)
23 { 25 {
24 return make_scoped_ptr(new PictureLayerImpl(treeImpl, id)); 26 return make_scoped_ptr(new PictureLayerImpl(treeImpl, id));
25 } 27 }
26 virtual ~PictureLayerImpl(); 28 virtual ~PictureLayerImpl();
27 29
28 // LayerImpl overrides. 30 // LayerImpl overrides.
29 virtual const char* layerTypeAsString() const OVERRIDE; 31 virtual const char* layerTypeAsString() const OVERRIDE;
30 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; 32 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE;
31 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; 33 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE;
32 virtual void didUpdateTransforms() OVERRIDE; 34 virtual void didUpdateTransforms() OVERRIDE;
33 virtual void calculateContentsScale( 35 virtual void calculateContentsScale(
34 float ideal_contents_scale, 36 float ideal_contents_scale,
35 float* contents_scale_x, 37 float* contents_scale_x,
36 float* contents_scale_y, 38 float* contents_scale_y,
37 gfx::Size* content_bounds) OVERRIDE; 39 gfx::Size* content_bounds) OVERRIDE;
40 virtual skia::RefPtr<SkPicture> getPicture() OVERRIDE;
38 41
39 // PictureLayerTilingClient overrides. 42 // PictureLayerTilingClient overrides.
40 virtual scoped_refptr<Tile> CreateTile(PictureLayerTiling*, 43 virtual scoped_refptr<Tile> CreateTile(PictureLayerTiling*,
41 gfx::Rect) OVERRIDE; 44 gfx::Rect) OVERRIDE;
42 45
43 // PushPropertiesTo active tree => pending tree 46 // PushPropertiesTo active tree => pending tree
44 void SyncFromActiveLayer(); 47 void SyncFromActiveLayer();
45 void SyncTiling(const PictureLayerTiling* tiling); 48 void SyncTiling(const PictureLayerTiling* tiling);
46 49
47 // Mask-related functions 50 // Mask-related functions
(...skipping 19 matching lines...) Expand all
67 float last_content_scale_y_; 70 float last_content_scale_y_;
68 bool is_mask_; 71 bool is_mask_;
69 72
70 friend class PictureLayer; 73 friend class PictureLayer;
71 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 74 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
72 }; 75 };
73 76
74 } 77 }
75 78
76 #endif // CC_PICTURE_LAYER_IMPL_H_ 79 #endif // CC_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/picture.h ('k') | cc/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698