| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 bool has_external_content() { | 280 bool has_external_content() { |
| 281 return texture_layer_.get() || delegated_renderer_layer_.get() || | 281 return texture_layer_.get() || delegated_renderer_layer_.get() || |
| 282 surface_layer_.get(); | 282 surface_layer_.get(); |
| 283 } | 283 } |
| 284 | 284 |
| 285 void SetShowPaintedContent(); | 285 void SetShowPaintedContent(); |
| 286 | 286 |
| 287 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 287 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
| 288 void SetColor(SkColor color); | 288 void SetColor(SkColor color); |
| 289 | 289 |
| 290 // Updates the nine patch layer's bitmap and aperture. May only be called for | 290 // Updates the nine patch layer's bitmap, aperture and border. May only be |
| 291 // LAYER_NINE_PATCH. | 291 // called for LAYER_NINE_PATCH. |
| 292 void UpdateNinePatchLayerBitmap(const SkBitmap& bitmap, | 292 void UpdateNinePatchLayerBitmap(const SkBitmap& bitmap); |
| 293 const gfx::Rect& aperture); | 293 void UpdateNinePatchLayerAperture(const gfx::Rect& aperture); |
| 294 | |
| 295 // Updates the nine patch layer's border. May only be called for | |
| 296 // LAYER_NINE_PATCH. | |
| 297 void UpdateNinePatchLayerBorder(const gfx::Rect& border); | 294 void UpdateNinePatchLayerBorder(const gfx::Rect& border); |
| 298 | 295 |
| 299 // Adds |invalid_rect| to the Layer's pending invalid rect and calls | 296 // Adds |invalid_rect| to the Layer's pending invalid rect and calls |
| 300 // ScheduleDraw(). Returns false if the paint request is ignored. | 297 // ScheduleDraw(). Returns false if the paint request is ignored. |
| 301 bool SchedulePaint(const gfx::Rect& invalid_rect); | 298 bool SchedulePaint(const gfx::Rect& invalid_rect); |
| 302 | 299 |
| 303 // Schedules a redraw of the layer tree at the compositor. | 300 // Schedules a redraw of the layer tree at the compositor. |
| 304 // Note that this _does not_ invalidate any region of this layer; use | 301 // Note that this _does not_ invalidate any region of this layer; use |
| 305 // SchedulePaint() for that. | 302 // SchedulePaint() for that. |
| 306 void ScheduleDraw(); | 303 void ScheduleDraw(); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 509 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 513 // or SetTextureMailbox was called. | 510 // or SetTextureMailbox was called. |
| 514 gfx::Size frame_size_in_dip_; | 511 gfx::Size frame_size_in_dip_; |
| 515 | 512 |
| 516 DISALLOW_COPY_AND_ASSIGN(Layer); | 513 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 517 }; | 514 }; |
| 518 | 515 |
| 519 } // namespace ui | 516 } // namespace ui |
| 520 | 517 |
| 521 #endif // UI_COMPOSITOR_LAYER_H_ | 518 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |