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

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

Issue 294463002: cc: Reset raster scale if we didn't sync high res tiling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more comments Created 6 years, 7 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/layers/picture_layer_impl_unittest.cc ('k') | cc/resources/picture_layer_tiling_set.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_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 PictureLayerTilingSet(PictureLayerTilingClient* client, 17 PictureLayerTilingSet(PictureLayerTilingClient* client,
18 const gfx::Size& layer_bounds); 18 const gfx::Size& layer_bounds);
19 ~PictureLayerTilingSet(); 19 ~PictureLayerTilingSet();
20 20
21 void SetClient(PictureLayerTilingClient* client); 21 void SetClient(PictureLayerTilingClient* client);
22 const PictureLayerTilingClient* client() const { return client_; } 22 const PictureLayerTilingClient* client() const { return client_; }
23 23
24 // Make this set of tilings match the same set of content scales from |other|. 24 // Make this set of tilings match the same set of content scales from |other|.
25 // Delete any tilings that don't meet |minimum_contents_scale|. Recreate 25 // Delete any tilings that don't meet |minimum_contents_scale|. Recreate
26 // any tiles that intersect |layer_invalidation|. Update the size of all 26 // any tiles that intersect |layer_invalidation|. Update the size of all
27 // tilings to |new_layer_bounds|. 27 // tilings to |new_layer_bounds|.
28 void SyncTilings( 28 // Returns true if we had at least one high res tiling synced.
29 const PictureLayerTilingSet& other, 29 bool SyncTilings(const PictureLayerTilingSet& other,
30 const gfx::Size& new_layer_bounds, 30 const gfx::Size& new_layer_bounds,
31 const Region& layer_invalidation, 31 const Region& layer_invalidation,
32 float minimum_contents_scale); 32 float minimum_contents_scale);
33 33
34 void RemoveTilesInRegion(const Region& region); 34 void RemoveTilesInRegion(const Region& region);
35 35
36 gfx::Size layer_bounds() const { return layer_bounds_; } 36 gfx::Size layer_bounds() const { return layer_bounds_; }
37 37
38 void SetCanUseLCDText(bool can_use_lcd_text); 38 void SetCanUseLCDText(bool can_use_lcd_text);
39 39
40 PictureLayerTiling* AddTiling(float contents_scale); 40 PictureLayerTiling* AddTiling(float contents_scale);
41 size_t num_tilings() const { return tilings_.size(); } 41 size_t num_tilings() const { return tilings_.size(); }
42 int NumHighResTilings() const; 42 int NumHighResTilings() const;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 gfx::Size layer_bounds_; 116 gfx::Size layer_bounds_;
117 ScopedPtrVector<PictureLayerTiling> tilings_; 117 ScopedPtrVector<PictureLayerTiling> tilings_;
118 118
119 friend class Iterator; 119 friend class Iterator;
120 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); 120 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet);
121 }; 121 };
122 122
123 } // namespace cc 123 } // namespace cc
124 124
125 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ 125 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/resources/picture_layer_tiling_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698