| 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/WaitableEvent.h" | 10 #include "platform/WaitableEvent.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 needToReinvoke = true; | 71 needToReinvoke = true; |
| 72 } | 72 } |
| 73 | 73 |
| 74 return needToReinvoke; | 74 return needToReinvoke; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void CompositorMutatorImpl::registerProxyClient( | 77 void CompositorMutatorImpl::registerProxyClient( |
| 78 CompositorProxyClientImpl* client) { | 78 CompositorProxyClientImpl* client) { |
| 79 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::registerClient"); | 79 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::registerClient"); |
| 80 DCHECK(!m_proxyClients.contains(client)); | 80 DCHECK(!m_proxyClients.contains(client)); |
| 81 m_proxyClients.add(client); | 81 m_proxyClients.insert(client); |
| 82 setNeedsMutate(); | 82 setNeedsMutate(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void CompositorMutatorImpl::unregisterProxyClient( | 85 void CompositorMutatorImpl::unregisterProxyClient( |
| 86 CompositorProxyClientImpl* client) { | 86 CompositorProxyClientImpl* client) { |
| 87 DCHECK(m_proxyClients.contains(client)); | 87 DCHECK(m_proxyClients.contains(client)); |
| 88 m_proxyClients.remove(client); | 88 m_proxyClients.remove(client); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void CompositorMutatorImpl::setNeedsMutate() { | 91 void CompositorMutatorImpl::setNeedsMutate() { |
| 92 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::setNeedsMutate"); | 92 TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::setNeedsMutate"); |
| 93 m_client->setNeedsMutate(); | 93 m_client->setNeedsMutate(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace blink | 96 } // namespace blink |
| OLD | NEW |