| 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_GFX_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_GFX_COMPOSITOR_LAYER_H_ |
| 6 #define UI_GFX_COMPOSITOR_LAYER_H_ | 6 #define UI_GFX_COMPOSITOR_LAYER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 void set_name(const std::string& name) { name_ = name; } | 164 void set_name(const std::string& name) { name_ = name; } |
| 165 | 165 |
| 166 const ui::Texture* texture() const { return texture_.get(); } | 166 const ui::Texture* texture() const { return texture_.get(); } |
| 167 | 167 |
| 168 // Assigns a new external texture. |texture| can be NULL to disable external | 168 // Assigns a new external texture. |texture| can be NULL to disable external |
| 169 // updates. | 169 // updates. |
| 170 // TODO(beng): This can be removed from the API when we are in a | 170 // TODO(beng): This can be removed from the API when we are in a |
| 171 // single-compositor world. | 171 // single-compositor world. |
| 172 void SetExternalTexture(ui::Texture* texture); | 172 void SetExternalTexture(ui::Texture* texture); |
| 173 | 173 |
| 174 // Resets the canvas of the texture. May only be called for LAYER_TEXTURED. | |
| 175 void SetCanvas(const SkCanvas& canvas, const gfx::Point& origin); | |
| 176 | |
| 177 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 174 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
| 178 void SetColor(SkColor color); | 175 void SetColor(SkColor color); |
| 179 | 176 |
| 180 // Adds |invalid_rect| to the Layer's pending invalid rect and calls | 177 // Adds |invalid_rect| to the Layer's pending invalid rect and calls |
| 181 // ScheduleDraw(). | 178 // ScheduleDraw(). |
| 182 void SchedulePaint(const gfx::Rect& invalid_rect); | 179 void SchedulePaint(const gfx::Rect& invalid_rect); |
| 183 | 180 |
| 184 // Schedules a redraw of the layer tree at the compositor. | 181 // Schedules a redraw of the layer tree at the compositor. |
| 185 void ScheduleDraw(); | 182 void ScheduleDraw(); |
| 186 | 183 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 WebKit::WebLayer web_layer_; | 278 WebKit::WebLayer web_layer_; |
| 282 bool web_layer_is_accelerated_; | 279 bool web_layer_is_accelerated_; |
| 283 bool show_debug_borders_; | 280 bool show_debug_borders_; |
| 284 | 281 |
| 285 DISALLOW_COPY_AND_ASSIGN(Layer); | 282 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 286 }; | 283 }; |
| 287 | 284 |
| 288 } // namespace ui | 285 } // namespace ui |
| 289 | 286 |
| 290 #endif // UI_GFX_COMPOSITOR_LAYER_H_ | 287 #endif // UI_GFX_COMPOSITOR_LAYER_H_ |
| OLD | NEW |