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_embedding.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 cc::SurfaceEmbeddingPtr surface_ref, |
298 const cc::SurfaceLayer::RequireCallback& require_callback, | |
299 gfx::Size surface_size, | |
300 float scale, | |
301 gfx::Size frame_size_in_dip); | 298 gfx::Size frame_size_in_dip); |
302 | 299 |
303 bool has_external_content() { | 300 bool has_external_content() { |
304 return texture_layer_.get() || surface_layer_.get(); | 301 return texture_layer_.get() || surface_layer_.get(); |
305 } | 302 } |
306 | 303 |
307 // Show a solid color instead of delegated or surface contents. | 304 // Show a solid color instead of delegated or surface contents. |
308 void SetShowSolidColorContent(); | 305 void SetShowSolidColorContent(); |
309 | 306 |
310 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 307 // 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 | 534 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
538 // or SetTextureMailbox was called. | 535 // or SetTextureMailbox was called. |
539 gfx::Size frame_size_in_dip_; | 536 gfx::Size frame_size_in_dip_; |
540 | 537 |
541 DISALLOW_COPY_AND_ASSIGN(Layer); | 538 DISALLOW_COPY_AND_ASSIGN(Layer); |
542 }; | 539 }; |
543 | 540 |
544 } // namespace ui | 541 } // namespace ui |
545 | 542 |
546 #endif // UI_COMPOSITOR_LAYER_H_ | 543 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |