| 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 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "ui/compositor/layer_animation_delegate.h" | 27 #include "ui/compositor/layer_animation_delegate.h" |
| 28 #include "ui/compositor/layer_delegate.h" | 28 #include "ui/compositor/layer_delegate.h" |
| 29 #include "ui/compositor/layer_type.h" | 29 #include "ui/compositor/layer_type.h" |
| 30 #include "ui/gfx/geometry/rect.h" | 30 #include "ui/gfx/geometry/rect.h" |
| 31 #include "ui/gfx/image/image_skia.h" | 31 #include "ui/gfx/image/image_skia.h" |
| 32 #include "ui/gfx/transform.h" | 32 #include "ui/gfx/transform.h" |
| 33 | 33 |
| 34 class SkCanvas; | 34 class SkCanvas; |
| 35 | 35 |
| 36 namespace cc { | 36 namespace cc { |
| 37 class AnimationPlayer; |
| 37 class ContentLayer; | 38 class ContentLayer; |
| 38 class CopyOutputRequest; | 39 class CopyOutputRequest; |
| 39 class DelegatedFrameProvider; | 40 class DelegatedFrameProvider; |
| 40 class DelegatedRendererLayer; | 41 class DelegatedRendererLayer; |
| 41 class Layer; | 42 class Layer; |
| 42 class NinePatchLayer; | 43 class NinePatchLayer; |
| 43 class ResourceUpdateQueue; | 44 class ResourceUpdateQueue; |
| 44 class SolidColorLayer; | 45 class SolidColorLayer; |
| 45 class SurfaceLayer; | 46 class SurfaceLayer; |
| 46 class TextureLayer; | 47 class TextureLayer; |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 float GetGrayscaleForAnimation() const override; | 412 float GetGrayscaleForAnimation() const override; |
| 412 SkColor GetColorForAnimation() const override; | 413 SkColor GetColorForAnimation() const override; |
| 413 float GetDeviceScaleFactor() const override; | 414 float GetDeviceScaleFactor() const override; |
| 414 void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) override; | 415 void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) override; |
| 415 void RemoveThreadedAnimation(int animation_id) override; | 416 void RemoveThreadedAnimation(int animation_id) override; |
| 416 LayerAnimatorCollection* GetLayerAnimatorCollection() override; | 417 LayerAnimatorCollection* GetLayerAnimatorCollection() override; |
| 417 | 418 |
| 418 // Creates a corresponding composited layer for |type_|. | 419 // Creates a corresponding composited layer for |type_|. |
| 419 void CreateCcLayer(); | 420 void CreateCcLayer(); |
| 420 | 421 |
| 422 // Creates LayerAnimationController or AnimationPlayer in cc module. |
| 423 void RegisterForAnimations(Compositor* compositor); |
| 424 void AttachLayer(); |
| 425 void DetachLayer(); |
| 426 void AttachAnimationPlayer(); |
| 427 void DetachAnimationPlayer(); |
| 428 |
| 421 // Recomputes and sets to |cc_layer_|. | 429 // Recomputes and sets to |cc_layer_|. |
| 422 void RecomputeDrawsContentAndUVRect(); | 430 void RecomputeDrawsContentAndUVRect(); |
| 423 void RecomputePosition(); | 431 void RecomputePosition(); |
| 424 | 432 |
| 425 // Set all filters which got applied to the layer. | 433 // Set all filters which got applied to the layer. |
| 426 void SetLayerFilters(); | 434 void SetLayerFilters(); |
| 427 | 435 |
| 428 // Set all filters which got applied to the layer background. | 436 // Set all filters which got applied to the layer background. |
| 429 void SetLayerBackgroundFilters(); | 437 void SetLayerBackgroundFilters(); |
| 430 | 438 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 // Shape of the window. | 501 // Shape of the window. |
| 494 scoped_ptr<SkRegion> alpha_shape_; | 502 scoped_ptr<SkRegion> alpha_shape_; |
| 495 | 503 |
| 496 std::string name_; | 504 std::string name_; |
| 497 | 505 |
| 498 LayerDelegate* delegate_; | 506 LayerDelegate* delegate_; |
| 499 | 507 |
| 500 LayerOwner* owner_; | 508 LayerOwner* owner_; |
| 501 | 509 |
| 502 scoped_refptr<LayerAnimator> animator_; | 510 scoped_refptr<LayerAnimator> animator_; |
| 511 scoped_refptr<cc::AnimationPlayer> animation_player_; |
| 503 | 512 |
| 504 // Animations that are passed to AddThreadedAnimation before this layer is | 513 // Animations that are passed to AddThreadedAnimation before this layer is |
| 505 // added to a tree. | 514 // added to a tree. |
| 506 cc::ScopedPtrVector<cc::Animation> pending_threaded_animations_; | 515 cc::ScopedPtrVector<cc::Animation> pending_threaded_animations_; |
| 507 | 516 |
| 508 // Ownership of the layer is held through one of the strongly typed layer | 517 // Ownership of the layer is held through one of the strongly typed layer |
| 509 // pointers, depending on which sort of layer this is. | 518 // pointers, depending on which sort of layer this is. |
| 510 scoped_refptr<cc::Layer> content_layer_; | 519 scoped_refptr<cc::Layer> content_layer_; |
| 511 scoped_refptr<cc::NinePatchLayer> nine_patch_layer_; | 520 scoped_refptr<cc::NinePatchLayer> nine_patch_layer_; |
| 512 scoped_refptr<cc::TextureLayer> texture_layer_; | 521 scoped_refptr<cc::TextureLayer> texture_layer_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 536 | 545 |
| 537 bool inside_paint_; | 546 bool inside_paint_; |
| 538 gfx::Rect paint_rect_; | 547 gfx::Rect paint_rect_; |
| 539 | 548 |
| 540 DISALLOW_COPY_AND_ASSIGN(Layer); | 549 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 541 }; | 550 }; |
| 542 | 551 |
| 543 } // namespace ui | 552 } // namespace ui |
| 544 | 553 |
| 545 #endif // UI_COMPOSITOR_LAYER_H_ | 554 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |