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

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

Issue 2389633002: reflow comments in web/ (Closed)
Patch Set: . Created 4 years, 2 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 #include "web/CompositorMutatorImpl.h" 5 #include "web/CompositorMutatorImpl.h"
6 6
7 #include "core/animation/CustomCompositorAnimationManager.h" 7 #include "core/animation/CustomCompositorAnimationManager.h"
8 #include "core/dom/CompositorProxy.h" 8 #include "core/dom/CompositorProxy.h"
9 #include "platform/CrossThreadFunctional.h" 9 #include "platform/CrossThreadFunctional.h"
10 #include "platform/TraceEvent.h" 10 #include "platform/TraceEvent.h"
(...skipping 28 matching lines...) Expand all
39 std::unique_ptr<CompositorMutatorClient> mutatorClient; 39 std::unique_ptr<CompositorMutatorClient> mutatorClient;
40 WaitableEvent doneEvent; 40 WaitableEvent doneEvent;
41 if (WebThread* compositorThread = Platform::current()->compositorThread()) { 41 if (WebThread* compositorThread = Platform::current()->compositorThread()) {
42 compositorThread->getWebTaskRunner()->postTask( 42 compositorThread->getWebTaskRunner()->postTask(
43 BLINK_FROM_HERE, crossThreadBind(&createCompositorMutatorClient, 43 BLINK_FROM_HERE, crossThreadBind(&createCompositorMutatorClient,
44 crossThreadUnretained(&mutatorClient), 44 crossThreadUnretained(&mutatorClient),
45 crossThreadUnretained(&doneEvent))); 45 crossThreadUnretained(&doneEvent)));
46 } else { 46 } else {
47 createCompositorMutatorClient(&mutatorClient, &doneEvent); 47 createCompositorMutatorClient(&mutatorClient, &doneEvent);
48 } 48 }
49 // TODO(flackr): Instead of waiting for this event, we may be able to just set the 49 // TODO(flackr): Instead of waiting for this event, we may be able to just set
50 // mutator on the CompositorProxyClient directly from the compositor thread be fore 50 // the mutator on the CompositorProxyClient directly from the compositor
51 // it gets used there. We still need to make sure we only create one mutator t hough. 51 // thread before it gets used there. We still need to make sure we only
52 // create one mutator though.
52 doneEvent.wait(); 53 doneEvent.wait();
53 return mutatorClient; 54 return mutatorClient;
54 } 55 }
55 56
56 CompositorMutatorImpl* CompositorMutatorImpl::create() { 57 CompositorMutatorImpl* CompositorMutatorImpl::create() {
57 return new CompositorMutatorImpl(); 58 return new CompositorMutatorImpl();
58 } 59 }
59 60
60 bool CompositorMutatorImpl::mutate( 61 bool CompositorMutatorImpl::mutate(
61 double monotonicTimeNow, 62 double monotonicTimeNow,
(...skipping 24 matching lines...) Expand all
86 DCHECK(m_proxyClients.contains(client)); 87 DCHECK(m_proxyClients.contains(client));
87 m_proxyClients.remove(client); 88 m_proxyClients.remove(client);
88 } 89 }
89 90
90 void CompositorMutatorImpl::setNeedsMutate() { 91 void CompositorMutatorImpl::setNeedsMutate() {
91 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::setNeedsMutate"); 92 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::setNeedsMutate");
92 m_client->setNeedsMutate(); 93 m_client->setNeedsMutate();
93 } 94 }
94 95
95 } // namespace blink 96 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/CompositorMutatorImpl.h ('k') | third_party/WebKit/Source/web/CompositorProxyClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698