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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "cc/animation/animation_events.h" | 15 #include "cc/animation/animation_events.h" |
16 #include "cc/animation/layer_animation_event_observer.h" | 16 #include "cc/animation/layer_animation_event_observer.h" |
17 #include "cc/base/scoped_ptr_vector.h" | 17 #include "cc/base/scoped_ptr_vector.h" |
18 #include "cc/layers/content_layer_client.h" | 18 #include "cc/layers/content_layer_client.h" |
19 #include "cc/layers/layer_client.h" | 19 #include "cc/layers/layer_client.h" |
| 20 #include "cc/layers/surface_layer.h" |
20 #include "cc/layers/texture_layer_client.h" | 21 #include "cc/layers/texture_layer_client.h" |
21 #include "cc/resources/texture_mailbox.h" | 22 #include "cc/resources/texture_mailbox.h" |
22 #include "cc/surfaces/surface_id.h" | 23 #include "cc/surfaces/surface_id.h" |
23 #include "third_party/skia/include/core/SkColor.h" | 24 #include "third_party/skia/include/core/SkColor.h" |
24 #include "third_party/skia/include/core/SkRegion.h" | 25 #include "third_party/skia/include/core/SkRegion.h" |
25 #include "ui/compositor/compositor.h" | 26 #include "ui/compositor/compositor.h" |
26 #include "ui/compositor/layer_animation_delegate.h" | 27 #include "ui/compositor/layer_animation_delegate.h" |
27 #include "ui/compositor/layer_delegate.h" | 28 #include "ui/compositor/layer_delegate.h" |
28 #include "ui/compositor/layer_type.h" | 29 #include "ui/compositor/layer_type.h" |
29 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 void SetTextureMailbox(const cc::TextureMailbox& mailbox, | 269 void SetTextureMailbox(const cc::TextureMailbox& mailbox, |
269 scoped_ptr<cc::SingleReleaseCallback> release_callback, | 270 scoped_ptr<cc::SingleReleaseCallback> release_callback, |
270 gfx::Size texture_size_in_dip); | 271 gfx::Size texture_size_in_dip); |
271 void SetTextureSize(gfx::Size texture_size_in_dip); | 272 void SetTextureSize(gfx::Size texture_size_in_dip); |
272 | 273 |
273 // Begins showing delegated frames from the |frame_provider|. | 274 // Begins showing delegated frames from the |frame_provider|. |
274 void SetShowDelegatedContent(cc::DelegatedFrameProvider* frame_provider, | 275 void SetShowDelegatedContent(cc::DelegatedFrameProvider* frame_provider, |
275 gfx::Size frame_size_in_dip); | 276 gfx::Size frame_size_in_dip); |
276 | 277 |
277 // Begins showing content from a surface with a particular id. | 278 // Begins showing content from a surface with a particular id. |
278 void SetShowSurface(cc::SurfaceId id, gfx::Size frame_size_in_dip); | 279 void SetShowSurface(cc::SurfaceId id, |
| 280 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, |
| 281 const cc::SurfaceLayer::RequireCallback& require_callback, |
| 282 gfx::Size frame_size_in_dip); |
279 | 283 |
280 bool has_external_content() { | 284 bool has_external_content() { |
281 return texture_layer_.get() || delegated_renderer_layer_.get() || | 285 return texture_layer_.get() || delegated_renderer_layer_.get() || |
282 surface_layer_.get(); | 286 surface_layer_.get(); |
283 } | 287 } |
284 | 288 |
285 // Show a solid color instead of delegated or surface contents. | 289 // Show a solid color instead of delegated or surface contents. |
286 void SetShowSolidColorContent(); | 290 void SetShowSolidColorContent(); |
287 | 291 |
288 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 292 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 // 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 |
508 // or SetTextureMailbox was called. | 512 // or SetTextureMailbox was called. |
509 gfx::Size frame_size_in_dip_; | 513 gfx::Size frame_size_in_dip_; |
510 | 514 |
511 DISALLOW_COPY_AND_ASSIGN(Layer); | 515 DISALLOW_COPY_AND_ASSIGN(Layer); |
512 }; | 516 }; |
513 | 517 |
514 } // namespace ui | 518 } // namespace ui |
515 | 519 |
516 #endif // UI_COMPOSITOR_LAYER_H_ | 520 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |