| 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 DCHECK(!m_proxyClients.contains(client)); |
| 78 m_proxyClients.add(client); | 79 m_proxyClients.add(client); |
| 79 setNeedsMutate(); | 80 setNeedsMutate(); |
| 80 } | 81 } |
| 81 | 82 |
| 83 void CompositorMutatorImpl::unregisterProxyClient(CompositorProxyClientImpl* cli
ent) |
| 84 { |
| 85 DCHECK(m_proxyClients.contains(client)); |
| 86 m_proxyClients.remove(client); |
| 87 } |
| 88 |
| 82 void CompositorMutatorImpl::setNeedsMutate() | 89 void CompositorMutatorImpl::setNeedsMutate() |
| 83 { | 90 { |
| 84 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::setNeedsMutate"); | 91 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::setNeedsMutate"); |
| 85 m_client->setNeedsMutate(); | 92 m_client->setNeedsMutate(); |
| 86 } | 93 } |
| 87 | 94 |
| 88 } // namespace blink | 95 } // namespace blink |
| OLD | NEW |