OLD | NEW |
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 base { | |
14 namespace debug { | |
15 class TracedValue; | |
16 } | |
17 } | |
18 | |
19 namespace cc { | 13 namespace cc { |
20 | 14 |
21 class CC_EXPORT PictureLayerTilingSet { | 15 class CC_EXPORT PictureLayerTilingSet { |
22 public: | 16 public: |
23 PictureLayerTilingSet(PictureLayerTilingClient* client, | 17 PictureLayerTilingSet(PictureLayerTilingClient* client, |
24 const gfx::Size& layer_bounds); | 18 const gfx::Size& layer_bounds); |
25 ~PictureLayerTilingSet(); | 19 ~PictureLayerTilingSet(); |
26 | 20 |
27 void SetClient(PictureLayerTilingClient* client); | 21 void SetClient(PictureLayerTilingClient* client); |
28 const PictureLayerTilingClient* client() const { return client_; } | 22 const PictureLayerTilingClient* client() const { return client_; } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 float ideal_contents_scale_; | 94 float ideal_contents_scale_; |
101 PictureLayerTiling::CoverageIterator tiling_iter_; | 95 PictureLayerTiling::CoverageIterator tiling_iter_; |
102 int current_tiling_; | 96 int current_tiling_; |
103 int ideal_tiling_; | 97 int ideal_tiling_; |
104 | 98 |
105 Region current_region_; | 99 Region current_region_; |
106 Region missing_region_; | 100 Region missing_region_; |
107 Region::Iterator region_iter_; | 101 Region::Iterator region_iter_; |
108 }; | 102 }; |
109 | 103 |
110 void AsValueInto(base::debug::TracedValue* array) const; | 104 scoped_ptr<base::Value> AsValue() const; |
111 size_t GPUMemoryUsageInBytes() const; | 105 size_t GPUMemoryUsageInBytes() const; |
112 | 106 |
113 private: | 107 private: |
114 PictureLayerTilingClient* client_; | 108 PictureLayerTilingClient* client_; |
115 gfx::Size layer_bounds_; | 109 gfx::Size layer_bounds_; |
116 ScopedPtrVector<PictureLayerTiling> tilings_; | 110 ScopedPtrVector<PictureLayerTiling> tilings_; |
117 | 111 |
118 friend class Iterator; | 112 friend class Iterator; |
119 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); | 113 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); |
120 }; | 114 }; |
121 | 115 |
122 } // namespace cc | 116 } // namespace cc |
123 | 117 |
124 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ | 118 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
OLD | NEW |