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

Side by Side Diff: third_party/WebKit/Source/web/CompositorProxyClientImpl.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: Include WebCompositorMutatorClient from WebLayerTreeView to allow unique_ptr usage. Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CompositorProxyClientImpl_h 5 #ifndef CompositorProxyClientImpl_h
6 #define CompositorProxyClientImpl_h 6 #define CompositorProxyClientImpl_h
7 7
8 #include "core/dom/CompositorProxyClient.h" 8 #include "core/dom/CompositorProxyClient.h"
9 #include "wtf/Noncopyable.h" 9 #include "wtf/Noncopyable.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class CompositorMutatorImpl;
13 class CompositorWorkerGlobalScope; 14 class CompositorWorkerGlobalScope;
14 class WorkerGlobalScope; 15 class WorkerGlobalScope;
15 16
16 // Mediates between one CompositorWorkerGlobalScope and the associated Composito rMutatorImpl. 17 // Mediates between one CompositorWorkerGlobalScope and the associated Composito rMutatorImpl.
17 // There is one CompositorProxyClientImpl per worker but there may be multiple f or a given 18 // There is one CompositorProxyClientImpl per worker but there may be multiple f or a given
18 // mutator, e.g. if a single document creates multiple CompositorWorker objects. 19 // mutator, e.g. if a single document creates multiple CompositorWorker objects.
19 // 20 //
20 // Should be accessed only on the compositor thread. 21 // Should be accessed only on the compositor thread.
21 class CompositorProxyClientImpl final : public GarbageCollected<CompositorProxyC lientImpl>, public CompositorProxyClient { 22 class CompositorProxyClientImpl final : public GarbageCollected<CompositorProxyC lientImpl>, public CompositorProxyClient {
22 USING_GARBAGE_COLLECTED_MIXIN(CompositorProxyClientImpl); 23 USING_GARBAGE_COLLECTED_MIXIN(CompositorProxyClientImpl);
23 WTF_MAKE_NONCOPYABLE(CompositorProxyClientImpl); 24 WTF_MAKE_NONCOPYABLE(CompositorProxyClientImpl);
24 public: 25 public:
25 CompositorProxyClientImpl(); 26 CompositorProxyClientImpl(CompositorMutatorImpl*);
26 DECLARE_VIRTUAL_TRACE(); 27 DECLARE_VIRTUAL_TRACE();
27 28
28 // Runs the animation frame callback for the frame starting at the given tim e. 29 // Runs the animation frame callback for the frame starting at the given tim e.
29 // Returns true if another animation frame was requested (i.e. should be rei nvoked next frame). 30 // Returns true if another animation frame was requested (i.e. should be rei nvoked next frame).
30 bool mutate(double monotonicTimeNow); 31 bool mutate(double monotonicTimeNow);
31 32
32 // CompositorProxyClient: 33 // CompositorProxyClient:
33 void setGlobalScope(WorkerGlobalScope*) override; 34 void setGlobalScope(WorkerGlobalScope*) override;
34 void runAnimationFrameCallbacks() override; 35 void requestAnimationFrame() override;
35 36
36 private: 37 private:
37 bool executeAnimationFrameCallbacks(double monotonicTimeNow); 38 bool executeAnimationFrameCallbacks(double monotonicTimeNow);
38 39
40 Member<CompositorMutatorImpl> m_mutator;
41
39 Member<CompositorWorkerGlobalScope> m_globalScope; 42 Member<CompositorWorkerGlobalScope> m_globalScope;
40 bool m_requestedAnimationFrameCallbacks; 43 bool m_requestedAnimationFrameCallbacks;
41 }; 44 };
42 45
43 } // namespace blink 46 } // namespace blink
44 47
45 #endif // CompositorProxyClientImpl_h 48 #endif // CompositorProxyClientImpl_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/CompositorMutatorImpl.cpp ('k') | third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698