| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 // Begins showing content from a surface with a particular ID. | 297 // Begins showing content from a surface with a particular ID. |
| 298 void SetShowPrimarySurface( | 298 void SetShowPrimarySurface( |
| 299 const cc::SurfaceInfo& surface_info, | 299 const cc::SurfaceInfo& surface_info, |
| 300 scoped_refptr<cc::SurfaceReferenceFactory> surface_ref); | 300 scoped_refptr<cc::SurfaceReferenceFactory> surface_ref); |
| 301 | 301 |
| 302 // In the event that the primary surface is not yet available in the | 302 // In the event that the primary surface is not yet available in the |
| 303 // display compositor, the fallback surface will be used. | 303 // display compositor, the fallback surface will be used. |
| 304 void SetFallbackSurface(const cc::SurfaceInfo& surface_info); | 304 void SetFallbackSurface(const cc::SurfaceInfo& surface_info); |
| 305 | 305 |
| 306 // Returns the fallback SurfaceInfo set by SetFallbackSurface. |
| 307 const cc::SurfaceInfo* GetFallbackSurfaceInfo() const; |
| 308 |
| 306 bool has_external_content() { | 309 bool has_external_content() { |
| 307 return texture_layer_.get() || surface_layer_.get(); | 310 return texture_layer_.get() || surface_layer_.get(); |
| 308 } | 311 } |
| 309 | 312 |
| 310 // Show a solid color instead of delegated or surface contents. | 313 // Show a solid color instead of delegated or surface contents. |
| 311 void SetShowSolidColorContent(); | 314 void SetShowSolidColorContent(); |
| 312 | 315 |
| 313 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 316 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
| 314 void SetColor(SkColor color); | 317 void SetColor(SkColor color); |
| 315 SkColor GetTargetColor() const; | 318 SkColor GetTargetColor() const; |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 553 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 551 // or SetTextureMailbox was called. | 554 // or SetTextureMailbox was called. |
| 552 gfx::Size frame_size_in_dip_; | 555 gfx::Size frame_size_in_dip_; |
| 553 | 556 |
| 554 DISALLOW_COPY_AND_ASSIGN(Layer); | 557 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 555 }; | 558 }; |
| 556 | 559 |
| 557 } // namespace ui | 560 } // namespace ui |
| 558 | 561 |
| 559 #endif // UI_COMPOSITOR_LAYER_H_ | 562 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |