Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1001)

Side by Side Diff: ui/compositor/layer.h

Issue 1012583002: CC Animations: Port UI Browser Compositor to use compositor animation timelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@redirect
Patch Set: Rebase. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 float GetGrayscaleForAnimation() const override; 414 float GetGrayscaleForAnimation() const override;
414 SkColor GetColorForAnimation() const override; 415 SkColor GetColorForAnimation() const override;
415 float GetDeviceScaleFactor() const override; 416 float GetDeviceScaleFactor() const override;
416 void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) override; 417 void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) override;
417 void RemoveThreadedAnimation(int animation_id) override; 418 void RemoveThreadedAnimation(int animation_id) override;
418 LayerAnimatorCollection* GetLayerAnimatorCollection() override; 419 LayerAnimatorCollection* GetLayerAnimatorCollection() override;
419 420
420 // Creates a corresponding composited layer for |type_|. 421 // Creates a corresponding composited layer for |type_|.
421 void CreateCcLayer(); 422 void CreateCcLayer();
422 423
424 // Attach/Detach CC Layer animation event observers and AnimationPlayer.
425 void AttachPlayerLayer();
426 void DetachPlayerLayer();
427
428 void AttachAnimationPlayers(cc::AnimationTimeline* timeline);
429 void DetachAnimationPlayers(cc::AnimationTimeline* timeline);
430
423 // Recomputes and sets to |cc_layer_|. 431 // Recomputes and sets to |cc_layer_|.
424 void RecomputeDrawsContentAndUVRect(); 432 void RecomputeDrawsContentAndUVRect();
425 void RecomputePosition(); 433 void RecomputePosition();
426 434
427 // Set all filters which got applied to the layer. 435 // Set all filters which got applied to the layer.
428 void SetLayerFilters(); 436 void SetLayerFilters();
429 437
430 // Set all filters which got applied to the layer background. 438 // Set all filters which got applied to the layer background.
431 void SetLayerBackgroundFilters(); 439 void SetLayerBackgroundFilters();
432 440
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 // Shape of the window. 503 // Shape of the window.
496 scoped_ptr<SkRegion> alpha_shape_; 504 scoped_ptr<SkRegion> alpha_shape_;
497 505
498 std::string name_; 506 std::string name_;
499 507
500 LayerDelegate* delegate_; 508 LayerDelegate* delegate_;
501 509
502 LayerOwner* owner_; 510 LayerOwner* owner_;
503 511
504 scoped_refptr<LayerAnimator> animator_; 512 scoped_refptr<LayerAnimator> animator_;
513 scoped_refptr<cc::AnimationPlayer> animation_player_;
505 514
506 // Animations that are passed to AddThreadedAnimation before this layer is 515 // Animations that are passed to AddThreadedAnimation before this layer is
507 // added to a tree. 516 // added to a tree.
508 std::vector<scoped_ptr<cc::Animation>> pending_threaded_animations_; 517 std::vector<scoped_ptr<cc::Animation>> pending_threaded_animations_;
509 518
510 // Ownership of the layer is held through one of the strongly typed layer 519 // Ownership of the layer is held through one of the strongly typed layer
511 // pointers, depending on which sort of layer this is. 520 // pointers, depending on which sort of layer this is.
512 scoped_refptr<cc::Layer> content_layer_; 521 scoped_refptr<cc::Layer> content_layer_;
513 scoped_refptr<cc::NinePatchLayer> nine_patch_layer_; 522 scoped_refptr<cc::NinePatchLayer> nine_patch_layer_;
514 scoped_refptr<cc::TextureLayer> texture_layer_; 523 scoped_refptr<cc::TextureLayer> texture_layer_;
(...skipping 20 matching lines...) Expand all
535 // The size of the frame or texture in DIP, set when SetShowDelegatedContent 544 // The size of the frame or texture in DIP, set when SetShowDelegatedContent
536 // or SetTextureMailbox was called. 545 // or SetTextureMailbox was called.
537 gfx::Size frame_size_in_dip_; 546 gfx::Size frame_size_in_dip_;
538 547
539 DISALLOW_COPY_AND_ASSIGN(Layer); 548 DISALLOW_COPY_AND_ASSIGN(Layer);
540 }; 549 };
541 550
542 } // namespace ui 551 } // namespace ui
543 552
544 #endif // UI_COMPOSITOR_LAYER_H_ 553 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698