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

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

Issue 1736073002: cc: Move SyncedScrollOffset to scroll tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and add comment Created 4 years, 9 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
« no previous file with comments | « cc/layers/picture_layer.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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 12 matching lines...) Expand all
23 namespace cc { 23 namespace cc {
24 24
25 struct AppendQuadsData; 25 struct AppendQuadsData;
26 class MicroBenchmarkImpl; 26 class MicroBenchmarkImpl;
27 class Tile; 27 class Tile;
28 28
29 class CC_EXPORT PictureLayerImpl 29 class CC_EXPORT PictureLayerImpl
30 : public LayerImpl, 30 : public LayerImpl,
31 NON_EXPORTED_BASE(public PictureLayerTilingClient) { 31 NON_EXPORTED_BASE(public PictureLayerTilingClient) {
32 public: 32 public:
33 static scoped_ptr<PictureLayerImpl> Create( 33 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl,
34 LayerTreeImpl* tree_impl, 34 int id,
35 int id, 35 bool is_mask) {
36 bool is_mask, 36 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id, is_mask));
37 scoped_refptr<SyncedScrollOffset> scroll_offset) {
38 return make_scoped_ptr(
39 new PictureLayerImpl(tree_impl, id, is_mask, scroll_offset));
40 } 37 }
41 ~PictureLayerImpl() override; 38 ~PictureLayerImpl() override;
42 39
43 bool is_mask() const { return is_mask_; } 40 bool is_mask() const { return is_mask_; }
44 41
45 // LayerImpl overrides. 42 // LayerImpl overrides.
46 const char* LayerTypeAsString() const override; 43 const char* LayerTypeAsString() const override;
47 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 44 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
48 void PushPropertiesTo(LayerImpl* layer) override; 45 void PushPropertiesTo(LayerImpl* layer) override;
49 void AppendQuads(RenderPass* render_pass, 46 void AppendQuads(RenderPass* render_pass,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 93
97 // Used for benchmarking 94 // Used for benchmarking
98 DisplayListRasterSource* GetRasterSource() const { 95 DisplayListRasterSource* GetRasterSource() const {
99 return raster_source_.get(); 96 return raster_source_.get();
100 } 97 }
101 98
102 protected: 99 protected:
103 friend class LayerRasterTileIterator; 100 friend class LayerRasterTileIterator;
104 using TileRequirementCheck = bool (PictureLayerTiling::*)(const Tile*) const; 101 using TileRequirementCheck = bool (PictureLayerTiling::*)(const Tile*) const;
105 102
106 PictureLayerImpl(LayerTreeImpl* tree_impl, 103 PictureLayerImpl(LayerTreeImpl* tree_impl, int id, bool is_mask);
107 int id,
108 bool is_mask,
109 scoped_refptr<SyncedScrollOffset> scroll_offset);
110 PictureLayerTiling* AddTiling(float contents_scale); 104 PictureLayerTiling* AddTiling(float contents_scale);
111 void RemoveAllTilings(); 105 void RemoveAllTilings();
112 void AddTilingsForRasterScale(); 106 void AddTilingsForRasterScale();
113 void AddLowResolutionTilingIfNeeded(); 107 void AddLowResolutionTilingIfNeeded();
114 virtual bool ShouldAdjustRasterScale() const; 108 virtual bool ShouldAdjustRasterScale() const;
115 virtual void RecalculateRasterScales(); 109 virtual void RecalculateRasterScales();
116 void CleanUpTilingsOnActiveLayer( 110 void CleanUpTilingsOnActiveLayer(
117 const std::vector<PictureLayerTiling*>& used_tilings); 111 const std::vector<PictureLayerTiling*>& used_tilings);
118 float MinimumContentsScale() const; 112 float MinimumContentsScale() const;
119 float MaximumContentsScale() const; 113 float MaximumContentsScale() const;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // of comparing pointers, since objects pointed to are not guaranteed to 162 // of comparing pointers, since objects pointed to are not guaranteed to
169 // exist. 163 // exist.
170 std::vector<PictureLayerTiling*> last_append_quads_tilings_; 164 std::vector<PictureLayerTiling*> last_append_quads_tilings_;
171 165
172 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 166 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
173 }; 167 };
174 168
175 } // namespace cc 169 } // namespace cc
176 170
177 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 171 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698