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

Side by Side Diff: cc/proxy.h

Issue 11192030: cc: Switch to Chromium DCHECKs LOGs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseonenne 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
« no previous file with comments | « cc/program_binding.cc ('k') | cc/proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CCProxy_h 5 #ifndef CCProxy_h
6 #define CCProxy_h 6 #define CCProxy_h
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/logging.h"
9 #include <public/WebCompositorOutputSurface.h> 10 #include <public/WebCompositorOutputSurface.h>
10 11
11 namespace cc { 12 namespace cc {
12 13
13 class CCThread; 14 class CCThread;
14 class IntRect; 15 class IntRect;
15 class IntSize; 16 class IntSize;
16 struct CCRenderingStats; 17 struct CCRenderingStats;
17 struct RendererCapabilities; 18 struct RendererCapabilities;
18 19
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // Forces 3D commands on all contexts to wait for all previous SwapBuffers t o finish before executing in the GPU 75 // Forces 3D commands on all contexts to wait for all previous SwapBuffers t o finish before executing in the GPU
75 // process. 76 // process.
76 virtual void forceSerializeOnSwapBuffers() = 0; 77 virtual void forceSerializeOnSwapBuffers() = 0;
77 78
78 // Maximum number of sub-region texture updates supported for each commit. 79 // Maximum number of sub-region texture updates supported for each commit.
79 virtual size_t maxPartialTextureUpdates() const = 0; 80 virtual size_t maxPartialTextureUpdates() const = 0;
80 81
81 virtual void acquireLayerTextures() = 0; 82 virtual void acquireLayerTextures() = 0;
82 83
83 // Debug hooks 84 // Debug hooks
84 #ifndef NDEBUG
85 static bool isMainThread(); 85 static bool isMainThread();
86 static bool isImplThread(); 86 static bool isImplThread();
87 static bool isMainThreadBlocked(); 87 static bool isMainThreadBlocked();
88 #ifndef NDEBUG
88 static void setMainThreadBlocked(bool); 89 static void setMainThreadBlocked(bool);
89 #endif 90 #endif
90 91
91 // Testing hooks 92 // Testing hooks
92 virtual void loseContext() = 0; 93 virtual void loseContext() = 0;
93 94
94 #ifndef NDEBUG 95 #ifndef NDEBUG
95 static void setCurrentThreadIsImplThread(bool); 96 static void setCurrentThreadIsImplThread(bool);
96 #endif 97 #endif
97 98
98 protected: 99 protected:
99 CCProxy(); 100 CCProxy();
100 friend class DebugScopedSetImplThread; 101 friend class DebugScopedSetImplThread;
101 friend class DebugScopedSetMainThreadBlocked; 102 friend class DebugScopedSetMainThreadBlocked;
102 103
103 private: 104 private:
104 DISALLOW_COPY_AND_ASSIGN(CCProxy); 105 DISALLOW_COPY_AND_ASSIGN(CCProxy);
105 }; 106 };
106 107
107 class DebugScopedSetMainThreadBlocked { 108 class DebugScopedSetMainThreadBlocked {
108 public: 109 public:
109 DebugScopedSetMainThreadBlocked() 110 DebugScopedSetMainThreadBlocked()
110 { 111 {
111 #if !ASSERT_DISABLED 112 #ifndef NDEBUG
112 ASSERT(!CCProxy::isMainThreadBlocked()); 113 DCHECK(!CCProxy::isMainThreadBlocked());
113 CCProxy::setMainThreadBlocked(true); 114 CCProxy::setMainThreadBlocked(true);
114 #endif 115 #endif
115 } 116 }
116 ~DebugScopedSetMainThreadBlocked() 117 ~DebugScopedSetMainThreadBlocked()
117 { 118 {
118 #if !ASSERT_DISABLED 119 #ifndef NDEBUG
119 ASSERT(CCProxy::isMainThreadBlocked()); 120 DCHECK(CCProxy::isMainThreadBlocked());
120 CCProxy::setMainThreadBlocked(false); 121 CCProxy::setMainThreadBlocked(false);
121 #endif 122 #endif
122 } 123 }
123 }; 124 };
124 125
125 } 126 }
126 127
127 #endif 128 #endif
OLDNEW
« no previous file with comments | « cc/program_binding.cc ('k') | cc/proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698