Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 if (client->mutate(monotonicTimeNow, stateProvider)) | 68 if (client->mutate(monotonicTimeNow, stateProvider)) |
| 69 needToReinvoke = true; | 69 needToReinvoke = true; |
| 70 } | 70 } |
| 71 | 71 |
| 72 return needToReinvoke; | 72 return needToReinvoke; |
| 73 } | 73 } |
| 74 | 74 |
| 75 void CompositorMutatorImpl::registerProxyClient(CompositorProxyClientImpl* clien t) | 75 void CompositorMutatorImpl::registerProxyClient(CompositorProxyClientImpl* clien t) |
| 76 { | 76 { |
| 77 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::registerClient"); | 77 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::registerClient"); |
| 78 m_proxyClients.add(client); | 78 m_proxyClients.add(client); |
|
haraken
2016/09/12 11:45:09
Add DCHECK(!m_proxyClients.contains(client)).
keishi
2016/09/13 03:12:42
Done.
| |
| 79 setNeedsMutate(); | 79 setNeedsMutate(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void CompositorMutatorImpl::unregisterProxyClient(CompositorProxyClientImpl* cli ent) | |
| 83 { | |
| 84 m_proxyClients.remove(client); | |
|
haraken
2016/09/12 11:45:09
Add DCHECK(m_proxyClients.contains(client)).
keishi
2016/09/13 03:12:43
Done.
| |
| 85 } | |
| 86 | |
| 82 void CompositorMutatorImpl::setNeedsMutate() | 87 void CompositorMutatorImpl::setNeedsMutate() |
| 83 { | 88 { |
| 84 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::setNeedsMutate"); | 89 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::setNeedsMutate"); |
| 85 m_client->setNeedsMutate(); | 90 m_client->setNeedsMutate(); |
| 86 } | 91 } |
| 87 | 92 |
| 88 } // namespace blink | 93 } // namespace blink |
| OLD | NEW |