| OLD | NEW |
| 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 #include "web/CompositorProxyClientImpl.h" | 5 #include "web/CompositorProxyClientImpl.h" |
| 6 | 6 |
| 7 #include "core/dom/CompositorProxy.h" | 7 #include "core/dom/CompositorProxy.h" |
| 8 #include "modules/compositorworker/CompositorWorkerGlobalScope.h" | 8 #include "modules/compositorworker/CompositorWorkerGlobalScope.h" |
| 9 #include "platform/TraceEvent.h" | 9 #include "platform/TraceEvent.h" |
| 10 #include "platform/graphics/CompositorMutableStateProvider.h" | 10 #include "platform/graphics/CompositorMutableStateProvider.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 ~ScopedCompositorMutableState() | 30 ~ScopedCompositorMutableState() |
| 31 { | 31 { |
| 32 for (CompositorProxy* proxy : m_proxies) | 32 for (CompositorProxy* proxy : m_proxies) |
| 33 proxy->takeCompositorMutableState(nullptr); | 33 proxy->takeCompositorMutableState(nullptr); |
| 34 } | 34 } |
| 35 private: | 35 private: |
| 36 HeapHashSet<WeakMember<CompositorProxy>>& m_proxies; | 36 HeapHashSet<WeakMember<CompositorProxy>>& m_proxies; |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 CompositorProxyClientImpl::CompositorProxyClientImpl(CompositorMutatorImpl* muta
tor) | 39 CompositorProxyClientImpl::CompositorProxyClientImpl(CompositorMutatorImpl* muta
tor, WorkerClients& clients) |
| 40 : m_mutator(mutator) | 40 : CompositorProxyClient(clients) |
| 41 , m_mutator(mutator) |
| 41 , m_globalScope(nullptr) | 42 , m_globalScope(nullptr) |
| 42 { | 43 { |
| 43 } | 44 } |
| 44 | 45 |
| 45 DEFINE_TRACE(CompositorProxyClientImpl) | 46 DEFINE_TRACE(CompositorProxyClientImpl) |
| 46 { | 47 { |
| 47 CompositorProxyClient::trace(visitor); | 48 CompositorProxyClient::trace(visitor); |
| 48 visitor->trace(m_mutator); | 49 visitor->trace(m_mutator); |
| 49 visitor->trace(m_globalScope); | 50 visitor->trace(m_globalScope); |
| 50 visitor->trace(m_proxies); | 51 visitor->trace(m_proxies); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 { | 97 { |
| 97 m_proxies.add(proxy); | 98 m_proxies.add(proxy); |
| 98 } | 99 } |
| 99 | 100 |
| 100 void CompositorProxyClientImpl::unregisterCompositorProxy(CompositorProxy* proxy
) | 101 void CompositorProxyClientImpl::unregisterCompositorProxy(CompositorProxy* proxy
) |
| 101 { | 102 { |
| 102 m_proxies.remove(proxy); | 103 m_proxies.remove(proxy); |
| 103 } | 104 } |
| 104 | 105 |
| 105 } // namespace blink | 106 } // namespace blink |
| OLD | NEW |