| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
| 18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 19 #include "cc/base/region.h" | 19 #include "cc/base/region.h" |
| 20 #include "cc/layers/content_layer_client.h" | 20 #include "cc/layers/content_layer_client.h" |
| 21 #include "cc/layers/layer_client.h" | 21 #include "cc/layers/layer_client.h" |
| 22 #include "cc/layers/surface_layer.h" | 22 #include "cc/layers/surface_layer.h" |
| 23 #include "cc/layers/texture_layer_client.h" | 23 #include "cc/layers/texture_layer_client.h" |
| 24 #include "cc/resources/texture_mailbox.h" | 24 #include "cc/resources/texture_mailbox.h" |
| 25 #include "cc/surfaces/surface_id.h" | 25 #include "cc/surfaces/surface_info.h" |
| 26 #include "third_party/skia/include/core/SkColor.h" | 26 #include "third_party/skia/include/core/SkColor.h" |
| 27 #include "third_party/skia/include/core/SkRegion.h" | 27 #include "third_party/skia/include/core/SkRegion.h" |
| 28 #include "ui/compositor/compositor.h" | 28 #include "ui/compositor/compositor.h" |
| 29 #include "ui/compositor/layer_animation_delegate.h" | 29 #include "ui/compositor/layer_animation_delegate.h" |
| 30 #include "ui/compositor/layer_delegate.h" | 30 #include "ui/compositor/layer_delegate.h" |
| 31 #include "ui/compositor/layer_type.h" | 31 #include "ui/compositor/layer_type.h" |
| 32 #include "ui/gfx/geometry/rect.h" | 32 #include "ui/gfx/geometry/rect.h" |
| 33 #include "ui/gfx/image/image_skia.h" | 33 #include "ui/gfx/image/image_skia.h" |
| 34 #include "ui/gfx/transform.h" | 34 #include "ui/gfx/transform.h" |
| 35 | 35 |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // shared memory resource or an actual mailbox for a texture. | 286 // shared memory resource or an actual mailbox for a texture. |
| 287 void SetTextureMailbox( | 287 void SetTextureMailbox( |
| 288 const cc::TextureMailbox& mailbox, | 288 const cc::TextureMailbox& mailbox, |
| 289 std::unique_ptr<cc::SingleReleaseCallback> release_callback, | 289 std::unique_ptr<cc::SingleReleaseCallback> release_callback, |
| 290 gfx::Size texture_size_in_dip); | 290 gfx::Size texture_size_in_dip); |
| 291 void SetTextureSize(gfx::Size texture_size_in_dip); | 291 void SetTextureSize(gfx::Size texture_size_in_dip); |
| 292 void SetTextureFlipped(bool flipped); | 292 void SetTextureFlipped(bool flipped); |
| 293 bool TextureFlipped() const; | 293 bool TextureFlipped() const; |
| 294 | 294 |
| 295 // Begins showing content from a surface with a particular id. | 295 // Begins showing content from a surface with a particular id. |
| 296 void SetShowSurface(const cc::SurfaceId& surface_id, | 296 void SetShowSurface(const cc::SurfaceInfo& surface_info, |
| 297 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, | 297 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, |
| 298 const cc::SurfaceLayer::RequireCallback& require_callback, | 298 const cc::SurfaceLayer::RequireCallback& require_callback, |
| 299 gfx::Size surface_size, | |
| 300 float scale, | |
| 301 gfx::Size frame_size_in_dip); | 299 gfx::Size frame_size_in_dip); |
| 302 | 300 |
| 303 bool has_external_content() { | 301 bool has_external_content() { |
| 304 return texture_layer_.get() || surface_layer_.get(); | 302 return texture_layer_.get() || surface_layer_.get(); |
| 305 } | 303 } |
| 306 | 304 |
| 307 // Show a solid color instead of delegated or surface contents. | 305 // Show a solid color instead of delegated or surface contents. |
| 308 void SetShowSolidColorContent(); | 306 void SetShowSolidColorContent(); |
| 309 | 307 |
| 310 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 308 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 535 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 538 // or SetTextureMailbox was called. | 536 // or SetTextureMailbox was called. |
| 539 gfx::Size frame_size_in_dip_; | 537 gfx::Size frame_size_in_dip_; |
| 540 | 538 |
| 541 DISALLOW_COPY_AND_ASSIGN(Layer); | 539 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 542 }; | 540 }; |
| 543 | 541 |
| 544 } // namespace ui | 542 } // namespace ui |
| 545 | 543 |
| 546 #endif // UI_COMPOSITOR_LAYER_H_ | 544 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |