OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ |
6 #define GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ | 6 #define GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ |
7 | 7 |
8 #include "../../gpu_export.h" | 8 #include "../../gpu_export.h" |
9 #include "../common/buffer.h" | 9 #include "../common/buffer.h" |
10 #include "../common/constants.h" | 10 #include "../common/constants.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 virtual void SetToken(int32 token) = 0; | 128 virtual void SetToken(int32 token) = 0; |
129 | 129 |
130 // Allows the reader to set the current parse error. | 130 // Allows the reader to set the current parse error. |
131 virtual void SetParseError(error::Error) = 0; | 131 virtual void SetParseError(error::Error) = 0; |
132 | 132 |
133 // Allows the reader to set the current context lost reason. | 133 // Allows the reader to set the current context lost reason. |
134 // NOTE: if calling this in conjunction with SetParseError, | 134 // NOTE: if calling this in conjunction with SetParseError, |
135 // call this first. | 135 // call this first. |
136 virtual void SetContextLostReason(error::ContextLostReason) = 0; | 136 virtual void SetContextLostReason(error::ContextLostReason) = 0; |
137 | 137 |
| 138 // The NaCl Win64 build only really needs the struct definitions above; having |
| 139 // GetLastError declared would mean we'd have to also define it, and pull more |
| 140 // of gpu in to the NaCl Win64 build. |
| 141 #if !defined(NACL_WIN64) |
138 // TODO(apatrick): this is a temporary optimization while skia is calling | 142 // TODO(apatrick): this is a temporary optimization while skia is calling |
139 // RendererGLContext::MakeCurrent prior to every GL call. It saves returning 6 | 143 // RendererGLContext::MakeCurrent prior to every GL call. It saves returning 6 |
140 // ints redundantly when only the error is needed for the CommandBufferProxy | 144 // ints redundantly when only the error is needed for the CommandBufferProxy |
141 // implementation. | 145 // implementation. |
142 virtual error::Error GetLastError(); | 146 virtual error::Error GetLastError(); |
| 147 #endif |
143 | 148 |
144 private: | 149 private: |
145 DISALLOW_COPY_AND_ASSIGN(CommandBuffer); | 150 DISALLOW_COPY_AND_ASSIGN(CommandBuffer); |
146 }; | 151 }; |
147 | 152 |
148 } // namespace gpu | 153 } // namespace gpu |
149 | 154 |
150 #endif // GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ | 155 #endif // GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ |
OLD | NEW |