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

Side by Side Diff: cc/layers/picture_layer_impl.h

Issue 67563002: cc: Plumbing for impl thread micro benchmarks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: speculative fix Created 7 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/layers/layer_impl.cc ('k') | cc/layers/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_LAYERS_PICTURE_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_
6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/base/scoped_ptr_vector.h" 12 #include "cc/base/scoped_ptr_vector.h"
13 #include "cc/layers/layer_impl.h" 13 #include "cc/layers/layer_impl.h"
14 #include "cc/resources/picture_layer_tiling.h" 14 #include "cc/resources/picture_layer_tiling.h"
15 #include "cc/resources/picture_layer_tiling_set.h" 15 #include "cc/resources/picture_layer_tiling_set.h"
16 #include "cc/resources/picture_pile_impl.h" 16 #include "cc/resources/picture_pile_impl.h"
17 #include "skia/ext/refptr.h" 17 #include "skia/ext/refptr.h"
18 #include "third_party/skia/include/core/SkPicture.h" 18 #include "third_party/skia/include/core/SkPicture.h"
19 19
20 namespace cc { 20 namespace cc {
21 21
22 struct AppendQuadsData; 22 struct AppendQuadsData;
23 class QuadSink; 23 class QuadSink;
24 class MicroBenchmarkImpl;
24 25
25 class CC_EXPORT PictureLayerImpl 26 class CC_EXPORT PictureLayerImpl
26 : public LayerImpl, 27 : public LayerImpl,
27 NON_EXPORTED_BASE(public PictureLayerTilingClient) { 28 NON_EXPORTED_BASE(public PictureLayerTilingClient) {
28 public: 29 public:
29 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { 30 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
30 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); 31 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id));
31 } 32 }
32 virtual ~PictureLayerImpl(); 33 virtual ~PictureLayerImpl();
33 34
(...skipping 29 matching lines...) Expand all
63 64
64 // PushPropertiesTo active tree => pending tree. 65 // PushPropertiesTo active tree => pending tree.
65 void SyncTiling(const PictureLayerTiling* tiling); 66 void SyncTiling(const PictureLayerTiling* tiling);
66 67
67 // Mask-related functions 68 // Mask-related functions
68 void SetIsMask(bool is_mask); 69 void SetIsMask(bool is_mask);
69 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE; 70 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE;
70 71
71 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; 72 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE;
72 73
74 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE;
75
73 protected: 76 protected:
74 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); 77 PictureLayerImpl(LayerTreeImpl* tree_impl, int id);
75 PictureLayerTiling* AddTiling(float contents_scale); 78 PictureLayerTiling* AddTiling(float contents_scale);
76 void RemoveTiling(float contents_scale); 79 void RemoveTiling(float contents_scale);
77 void SyncFromActiveLayer(const PictureLayerImpl* other); 80 void SyncFromActiveLayer(const PictureLayerImpl* other);
78 void ManageTilings(bool animating_transform_to_screen); 81 void ManageTilings(bool animating_transform_to_screen);
79 virtual bool ShouldAdjustRasterScale( 82 virtual bool ShouldAdjustRasterScale(
80 bool animating_transform_to_screen) const; 83 bool animating_transform_to_screen) const;
81 virtual void CalculateRasterContentsScale( 84 virtual void CalculateRasterContentsScale(
82 bool animating_transform_to_screen, 85 bool animating_transform_to_screen,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // after a CalculateContentsScale/ManageTilings. 134 // after a CalculateContentsScale/ManageTilings.
132 bool should_update_tile_priorities_; 135 bool should_update_tile_priorities_;
133 136
134 friend class PictureLayer; 137 friend class PictureLayer;
135 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 138 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
136 }; 139 };
137 140
138 } // namespace cc 141 } // namespace cc
139 142
140 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 143 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698