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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 gfx::Size texture_size_in_dip); | 292 gfx::Size texture_size_in_dip); |
293 void SetTextureSize(gfx::Size texture_size_in_dip); | 293 void SetTextureSize(gfx::Size texture_size_in_dip); |
294 void SetTextureFlipped(bool flipped); | 294 void SetTextureFlipped(bool flipped); |
295 bool TextureFlipped() const; | 295 bool TextureFlipped() const; |
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 |
| 303 // display compositor, the fallback surface will be used. |
| 304 void SetFallbackSurface(const cc::SurfaceInfo& surface_info); |
| 305 |
302 bool has_external_content() { | 306 bool has_external_content() { |
303 return texture_layer_.get() || surface_layer_.get(); | 307 return texture_layer_.get() || surface_layer_.get(); |
304 } | 308 } |
305 | 309 |
306 // Show a solid color instead of delegated or surface contents. | 310 // Show a solid color instead of delegated or surface contents. |
307 void SetShowSolidColorContent(); | 311 void SetShowSolidColorContent(); |
308 | 312 |
309 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 313 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
310 void SetColor(SkColor color); | 314 void SetColor(SkColor color); |
311 SkColor GetTargetColor() const; | 315 SkColor GetTargetColor() const; |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 550 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
547 // or SetTextureMailbox was called. | 551 // or SetTextureMailbox was called. |
548 gfx::Size frame_size_in_dip_; | 552 gfx::Size frame_size_in_dip_; |
549 | 553 |
550 DISALLOW_COPY_AND_ASSIGN(Layer); | 554 DISALLOW_COPY_AND_ASSIGN(Layer); |
551 }; | 555 }; |
552 | 556 |
553 } // namespace ui | 557 } // namespace ui |
554 | 558 |
555 #endif // UI_COMPOSITOR_LAYER_H_ | 559 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |