| 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 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 uint64_t v64, uint32_t* v32_0, uint32_t* v32_1); | 214 uint64_t v64, uint32_t* v32_0, uint32_t* v32_1); |
| 215 static uint64_t MapTwoUint32ToUint64(uint32_t v32_0, uint32_t v32_1); | 215 static uint64_t MapTwoUint32ToUint64(uint32_t v32_0, uint32_t v32_1); |
| 216 | 216 |
| 217 static uint32_t MapBufferTargetToBindingEnum(uint32_t target); | 217 static uint32_t MapBufferTargetToBindingEnum(uint32_t target); |
| 218 | 218 |
| 219 static bool IsUnsignedIntegerFormat(uint32_t internal_format); | 219 static bool IsUnsignedIntegerFormat(uint32_t internal_format); |
| 220 static bool IsSignedIntegerFormat(uint32_t internal_format); | 220 static bool IsSignedIntegerFormat(uint32_t internal_format); |
| 221 static bool IsIntegerFormat(uint32_t internal_format); | 221 static bool IsIntegerFormat(uint32_t internal_format); |
| 222 static bool IsFloatFormat(uint32_t internal_format); | 222 static bool IsFloatFormat(uint32_t internal_format); |
| 223 | 223 |
| 224 static bool IsSizedColorFormat(uint32_t internal_format); |
| 225 static void GetColorFormatComponentSizes( |
| 226 uint32_t internal_format, uint32_t type, int* r, int* g, int* b, int* a); |
| 227 |
| 224 // Computes the data size for certain gl commands like glUniform. | 228 // Computes the data size for certain gl commands like glUniform. |
| 225 static bool ComputeDataSize(uint32_t count, | 229 static bool ComputeDataSize(uint32_t count, |
| 226 size_t size, | 230 size_t size, |
| 227 unsigned int elements_per_unit, | 231 unsigned int elements_per_unit, |
| 228 uint32_t* dst); | 232 uint32_t* dst); |
| 229 | 233 |
| 230 #include "../common/gles2_cmd_utils_autogen.h" | 234 #include "../common/gles2_cmd_utils_autogen.h" |
| 231 | 235 |
| 232 private: | 236 private: |
| 233 static std::string GetQualifiedEnumString( | 237 static std::string GetQualifiedEnumString( |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 bool fail_if_major_perf_caveat; | 302 bool fail_if_major_perf_caveat; |
| 299 bool lose_context_when_out_of_memory; | 303 bool lose_context_when_out_of_memory; |
| 300 ContextType context_type; | 304 ContextType context_type; |
| 301 }; | 305 }; |
| 302 | 306 |
| 303 } // namespace gles2 | 307 } // namespace gles2 |
| 304 } // namespace gpu | 308 } // namespace gpu |
| 305 | 309 |
| 306 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 310 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ |
| 307 | 311 |
| OLD | NEW |