OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 UI_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_H_ |
6 #define UI_COMPOSITOR_LAYER_H_ | 6 #define UI_COMPOSITOR_LAYER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 bool fills_bounds_opaquely() const { return fills_bounds_opaquely_; } | 213 bool fills_bounds_opaquely() const { return fills_bounds_opaquely_; } |
214 | 214 |
215 const std::string& name() const { return name_; } | 215 const std::string& name() const { return name_; } |
216 void set_name(const std::string& name) { name_ = name; } | 216 void set_name(const std::string& name) { name_ = name; } |
217 | 217 |
218 const ui::Texture* texture() const { return texture_.get(); } | 218 const ui::Texture* texture() const { return texture_.get(); } |
219 | 219 |
220 // Assigns a new external texture. |texture| can be NULL to disable external | 220 // Assigns a new external texture. |texture| can be NULL to disable external |
221 // updates. | 221 // updates. |
222 void SetExternalTexture(ui::Texture* texture); | 222 void SetExternalTexture(ui::Texture* texture); |
| 223 ui::Texture* external_texture() { return texture_.get(); } |
223 | 224 |
224 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 225 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
225 void SetColor(SkColor color); | 226 void SetColor(SkColor color); |
226 | 227 |
227 // Adds |invalid_rect| to the Layer's pending invalid rect and calls | 228 // Adds |invalid_rect| to the Layer's pending invalid rect and calls |
228 // ScheduleDraw(). Returns false if the paint request is ignored. | 229 // ScheduleDraw(). Returns false if the paint request is ignored. |
229 bool SchedulePaint(const gfx::Rect& invalid_rect); | 230 bool SchedulePaint(const gfx::Rect& invalid_rect); |
230 | 231 |
231 // Schedules a redraw of the layer tree at the compositor. | 232 // Schedules a redraw of the layer tree at the compositor. |
232 // Note that this _does not_ invalidate any region of this layer; use | 233 // Note that this _does not_ invalidate any region of this layer; use |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 393 |
393 // A cached copy of |Compositor::device_scale_factor()|. | 394 // A cached copy of |Compositor::device_scale_factor()|. |
394 float device_scale_factor_; | 395 float device_scale_factor_; |
395 | 396 |
396 DISALLOW_COPY_AND_ASSIGN(Layer); | 397 DISALLOW_COPY_AND_ASSIGN(Layer); |
397 }; | 398 }; |
398 | 399 |
399 } // namespace ui | 400 } // namespace ui |
400 | 401 |
401 #endif // UI_COMPOSITOR_LAYER_H_ | 402 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |