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 // This file is here so other GLES2 related files can have a common set of | 5 // This file is here so other GLES2 related files can have a common set of |
6 // includes where appropriate. | 6 // includes where appropriate. |
7 | 7 |
8 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 8 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
9 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 9 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
10 | 10 |
11 #include <limits> | 11 #include <limits> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "../common/types.h" | |
16 #include "gpu/command_buffer/common/gles2_utils_export.h" | 15 #include "gpu/command_buffer/common/gles2_utils_export.h" |
| 16 #include "gpu/command_buffer/common/types.h" |
17 | 17 |
18 namespace gpu { | 18 namespace gpu { |
19 namespace gles2 { | 19 namespace gles2 { |
20 | 20 |
21 // Does a multiply and checks for overflow. If the multiply did not overflow | 21 // Does a multiply and checks for overflow. If the multiply did not overflow |
22 // returns true. | 22 // returns true. |
23 | 23 |
24 // Multiplies 2 32 bit unsigned numbers checking for overflow. | 24 // Multiplies 2 32 bit unsigned numbers checking for overflow. |
25 // If there was no overflow returns true. | 25 // If there was no overflow returns true. |
26 inline bool SafeMultiplyUint32(uint32 a, uint32 b, uint32* dst) { | 26 inline bool SafeMultiplyUint32(uint32 a, uint32 b, uint32* dst) { |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 bool buffer_preserved_; | 191 bool buffer_preserved_; |
192 bool share_resources_; | 192 bool share_resources_; |
193 bool bind_generates_resource_; | 193 bool bind_generates_resource_; |
194 }; | 194 }; |
195 | 195 |
196 } // namespace gles2 | 196 } // namespace gles2 |
197 } // namespace gpu | 197 } // namespace gpu |
198 | 198 |
199 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 199 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
200 | 200 |
OLD | NEW |