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

Side by Side Diff: cc/tiles/picture_layer_tiling_set.h

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 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
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_TILES_PICTURE_LAYER_TILING_SET_H_ 5 #ifndef CC_TILES_PICTURE_LAYER_TILING_SET_H_
6 #define CC_TILES_PICTURE_LAYER_TILING_SET_H_ 6 #define CC_TILES_PICTURE_LAYER_TILING_SET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
11 #include "cc/base/region.h" 11 #include "cc/base/region.h"
12 #include "cc/base/scoped_ptr_vector.h"
13 #include "cc/tiles/picture_layer_tiling.h" 12 #include "cc/tiles/picture_layer_tiling.h"
14 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
15 14
16 namespace base { 15 namespace base {
17 namespace trace_event { 16 namespace trace_event {
18 class TracedValue; 17 class TracedValue;
19 } 18 }
20 } 19 }
21 20
22 namespace cc { 21 namespace cc {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // This function is called on the sync tree right after commit. 71 // This function is called on the sync tree right after commit.
73 void UpdateRasterSourceDueToLCDChange( 72 void UpdateRasterSourceDueToLCDChange(
74 const scoped_refptr<DisplayListRasterSource>& raster_source, 73 const scoped_refptr<DisplayListRasterSource>& raster_source,
75 const Region& layer_invalidation); 74 const Region& layer_invalidation);
76 75
77 PictureLayerTiling* AddTiling( 76 PictureLayerTiling* AddTiling(
78 float contents_scale, 77 float contents_scale,
79 scoped_refptr<DisplayListRasterSource> raster_source); 78 scoped_refptr<DisplayListRasterSource> raster_source);
80 size_t num_tilings() const { return tilings_.size(); } 79 size_t num_tilings() const { return tilings_.size(); }
81 int NumHighResTilings() const; 80 int NumHighResTilings() const;
82 PictureLayerTiling* tiling_at(size_t idx) { return tilings_[idx]; } 81 PictureLayerTiling* tiling_at(size_t idx) { return tilings_[idx].get(); }
83 const PictureLayerTiling* tiling_at(size_t idx) const { 82 const PictureLayerTiling* tiling_at(size_t idx) const {
84 return tilings_[idx]; 83 return tilings_[idx].get();
85 } 84 }
86 WhichTree tree() const { return tree_; } 85 WhichTree tree() const { return tree_; }
87 86
88 PictureLayerTiling* FindTilingWithScale(float scale) const; 87 PictureLayerTiling* FindTilingWithScale(float scale) const;
89 PictureLayerTiling* FindTilingWithResolution(TileResolution resolution) const; 88 PictureLayerTiling* FindTilingWithResolution(TileResolution resolution) const;
90 89
91 void MarkAllTilingsNonIdeal(); 90 void MarkAllTilingsNonIdeal();
92 91
93 // If a tiling exists whose scale is within |snap_to_existing_tiling_ratio| 92 // If a tiling exists whose scale is within |snap_to_existing_tiling_ratio|
94 // ratio of |start_scale|, then return that tiling's scale. Otherwise, return 93 // ratio of |start_scale|, then return that tiling's scale. Otherwise, return
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 180
182 void CopyTilingsAndPropertiesFromPendingTwin( 181 void CopyTilingsAndPropertiesFromPendingTwin(
183 const PictureLayerTilingSet* pending_twin_set, 182 const PictureLayerTilingSet* pending_twin_set,
184 const scoped_refptr<DisplayListRasterSource>& raster_source, 183 const scoped_refptr<DisplayListRasterSource>& raster_source,
185 const Region& layer_invalidation); 184 const Region& layer_invalidation);
186 185
187 // Remove one tiling. 186 // Remove one tiling.
188 void Remove(PictureLayerTiling* tiling); 187 void Remove(PictureLayerTiling* tiling);
189 void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const; 188 void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const;
190 189
191 ScopedPtrVector<PictureLayerTiling> tilings_; 190 std::vector<scoped_ptr<PictureLayerTiling>> tilings_;
192 191
193 const size_t tiling_interest_area_padding_; 192 const size_t tiling_interest_area_padding_;
194 const float skewport_target_time_in_seconds_; 193 const float skewport_target_time_in_seconds_;
195 const int skewport_extrapolation_limit_in_content_pixels_; 194 const int skewport_extrapolation_limit_in_content_pixels_;
196 WhichTree tree_; 195 WhichTree tree_;
197 PictureLayerTilingClient* client_; 196 PictureLayerTilingClient* client_;
198 197
199 friend class Iterator; 198 friend class Iterator;
200 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); 199 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet);
201 }; 200 };
202 201
203 } // namespace cc 202 } // namespace cc
204 203
205 #endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_ 204 #endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698