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