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

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

Issue 12865017: Makes tile-creation lazy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a bug fix and removal of several now useless functions Created 7 years, 8 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
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_RESOURCES_PICTURE_LAYER_TILING_SET_H_ 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
7 7
8 #include "cc/base/region.h" 8 #include "cc/base/region.h"
9 #include "cc/base/scoped_ptr_vector.h" 9 #include "cc/base/scoped_ptr_vector.h"
10 #include "cc/resources/picture_layer_tiling.h" 10 #include "cc/resources/picture_layer_tiling.h"
11 #include "ui/gfx/size.h" 11 #include "ui/gfx/size.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 class CC_EXPORT PictureLayerTilingSet { 15 class CC_EXPORT PictureLayerTilingSet {
16 public: 16 public:
17 explicit PictureLayerTilingSet(PictureLayerTilingClient* client); 17 explicit PictureLayerTilingSet(PictureLayerTilingClient* client);
18 ~PictureLayerTilingSet(); 18 ~PictureLayerTilingSet();
19 19
20 void SetClient(PictureLayerTilingClient* client); 20 void SetClient(PictureLayerTilingClient* client);
21 21
22 // Shallow copies all data (except client and bounds from other). 22 // Shallow copies all data (except client and bounds from other).
23 void CloneAll( 23 void CloneAll(
24 const PictureLayerTilingSet& other, 24 const PictureLayerTilingSet& other,
25 const Region& invalidation,
26 float minimum_contents_scale); 25 float minimum_contents_scale);
27 void Clone(const PictureLayerTiling* tiling, const Region& invalidation); 26 void Clone(const PictureLayerTiling* tiling);
28 27
29 void SetLayerBounds(gfx::Size layer_bounds); 28 void SetLayerBounds(gfx::Size layer_bounds);
30 gfx::Size LayerBounds() const; 29 gfx::Size LayerBounds() const;
31 30
32 void Invalidate(const Region& layer_invalidation);
33
34 PictureLayerTiling* AddTiling(float contents_scale); 31 PictureLayerTiling* AddTiling(float contents_scale);
35 size_t num_tilings() const { return tilings_.size(); } 32 size_t num_tilings() const { return tilings_.size(); }
36 PictureLayerTiling* tiling_at(size_t idx) { return tilings_[idx]; } 33 PictureLayerTiling* tiling_at(size_t idx) { return tilings_[idx]; }
37 const PictureLayerTiling* tiling_at(size_t idx) const { 34 const PictureLayerTiling* tiling_at(size_t idx) const {
38 return tilings_[idx]; 35 return tilings_[idx];
39 } 36 }
40 37
41 // Remove all tilings. 38 // Remove all tilings.
42 void RemoveAllTilings(); 39 void RemoveAllTilings();
43 40
44 // Remove one tiling. 41 // Remove one tiling.
45 void Remove(PictureLayerTiling* tiling); 42 void Remove(PictureLayerTiling* tiling);
46 43
47 // Remove all tiles; keep all tilings. 44 // Remove all tiles; keep all tilings.
48 void RemoveAllTiles(); 45 void RemoveAllTiles();
49 46
50 // For all tilings, create any tile that intersects |layer_rect|.
51 void CreateTilesFromLayerRect(gfx::Rect layer_rect);
52
53 void UpdateTilePriorities( 47 void UpdateTilePriorities(
54 WhichTree tree, 48 WhichTree tree,
55 gfx::Size device_viewport, 49 gfx::Size device_viewport,
56 gfx::Rect viewport_in_content_space, 50 gfx::Rect viewport_in_content_space,
57 gfx::Size last_layer_bounds, 51 gfx::Size last_layer_bounds,
58 gfx::Size current_layer_bounds, 52 gfx::Size current_layer_bounds,
59 float last_layer_contents_scale, 53 float last_layer_contents_scale,
60 float current_layer_contents_scale, 54 float current_layer_contents_scale,
61 const gfx::Transform& last_screen_transform, 55 const gfx::Transform& last_screen_transform,
62 const gfx::Transform& current_screen_transform, 56 const gfx::Transform& current_screen_transform,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 gfx::Size layer_bounds_; 112 gfx::Size layer_bounds_;
119 ScopedPtrVector<PictureLayerTiling> tilings_; 113 ScopedPtrVector<PictureLayerTiling> tilings_;
120 114
121 friend class Iterator; 115 friend class Iterator;
122 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); 116 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet);
123 }; 117 };
124 118
125 } // namespace cc 119 } // namespace cc
126 120
127 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ 121 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698