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

Unified Diff: third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.h

Issue 2894233002: [animation-worklet] invoke animate callback on mutation signal (Closed)
Patch Set: Created 3 years, 7 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/web/AnimationWorkletProxyClientImpl.h
diff --git a/third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.h b/third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.h
index 147b9d12be926a16dd309f7f423b19480c5b1a53..da9b6695f4387e40d14f2673187a233de80d201c 100644
--- a/third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.h
+++ b/third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.h
@@ -6,6 +6,7 @@
#define AnimationWorkletProxyClientImpl_h
#include "core/dom/AnimationWorkletProxyClient.h"
+#include "modules/compositorworker/AnimationWorkletGlobalScope.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Noncopyable.h"
#include "web/CompositorAnimator.h"
@@ -14,7 +15,7 @@
namespace blink {
class CompositorMutatorImpl;
-
+class WorkletGlobalScope;
// Mediates between one Animator and the associated CompositorMutatorImpl. There
// is one AnimationWorkletProxyClientImpl per Animator but there may be multiple
// for a given mutator and animatorWorklet.
@@ -32,15 +33,25 @@ class AnimationWorkletProxyClientImpl final
explicit AnimationWorkletProxyClientImpl(CompositorMutatorImpl*);
DECLARE_VIRTUAL_TRACE();
+ // AnimationWorkletProxyClient:
+ void SetGlobalScope(WorkletGlobalScope*) override;
+ void Dispose() override;
+
// CompositorAnimator:
// This method is invoked in compositor thread
bool Mutate(double monotonic_time_now,
CompositorMutableStateProvider*) override;
+ CompositorProxyClient* GetCompositorProxyClient() override {
+ return compositor_proxy_client_.Get();
+ };
+
private:
CrossThreadPersistent<CompositorMutatorImpl> mutator_;
CrossThreadPersistent<CompositorProxyClientImpl> compositor_proxy_client_;
+
+ CrossThreadPersistent<AnimationWorkletGlobalScope> global_scope_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698