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

Side by Side Diff: cc/CCSingleThreadProxy.h

Issue 10914304: Add average commit time to perf tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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
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 "CCAnimationEvents.h" 8 #include "CCAnimationEvents.h"
9 #include "CCLayerTreeHostImpl.h" 9 #include "CCLayerTreeHostImpl.h"
10 #include "CCProxy.h" 10 #include "CCProxy.h"
(...skipping 12 matching lines...) Expand all
23 // CCProxy implementation 23 // CCProxy implementation
24 virtual bool compositeAndReadback(void *pixels, const IntRect&) OVERRIDE; 24 virtual bool compositeAndReadback(void *pixels, const IntRect&) OVERRIDE;
25 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, double duration) OVERRIDE; 25 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, double duration) OVERRIDE;
26 virtual void finishAllRendering() OVERRIDE; 26 virtual void finishAllRendering() OVERRIDE;
27 virtual bool isStarted() const OVERRIDE; 27 virtual bool isStarted() const OVERRIDE;
28 virtual bool initializeContext() OVERRIDE; 28 virtual bool initializeContext() OVERRIDE;
29 virtual void setSurfaceReady() OVERRIDE; 29 virtual void setSurfaceReady() OVERRIDE;
30 virtual void setVisible(bool) OVERRIDE; 30 virtual void setVisible(bool) OVERRIDE;
31 virtual bool initializeRenderer() OVERRIDE; 31 virtual bool initializeRenderer() OVERRIDE;
32 virtual bool recreateContext() OVERRIDE; 32 virtual bool recreateContext() OVERRIDE;
33 virtual void implSideRenderingStats(CCRenderingStats&) OVERRIDE; 33 virtual void renderingStats(CCRenderingStats&) OVERRIDE;
34 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE; 34 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE;
35 virtual void loseContext() OVERRIDE; 35 virtual void loseContext() OVERRIDE;
36 virtual void setNeedsAnimate() OVERRIDE; 36 virtual void setNeedsAnimate() OVERRIDE;
37 virtual void setNeedsCommit() OVERRIDE; 37 virtual void setNeedsCommit() OVERRIDE;
38 virtual void setNeedsRedraw() OVERRIDE; 38 virtual void setNeedsRedraw() OVERRIDE;
39 virtual bool commitRequested() const OVERRIDE; 39 virtual bool commitRequested() const OVERRIDE;
40 virtual void didAddAnimation() OVERRIDE; 40 virtual void didAddAnimation() OVERRIDE;
41 virtual void start() OVERRIDE; 41 virtual void start() OVERRIDE;
42 virtual void stop() OVERRIDE; 42 virtual void stop() OVERRIDE;
43 virtual size_t maxPartialTextureUpdates() const OVERRIDE { return std::numer ic_limits<size_t>::max(); } 43 virtual size_t maxPartialTextureUpdates() const OVERRIDE { return std::numer ic_limits<size_t>::max(); }
(...skipping 27 matching lines...) Expand all
71 // Holds on to the context between initializeContext() and initializeRendere r() calls. Shouldn't 71 // Holds on to the context between initializeContext() and initializeRendere r() calls. Shouldn't
72 // be used for anything else. 72 // be used for anything else.
73 OwnPtr<CCGraphicsContext> m_contextBeforeInitialization; 73 OwnPtr<CCGraphicsContext> m_contextBeforeInitialization;
74 74
75 // Used on the CCThread, but checked on main thread during initialization/sh utdown. 75 // Used on the CCThread, but checked on main thread during initialization/sh utdown.
76 OwnPtr<CCLayerTreeHostImpl> m_layerTreeHostImpl; 76 OwnPtr<CCLayerTreeHostImpl> m_layerTreeHostImpl;
77 bool m_rendererInitialized; 77 bool m_rendererInitialized;
78 RendererCapabilities m_RendererCapabilitiesForMainThread; 78 RendererCapabilities m_RendererCapabilitiesForMainThread;
79 79
80 bool m_nextFrameIsNewlyCommittedFrame; 80 bool m_nextFrameIsNewlyCommittedFrame;
81
82 // Statistics
nduca 2012/09/15 00:36:09 not sure we need the comment.
brianderson 2012/09/18 01:16:44 Done.
83 double m_totalCommitTime;
84 size_t m_totalCommitCount;
81 }; 85 };
82 86
83 // For use in the single-threaded case. In debug builds, it pretends that the 87 // For use in the single-threaded case. In debug builds, it pretends that the
84 // code is running on the impl thread to satisfy assertion checks. 88 // code is running on the impl thread to satisfy assertion checks.
85 class DebugScopedSetImplThread { 89 class DebugScopedSetImplThread {
86 public: 90 public:
87 DebugScopedSetImplThread() 91 DebugScopedSetImplThread()
88 { 92 {
89 #if !ASSERT_DISABLED 93 #if !ASSERT_DISABLED
90 CCProxy::setCurrentThreadIsImplThread(true); 94 CCProxy::setCurrentThreadIsImplThread(true);
(...skipping 30 matching lines...) Expand all
121 // satisfy assertion checks 125 // satisfy assertion checks
122 class DebugScopedSetImplThreadAndMainThreadBlocked { 126 class DebugScopedSetImplThreadAndMainThreadBlocked {
123 private: 127 private:
124 DebugScopedSetImplThread m_implThread; 128 DebugScopedSetImplThread m_implThread;
125 DebugScopedSetMainThreadBlocked m_mainThreadBlocked; 129 DebugScopedSetMainThreadBlocked m_mainThreadBlocked;
126 }; 130 };
127 131
128 } // namespace WebCore 132 } // namespace WebCore
129 133
130 #endif 134 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698