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

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

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add big fat TODOs in scheduler code to implement proper idle task scheduling and ensure GC is runniā€¦ Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CompositorMutatorImpl_h
6 #define CompositorMutatorImpl_h
7
8 #include "core/animation/CustomCompositorAnimationManager.h"
9 #include "platform/graphics/CompositorMutator.h"
10 #include "platform/heap/Handle.h"
11 #include "platform/heap/HeapAllocator.h"
12 #include "wtf/Noncopyable.h"
13 #include "wtf/OwnPtr.h"
14 #include "wtf/PassOwnPtr.h"
15
16 namespace blink {
17
18 class CompositorProxy;
19 class CompositorProxyClientImpl;
20 class CompositorWorkerGlobalScope;
21 class CompositorMutatorClient;
22 class WaitableEvent;
23
24 // Fans out requests from the compositor to all of the registered ProxyClients w hich
25 // can then mutate layers through their CompositorProxy interfaces. Requests for
26 // animation frames are received from ProxyClients and sent to the compositor to
27 // generate a new compositor frame.
28 //
29 // Should be accessed only on the compositor thread.
30 class CompositorMutatorImpl final : public GarbageCollectedFinalized<CompositorM utatorImpl>, public CompositorMutator {
haraken 2016/05/06 02:45:51 Why do you need to make CompositorMutator a Garbag
flackr 2016/05/06 18:15:07 Jeremy pointed out that the interface doesn't real
31 WTF_MAKE_NONCOPYABLE(CompositorMutatorImpl);
32 USING_GARBAGE_COLLECTED_MIXIN(CompositorMutatorImpl);
33 public:
34 static CompositorMutatorImpl* create();
35
36 DEFINE_INLINE_TRACE()
37 {
38 CompositorMutator::trace(visitor);
39 visitor->trace(m_proxyClients);
40 }
41
42 // CompositorMutator implementation.
43 bool mutate(double monotonicTimeNow) override;
44
45 void registerProxyClient(CompositorProxyClientImpl*);
46
47 void setNeedsMutate();
48
49 void setClient(CompositorMutatorClient* client) { m_client = client; }
50 CustomCompositorAnimationManager* animationManager() { return m_animationMan ager.get(); }
51
52 private:
53 CompositorMutatorImpl();
54
55 using ProxyClients = HeapHashSet<WeakMember<CompositorProxyClientImpl>>;
56 ProxyClients m_proxyClients;
haraken 2016/05/06 02:45:51 I just want to confirm why you use WeakMembers, bu
flackr 2016/05/06 18:15:08 Yes. the LayerTreeHostImpl has one CompositorMutat
57
58 OwnPtr<CustomCompositorAnimationManager> m_animationManager;
59 CompositorMutatorClient* m_client;
60 };
61
62 } // namespace blink
63
64 #endif // CompositorMutatorImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698