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

Unified Diff: third_party/WebKit/Source/core/animation/CompositorMutationAnimations.h

Issue 1602343002: compositor-worker: cc->blink mutation plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compositor-worker-ian-patch
Patch Set: Use animation machinery instead of updating inline style Created 4 years, 10 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: third_party/WebKit/Source/core/animation/CompositorMutationAnimations.h
diff --git a/third_party/WebKit/Source/core/animation/CompositorMutationAnimations.h b/third_party/WebKit/Source/core/animation/CompositorMutationAnimations.h
new file mode 100644
index 0000000000000000000000000000000000000000..4db6e0a6d663a5f9366b70e0d39a7d25df1b831c
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/CompositorMutationAnimations.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CompositorMutationAnimations_h
+#define CompositorMutationAnimations_h
+
+#include "core/animation/Animation.h"
+#include "platform/heap/Handle.h"
+#include "wtf/Noncopyable.h"
+
+namespace blink {
+
+class Element;
+class CompositorMutation;
+
+class CompositorMutationAnimations final {
+ DISALLOW_NEW();
+ WTF_MAKE_NONCOPYABLE(CompositorMutationAnimations);
+
esprehn 2016/02/17 01:32:36 remove nl
majidvp 2016/02/22 17:59:48 Done.
+public:
+ CompositorMutationAnimations() {}
+ void applyUpdate(Element&, const CompositorMutation&);
+
+ DEFINE_INLINE_TRACE()
+ {
+ visitor->trace(m_opacityAnimation);
+ visitor->trace(m_transformAnimation);
+ }
+
+private:
+ // We only need two animations at the moment but if that grows we should
+ // use a map instead of individual members.
esprehn 2016/02/17 01:32:36 Why not use a single animation?
majidvp 2016/02/22 17:59:48 Done.
+ Member<Animation> m_opacityAnimation;
+ Member<Animation> m_transformAnimation;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698