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

Side by Side Diff: third_party/WebKit/Source/web/CompositorMutatorImpl.h

Issue 2204183002: Prepare CompositorWorker for per thread heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CompositorMutatorImpl_h 5 #ifndef CompositorMutatorImpl_h
6 #define CompositorMutatorImpl_h 6 #define CompositorMutatorImpl_h
7 7
8 #include "core/animation/CustomCompositorAnimationManager.h" 8 #include "core/animation/CustomCompositorAnimationManager.h"
9 #include "platform/graphics/CompositorMutator.h" 9 #include "platform/graphics/CompositorMutator.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 13 matching lines...) Expand all
24 // animation frames are received from ProxyClients and sent to the compositor to 24 // animation frames are received from ProxyClients and sent to the compositor to
25 // generate a new compositor frame. 25 // generate a new compositor frame.
26 // 26 //
27 // Should be accessed only on the compositor thread. 27 // Should be accessed only on the compositor thread.
28 class CompositorMutatorImpl final : public CompositorMutator { 28 class CompositorMutatorImpl final : public CompositorMutator {
29 WTF_MAKE_NONCOPYABLE(CompositorMutatorImpl); 29 WTF_MAKE_NONCOPYABLE(CompositorMutatorImpl);
30 public: 30 public:
31 static std::unique_ptr<CompositorMutatorClient> createClient(); 31 static std::unique_ptr<CompositorMutatorClient> createClient();
32 static CompositorMutatorImpl* create(); 32 static CompositorMutatorImpl* create();
33 33
34 DEFINE_INLINE_TRACE()
35 {
36 CompositorMutator::trace(visitor);
37 visitor->trace(m_proxyClients);
38 }
39
40 // CompositorMutator implementation. 34 // CompositorMutator implementation.
41 bool mutate(double monotonicTimeNow, CompositorMutableStateProvider*) overri de; 35 bool mutate(double monotonicTimeNow, CompositorMutableStateProvider*) overri de;
42 36
43 void registerProxyClient(CompositorProxyClientImpl*); 37 void registerProxyClient(CompositorProxyClientImpl*);
38 void unregisterProxyClient(CompositorProxyClientImpl*);
44 39
45 void setNeedsMutate(); 40 void setNeedsMutate();
46 41
47 void setClient(CompositorMutatorClient* client) { m_client = client; } 42 void setClient(CompositorMutatorClient* client) { m_client = client; }
48 CustomCompositorAnimationManager* animationManager() { return m_animationMan ager.get(); } 43 CustomCompositorAnimationManager* animationManager() { return m_animationMan ager.get(); }
49 44
50 private: 45 private:
51 CompositorMutatorImpl(); 46 CompositorMutatorImpl();
52 47
53 using ProxyClients = HeapHashSet<WeakMember<CompositorProxyClientImpl>>; 48 using ProxyClients = HashSet<CrossThreadPersistent<CompositorProxyClientImpl >>;
54 ProxyClients m_proxyClients; 49 ProxyClients m_proxyClients;
55 50
56 std::unique_ptr<CustomCompositorAnimationManager> m_animationManager; 51 std::unique_ptr<CustomCompositorAnimationManager> m_animationManager;
57 CompositorMutatorClient* m_client; 52 CompositorMutatorClient* m_client;
58 }; 53 };
59 54
60 } // namespace blink 55 } // namespace blink
61 56
62 #endif // CompositorMutatorImpl_h 57 #endif // CompositorMutatorImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698