OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 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 "../common/buffer.h" | 8 #include "../common/buffer.h" |
9 #include "../common/constants.h" | 9 #include "../common/constants.h" |
10 | 10 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 virtual void SetToken(int32 token) = 0; | 127 virtual void SetToken(int32 token) = 0; |
128 | 128 |
129 // Allows the reader to set the current parse error. | 129 // Allows the reader to set the current parse error. |
130 virtual void SetParseError(error::Error) = 0; | 130 virtual void SetParseError(error::Error) = 0; |
131 | 131 |
132 // Allows the reader to set the current context lost reason. | 132 // Allows the reader to set the current context lost reason. |
133 // NOTE: if calling this in conjunction with SetParseError, | 133 // NOTE: if calling this in conjunction with SetParseError, |
134 // call this first. | 134 // call this first. |
135 virtual void SetContextLostReason(error::ContextLostReason) = 0; | 135 virtual void SetContextLostReason(error::ContextLostReason) = 0; |
136 | 136 |
| 137 // TODO(apatrick): this is a temporary optimization while skia is calling |
| 138 // RendererGLContext::MakeCurrent prior to every GL call. It saves returning 6 |
| 139 // ints redundantly when only the error is needed for the CommandBufferProxy |
| 140 // implementation. |
| 141 virtual error::Error GetLastError(); |
| 142 |
137 private: | 143 private: |
138 DISALLOW_COPY_AND_ASSIGN(CommandBuffer); | 144 DISALLOW_COPY_AND_ASSIGN(CommandBuffer); |
139 }; | 145 }; |
140 | 146 |
141 } // namespace gpu | 147 } // namespace gpu |
142 | 148 |
143 #endif // GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ | 149 #endif // GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ |
OLD | NEW |