1 // Copyright 2018 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "third_party/blink/renderer/platform/graphics/main_thread_mutator_client.h" 6 7 #include <memory> 8 #include "third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl.h" 9 10 namespace blink { 11 MainThreadMutatorClient(std::unique_ptr<AnimationWorkletMutatorDispatcherImpl> mutator)12MainThreadMutatorClient::MainThreadMutatorClient( 13 std::unique_ptr<AnimationWorkletMutatorDispatcherImpl> mutator) 14 : mutator_(std::move(mutator)) { 15 mutator_->SetClient(this); 16 } 17 SynchronizeAnimatorName(const String & animator_name)18void MainThreadMutatorClient::SynchronizeAnimatorName( 19 const String& animator_name) { 20 delegate_->SynchronizeAnimatorName(animator_name); 21 } 22 SetMutationUpdate(std::unique_ptr<AnimationWorkletOutput> output_state)23void MainThreadMutatorClient::SetMutationUpdate( 24 std::unique_ptr<AnimationWorkletOutput> output_state) { 25 delegate_->SetMutationUpdate(std::move(output_state)); 26 } 27 SetDelegate(MutatorClient * delegate)28void MainThreadMutatorClient::SetDelegate(MutatorClient* delegate) { 29 delegate_ = delegate; 30 } 31 32 } // namespace blink 33