| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 314 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
| 315 void SetColor(SkColor color); | 315 void SetColor(SkColor color); |
| 316 SkColor GetTargetColor(); | 316 SkColor GetTargetColor(); |
| 317 SkColor background_color() const; | 317 SkColor background_color() const; |
| 318 | 318 |
| 319 // Updates the nine patch layer's image, aperture and border. May only be | 319 // Updates the nine patch layer's image, aperture and border. May only be |
| 320 // called for LAYER_NINE_PATCH. | 320 // called for LAYER_NINE_PATCH. |
| 321 void UpdateNinePatchLayerImage(const gfx::ImageSkia& image); | 321 void UpdateNinePatchLayerImage(const gfx::ImageSkia& image); |
| 322 void UpdateNinePatchLayerAperture(const gfx::Rect& aperture_in_dip); | 322 void UpdateNinePatchLayerAperture(const gfx::Rect& aperture_in_dip); |
| 323 void UpdateNinePatchLayerBorder(const gfx::Rect& border); | 323 void UpdateNinePatchLayerBorder(const gfx::Rect& border); |
| 324 // Updates the area completely occluded by another layer, this can be an |
| 325 // empty rectangle if nothing is occluded. |
| 326 void UpdateNinePatchOcclusion(const gfx::Rect& occlusion); |
| 324 | 327 |
| 325 // Adds |invalid_rect| to the Layer's pending invalid rect and calls | 328 // Adds |invalid_rect| to the Layer's pending invalid rect and calls |
| 326 // ScheduleDraw(). Returns false if the paint request is ignored. | 329 // ScheduleDraw(). Returns false if the paint request is ignored. |
| 327 bool SchedulePaint(const gfx::Rect& invalid_rect); | 330 bool SchedulePaint(const gfx::Rect& invalid_rect); |
| 328 | 331 |
| 329 // Schedules a redraw of the layer tree at the compositor. | 332 // Schedules a redraw of the layer tree at the compositor. |
| 330 // Note that this _does not_ invalidate any region of this layer; use | 333 // Note that this _does not_ invalidate any region of this layer; use |
| 331 // SchedulePaint() for that. | 334 // SchedulePaint() for that. |
| 332 void ScheduleDraw(); | 335 void ScheduleDraw(); |
| 333 | 336 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 // The texture scale. | 533 // The texture scale. |
| 531 float texture_x_scale_; | 534 float texture_x_scale_; |
| 532 float texture_y_scale_; | 535 float texture_y_scale_; |
| 533 | 536 |
| 534 DISALLOW_COPY_AND_ASSIGN(Layer); | 537 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 535 }; | 538 }; |
| 536 | 539 |
| 537 } // namespace ui | 540 } // namespace ui |
| 538 | 541 |
| 539 #endif // UI_COMPOSITOR_LAYER_H_ | 542 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |