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

Unified Diff: ui/compositor/layer.h

Issue 11896017: Thread ui opacity animations (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Correctly deal with sequences meant to start together Created 7 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index b35cf0bdff2df6211a762a2325f6b980c16252a0..81ea77e763dcd78e907b7434c269598c889ee2a6 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -12,7 +12,9 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
+#include "cc/animation_events.h"
#include "cc/content_layer_client.h"
+#include "cc/layer_animation_event_observer.h"
#include "cc/texture_layer_client.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkRegion.h"
@@ -52,7 +54,8 @@ class Texture;
class COMPOSITOR_EXPORT Layer
: public LayerAnimationDelegate,
NON_EXPORTED_BASE(public cc::ContentLayerClient),
- NON_EXPORTED_BASE(public cc::TextureLayerClient) {
+ NON_EXPORTED_BASE(public cc::TextureLayerClient),
+ NON_EXPORTED_BASE(public cc::LayerAnimationEventObserver) {
public:
Layer();
explicit Layer(LayerType type);
@@ -287,6 +290,9 @@ class COMPOSITOR_EXPORT Layer
void SetForceRenderSurface(bool force);
bool force_render_surface() const { return force_render_surface_; }
+ // LayerAnimationEventObserver
+ virtual void OnAnimationStarted(const cc::AnimationEvent& event) OVERRIDE;
+
private:
// Stacks |child| above or below |other|. Helper method for StackAbove() and
// StackBelow().
@@ -330,6 +336,9 @@ class COMPOSITOR_EXPORT Layer
virtual float GetBrightnessForAnimation() const OVERRIDE;
virtual float GetGrayscaleForAnimation() const OVERRIDE;
virtual SkColor GetColorForAnimation() const OVERRIDE;
+ virtual void AddThreadedAnimation(
+ scoped_ptr<cc::Animation> animation) OVERRIDE;
+ virtual void RemoveThreadedAnimation(int animation_id) OVERRIDE;
void CreateWebLayer();
void RecomputeTransform();

Powered by Google App Engine
This is Rietveld 408576698