| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 299 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
| 300 void SetColor(SkColor color); | 300 void SetColor(SkColor color); |
| 301 SkColor GetTargetColor(); | 301 SkColor GetTargetColor(); |
| 302 SkColor background_color() const; | 302 SkColor background_color() const; |
| 303 | 303 |
| 304 // Updates the nine patch layer's image, aperture and border. May only be | 304 // Updates the nine patch layer's image, aperture and border. May only be |
| 305 // called for LAYER_NINE_PATCH. | 305 // called for LAYER_NINE_PATCH. |
| 306 void UpdateNinePatchLayerImage(const gfx::ImageSkia& image); | 306 void UpdateNinePatchLayerImage(const gfx::ImageSkia& image); |
| 307 void UpdateNinePatchLayerAperture(const gfx::Rect& aperture_in_dip); | 307 void UpdateNinePatchLayerAperture(const gfx::Rect& aperture_in_dip); |
| 308 // Updates the area completely occluded by another layer, this can be an | 308 void UpdateNinePatchLayerBorder(const gfx::Rect& border); |
| 309 // empty rectangle if nothing is occluded. | |
| 310 void UpdateNinePatchOcclusion(const gfx::Rect& occlusion); | |
| 311 | 309 |
| 312 // Adds |invalid_rect| to the Layer's pending invalid rect and calls | 310 // Adds |invalid_rect| to the Layer's pending invalid rect and calls |
| 313 // ScheduleDraw(). Returns false if the paint request is ignored. | 311 // ScheduleDraw(). Returns false if the paint request is ignored. |
| 314 bool SchedulePaint(const gfx::Rect& invalid_rect); | 312 bool SchedulePaint(const gfx::Rect& invalid_rect); |
| 315 | 313 |
| 316 // Schedules a redraw of the layer tree at the compositor. | 314 // Schedules a redraw of the layer tree at the compositor. |
| 317 // Note that this _does not_ invalidate any region of this layer; use | 315 // Note that this _does not_ invalidate any region of this layer; use |
| 318 // SchedulePaint() for that. | 316 // SchedulePaint() for that. |
| 319 void ScheduleDraw(); | 317 void ScheduleDraw(); |
| 320 | 318 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 507 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 510 // or SetTextureMailbox was called. | 508 // or SetTextureMailbox was called. |
| 511 gfx::Size frame_size_in_dip_; | 509 gfx::Size frame_size_in_dip_; |
| 512 | 510 |
| 513 DISALLOW_COPY_AND_ASSIGN(Layer); | 511 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 514 }; | 512 }; |
| 515 | 513 |
| 516 } // namespace ui | 514 } // namespace ui |
| 517 | 515 |
| 518 #endif // UI_COMPOSITOR_LAYER_H_ | 516 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |