| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // Set new TextureMailbox for this layer. Note that |mailbox| may hold a | 274 // Set new TextureMailbox for this layer. Note that |mailbox| may hold a |
| 275 // shared memory resource or an actual mailbox for a texture. | 275 // shared memory resource or an actual mailbox for a texture. |
| 276 void SetTextureMailbox( | 276 void SetTextureMailbox( |
| 277 const cc::TextureMailbox& mailbox, | 277 const cc::TextureMailbox& mailbox, |
| 278 std::unique_ptr<cc::SingleReleaseCallback> release_callback, | 278 std::unique_ptr<cc::SingleReleaseCallback> release_callback, |
| 279 gfx::Size texture_size_in_dip); | 279 gfx::Size texture_size_in_dip); |
| 280 void SetTextureSize(gfx::Size texture_size_in_dip); | 280 void SetTextureSize(gfx::Size texture_size_in_dip); |
| 281 void SetTextureFlipped(bool flipped); | 281 void SetTextureFlipped(bool flipped); |
| 282 bool TextureFlipped() const; | 282 bool TextureFlipped() const; |
| 283 | 283 |
| 284 // The alpha value applied to the whole texture. The effective value of each |
| 285 // pixel is computed as: |
| 286 // pixel.a = pixel.a * alpha. |
| 287 // Note: This is different from SetOpacity() as it only applies to the |
| 288 // texture and child layers are unaffected. |
| 289 // TODO(reveman): Remove once components/exo code is using SetShowSurface. |
| 290 // crbug.com/610086 |
| 291 void SetTextureAlpha(float alpha); |
| 292 |
| 284 // Begins showing content from a surface with a particular id. | 293 // Begins showing content from a surface with a particular id. |
| 285 void SetShowSurface(cc::SurfaceId surface_id, | 294 void SetShowSurface(cc::SurfaceId surface_id, |
| 286 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, | 295 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, |
| 287 const cc::SurfaceLayer::RequireCallback& require_callback, | 296 const cc::SurfaceLayer::RequireCallback& require_callback, |
| 288 gfx::Size surface_size, | 297 gfx::Size surface_size, |
| 289 float scale, | 298 float scale, |
| 290 gfx::Size frame_size_in_dip); | 299 gfx::Size frame_size_in_dip); |
| 291 | 300 |
| 292 bool has_external_content() { | 301 bool has_external_content() { |
| 293 return texture_layer_.get() || surface_layer_.get(); | 302 return texture_layer_.get() || surface_layer_.get(); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 511 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 503 // or SetTextureMailbox was called. | 512 // or SetTextureMailbox was called. |
| 504 gfx::Size frame_size_in_dip_; | 513 gfx::Size frame_size_in_dip_; |
| 505 | 514 |
| 506 DISALLOW_COPY_AND_ASSIGN(Layer); | 515 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 507 }; | 516 }; |
| 508 | 517 |
| 509 } // namespace ui | 518 } // namespace ui |
| 510 | 519 |
| 511 #endif // UI_COMPOSITOR_LAYER_H_ | 520 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |