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 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 "base/logging.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include <public/WebCompositorOutputSurface.h> | 11 #include <public/WebCompositorOutputSurface.h> |
| 12 #include "cc/cc_export.h" |
12 | 13 |
13 namespace gfx { | 14 namespace gfx { |
14 class Rect; | 15 class Rect; |
15 } | 16 } |
16 | 17 |
17 namespace cc { | 18 namespace cc { |
18 | 19 |
19 class Thread; | 20 class Thread; |
20 class IntSize; | 21 class IntSize; |
21 struct RenderingStats; | 22 struct RenderingStats; |
22 struct RendererCapabilities; | 23 struct RendererCapabilities; |
23 | 24 |
24 // Abstract class responsible for proxying commands from the main-thread side of | 25 // Abstract class responsible for proxying commands from the main-thread side of |
25 // the compositor over to the compositor implementation. | 26 // the compositor over to the compositor implementation. |
26 class Proxy { | 27 class CC_EXPORT Proxy { |
27 public: | 28 public: |
28 static void setMainThread(Thread*); | 29 static void setMainThread(Thread*); |
29 static Thread* mainThread(); | 30 static Thread* mainThread(); |
30 | 31 |
31 static bool hasImplThread(); | 32 static bool hasImplThread(); |
32 static void setImplThread(Thread*); | 33 static void setImplThread(Thread*); |
33 static Thread* implThread(); | 34 static Thread* implThread(); |
34 | 35 |
35 // Returns 0 if the current thread is neither the main thread nor the impl t
hread. | 36 // Returns 0 if the current thread is neither the main thread nor the impl t
hread. |
36 static Thread* currentThread(); | 37 static Thread* currentThread(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 #ifndef NDEBUG | 128 #ifndef NDEBUG |
128 DCHECK(Proxy::isMainThreadBlocked()); | 129 DCHECK(Proxy::isMainThreadBlocked()); |
129 Proxy::setMainThreadBlocked(false); | 130 Proxy::setMainThreadBlocked(false); |
130 #endif | 131 #endif |
131 } | 132 } |
132 }; | 133 }; |
133 | 134 |
134 } | 135 } |
135 | 136 |
136 #endif | 137 #endif |
OLD | NEW |