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_TILES_TILE_H_ | 5 #ifndef CC_TILES_TILE_H_ |
6 #define CC_TILES_TILE_H_ | 6 #define CC_TILES_TILE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 bool is_opaque() const { return !!(flags_ & IS_OPAQUE); } | 72 bool is_opaque() const { return !!(flags_ & IS_OPAQUE); } |
73 | 73 |
74 void AsValueInto(base::trace_event::TracedValue* value) const; | 74 void AsValueInto(base::trace_event::TracedValue* value) const; |
75 | 75 |
76 const TileDrawInfo& draw_info() const { return draw_info_; } | 76 const TileDrawInfo& draw_info() const { return draw_info_; } |
77 TileDrawInfo& draw_info() { return draw_info_; } | 77 TileDrawInfo& draw_info() { return draw_info_; } |
78 | 78 |
79 float contents_scale_key() const { return raster_transform_.scale(); } | 79 float contents_scale_key() const { return raster_transform_.scale(); } |
80 const ScaleTranslate2d& raster_transform() const { | 80 const ScaleTranslate2d& raster_transform() const { return raster_transform_; } |
81 return raster_transform_; | |
82 } | |
83 const gfx::Rect& content_rect() const { return content_rect_; } | 81 const gfx::Rect& content_rect() const { return content_rect_; } |
84 const gfx::Rect& enclosing_layer_rect() const { | 82 const gfx::Rect& enclosing_layer_rect() const { |
85 return enclosing_layer_rect_; | 83 return enclosing_layer_rect_; |
86 } | 84 } |
87 | 85 |
88 int layer_id() const { return layer_id_; } | 86 int layer_id() const { return layer_id_; } |
89 | 87 |
90 int source_frame_number() const { return source_frame_number_; } | 88 int source_frame_number() const { return source_frame_number_; } |
91 | 89 |
92 size_t GPUMemoryUsageInBytes() const; | 90 size_t GPUMemoryUsageInBytes() const; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 scoped_refptr<TileTask> raster_task_; | 155 scoped_refptr<TileTask> raster_task_; |
158 | 156 |
159 DISALLOW_COPY_AND_ASSIGN(Tile); | 157 DISALLOW_COPY_AND_ASSIGN(Tile); |
160 }; | 158 }; |
161 | 159 |
162 using ScopedTilePtr = std::unique_ptr<Tile, Tile::Deleter>; | 160 using ScopedTilePtr = std::unique_ptr<Tile, Tile::Deleter>; |
163 | 161 |
164 } // namespace cc | 162 } // namespace cc |
165 | 163 |
166 #endif // CC_TILES_TILE_H_ | 164 #endif // CC_TILES_TILE_H_ |
OLD | NEW |