| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef CCSingleThreadProxy_h | 5 #ifndef CCSingleThreadProxy_h |
| 6 #define CCSingleThreadProxy_h | 6 #define CCSingleThreadProxy_h |
| 7 | 7 |
| 8 #include "CCAnimationEvents.h" | 8 #include "CCAnimationEvents.h" |
| 9 #include "CCLayerTreeHostImpl.h" | 9 #include "CCLayerTreeHostImpl.h" |
| 10 #include "CCProxy.h" | 10 #include "CCProxy.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 // Used on the CCThread, but checked on main thread during initialization/sh
utdown. | 76 // Used on the CCThread, but checked on main thread during initialization/sh
utdown. |
| 77 OwnPtr<CCLayerTreeHostImpl> m_layerTreeHostImpl; | 77 OwnPtr<CCLayerTreeHostImpl> m_layerTreeHostImpl; |
| 78 bool m_rendererInitialized; | 78 bool m_rendererInitialized; |
| 79 RendererCapabilities m_RendererCapabilitiesForMainThread; | 79 RendererCapabilities m_RendererCapabilitiesForMainThread; |
| 80 | 80 |
| 81 bool m_nextFrameIsNewlyCommittedFrame; | 81 bool m_nextFrameIsNewlyCommittedFrame; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 // For use in the single-threaded case. In debug builds, it pretends that the | 84 // For use in the single-threaded case. In debug builds, it pretends that the |
| 85 // code is running on the thread to satisfy assertion checks. | 85 // code is running on the impl thread to satisfy assertion checks. |
| 86 class DebugScopedSetImplThread { | 86 class DebugScopedSetImplThread { |
| 87 public: | 87 public: |
| 88 DebugScopedSetImplThread() | 88 DebugScopedSetImplThread() |
| 89 { | 89 { |
| 90 #if !ASSERT_DISABLED | 90 #if !ASSERT_DISABLED |
| 91 CCProxy::setCurrentThreadIsImplThread(true); | 91 CCProxy::setCurrentThreadIsImplThread(true); |
| 92 #endif | 92 #endif |
| 93 } | 93 } |
| 94 ~DebugScopedSetImplThread() | 94 ~DebugScopedSetImplThread() |
| 95 { | 95 { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 110 #endif | 110 #endif |
| 111 } | 111 } |
| 112 ~DebugScopedSetMainThread() | 112 ~DebugScopedSetMainThread() |
| 113 { | 113 { |
| 114 #if !ASSERT_DISABLED | 114 #if !ASSERT_DISABLED |
| 115 CCProxy::setCurrentThreadIsImplThread(true); | 115 CCProxy::setCurrentThreadIsImplThread(true); |
| 116 #endif | 116 #endif |
| 117 } | 117 } |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 // For use in the single-threaded case. In debug builds, it pretends that the |
| 121 // code is running on the impl thread and that the main thread is blocked to |
| 122 // satisfy assertion checks |
| 123 class DebugScopedSetImplThreadAndMainThreadBlocked { |
| 124 private: |
| 125 DebugScopedSetImplThread m_implThread; |
| 126 DebugScopedSetMainThreadBlocked m_mainThreadBlocked; |
| 127 }; |
| 128 |
| 120 } // namespace WebCore | 129 } // namespace WebCore |
| 121 | 130 |
| 122 #endif | 131 #endif |
| OLD | NEW |