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

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: Remove unnecessary scope Created 4 years, 8 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 "platform/graphics/CompositorMutator.h"
9 #include "platform/heap/Handle.h"
10 #include "wtf/Noncopyable.h"
11 #include "wtf/OwnPtr.h"
12 #include "wtf/PassOwnPtr.h"
13
14 #include <set>
15
16 namespace blink {
17
18 class CompositorProxy;
19 class CompositorProxyClient;
20 class CompositorWorkerGlobalScope;
21 class CompositorMutatorClient;
22 class CustomCompositorAnimationManager;
23 class WaitableEvent;
24
25 class CompositorMutatorImpl final : public CompositorMutator {
jbroman 2016/04/20 19:24:51 It sounds like there are threading concerns with t
26 WTF_MAKE_NONCOPYABLE(CompositorMutatorImpl);
27
28 public:
29 static PassOwnPtr<CompositorMutatorImpl> create();
30 ~CompositorMutatorImpl() override;
31
32 // CompositorMutator implementation.
33 bool mutate(double timeNow) override;
34
35 void registerClient(CompositorProxyClient*);
jbroman 2016/04/20 21:06:42 nit: This name is confusing given that client() al
flackr 2016/04/25 14:06:28 Done and done.
36 void unregisterClient(CompositorProxyClient*);
37
38 CompositorProxyClient* createCompositorProxyClient();
jbroman 2016/04/20 21:06:42 What value does this function add, compared caller
flackr 2016/04/25 14:06:28 Doesn't seem to be adding any value. I've moved th
39 CompositorMutatorClient* client() { return m_client.get(); }
40
41 void setNeedsMutate();
42
43 private:
44 CompositorMutatorImpl();
45
46 // We use a standard container instead of oil-pan wtf ones as
47 // the latter seems to mess up oil-pan garbage collection. I believe this is
48 // due to the multi-threaded situation and the fact that CC thread does not
49 // participate in oil-pan GC.
50 // This should not be an issue, as the pointer does not need to be traced
51 // here because the CompositorProxyClientImpl lifetime is already managed by
52 // oilpan and we update the Set ourself via register/unregister and do not
53 // need oilpan to take any extra actions.
54 // TODO(majidvp): Look into details to see why we crash if
55 // PersistentHeapHashSet<Member<>> is used
56 using ProxyClients = std::set<CompositorProxyClient*>;
haraken 2016/04/19 23:35:52 Can you make CompositorMutator GarbageCollected? T
jbroman 2016/04/20 19:24:51 +1 An STL container holding raw pointers into the
jbroman 2016/04/20 21:06:42 Also, can the pointed-to type ever be anything oth
flackr 2016/04/25 14:06:28 Still working on getting this right. Somehow naive
57 ProxyClients m_proxyClients;
58
59 OwnPtr<CustomCompositorAnimationManager> m_animationManager;
60 OwnPtr<CompositorMutatorClient> m_client;
61 };
62
63 } // namespace blink
64
65 #endif // CompositorMutatorImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698