Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1853)

Side by Side Diff: cc/single_thread_proxy.h

Issue 10690168: Aura: Resize locks with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address jamesr@ comments. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <limits> 8 #include <limits>
9 9
10 #include "CCAnimationEvents.h" 10 #include "CCAnimationEvents.h"
(...skipping 19 matching lines...) Expand all
30 virtual void setSurfaceReady() OVERRIDE; 30 virtual void setSurfaceReady() OVERRIDE;
31 virtual void setVisible(bool) OVERRIDE; 31 virtual void setVisible(bool) OVERRIDE;
32 virtual bool initializeRenderer() OVERRIDE; 32 virtual bool initializeRenderer() OVERRIDE;
33 virtual bool recreateContext() OVERRIDE; 33 virtual bool recreateContext() OVERRIDE;
34 virtual void renderingStats(RenderingStats*) OVERRIDE; 34 virtual void renderingStats(RenderingStats*) OVERRIDE;
35 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE; 35 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE;
36 virtual void loseContext() OVERRIDE; 36 virtual void loseContext() OVERRIDE;
37 virtual void setNeedsAnimate() OVERRIDE; 37 virtual void setNeedsAnimate() OVERRIDE;
38 virtual void setNeedsCommit() OVERRIDE; 38 virtual void setNeedsCommit() OVERRIDE;
39 virtual void setNeedsRedraw() OVERRIDE; 39 virtual void setNeedsRedraw() OVERRIDE;
40 virtual void setDeferCommits(bool) OVERRIDE;
41 virtual bool deferCommits() const OVERRIDE;
40 virtual bool commitRequested() const OVERRIDE; 42 virtual bool commitRequested() const OVERRIDE;
41 virtual void didAddAnimation() OVERRIDE; 43 virtual void didAddAnimation() OVERRIDE;
42 virtual void start() OVERRIDE; 44 virtual void start() OVERRIDE;
43 virtual void stop() OVERRIDE; 45 virtual void stop() OVERRIDE;
44 virtual size_t maxPartialTextureUpdates() const OVERRIDE; 46 virtual size_t maxPartialTextureUpdates() const OVERRIDE;
45 virtual void acquireLayerTextures() OVERRIDE { } 47 virtual void acquireLayerTextures() OVERRIDE { }
46 virtual void forceSerializeOnSwapBuffers() OVERRIDE; 48 virtual void forceSerializeOnSwapBuffers() OVERRIDE;
47 49
48 // LayerTreeHostImplClient implementation 50 // LayerTreeHostImplClient implementation
49 virtual void didLoseContextOnImplThread() OVERRIDE { } 51 virtual void didLoseContextOnImplThread() OVERRIDE { }
(...skipping 26 matching lines...) Expand all
76 78
77 // Used on the Thread, but checked on main thread during initialization/shut down. 79 // Used on the Thread, but checked on main thread during initialization/shut down.
78 scoped_ptr<LayerTreeHostImpl> m_layerTreeHostImpl; 80 scoped_ptr<LayerTreeHostImpl> m_layerTreeHostImpl;
79 bool m_rendererInitialized; 81 bool m_rendererInitialized;
80 RendererCapabilities m_RendererCapabilitiesForMainThread; 82 RendererCapabilities m_RendererCapabilitiesForMainThread;
81 83
82 bool m_nextFrameIsNewlyCommittedFrame; 84 bool m_nextFrameIsNewlyCommittedFrame;
83 85
84 base::TimeDelta m_totalCommitTime; 86 base::TimeDelta m_totalCommitTime;
85 size_t m_totalCommitCount; 87 size_t m_totalCommitCount;
88
89 bool m_deferCommits;
86 }; 90 };
87 91
88 // For use in the single-threaded case. In debug builds, it pretends that the 92 // For use in the single-threaded case. In debug builds, it pretends that the
89 // code is running on the impl thread to satisfy assertion checks. 93 // code is running on the impl thread to satisfy assertion checks.
90 class DebugScopedSetImplThread { 94 class DebugScopedSetImplThread {
91 public: 95 public:
92 DebugScopedSetImplThread() 96 DebugScopedSetImplThread()
93 { 97 {
94 #ifndef NDEBUG 98 #ifndef NDEBUG
95 Proxy::setCurrentThreadIsImplThread(true); 99 Proxy::setCurrentThreadIsImplThread(true);
(...skipping 30 matching lines...) Expand all
126 // satisfy assertion checks 130 // satisfy assertion checks
127 class DebugScopedSetImplThreadAndMainThreadBlocked { 131 class DebugScopedSetImplThreadAndMainThreadBlocked {
128 private: 132 private:
129 DebugScopedSetImplThread m_implThread; 133 DebugScopedSetImplThread m_implThread;
130 DebugScopedSetMainThreadBlocked m_mainThreadBlocked; 134 DebugScopedSetMainThreadBlocked m_mainThreadBlocked;
131 }; 135 };
132 136
133 } // namespace cc 137 } // namespace cc
134 138
135 #endif 139 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698