| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 102 | 102 | 
| 103   // Gets the number of values a particular id will return when a glGet | 103   // Gets the number of values a particular id will return when a glGet | 
| 104   // function is called. If 0 is returned the id is invalid. | 104   // function is called. If 0 is returned the id is invalid. | 
| 105   int GLGetNumValuesReturned(int id) const; | 105   int GLGetNumValuesReturned(int id) const; | 
| 106 | 106 | 
| 107   // Computes the size of a single group of elements from a format and type pair | 107   // Computes the size of a single group of elements from a format and type pair | 
| 108   static uint32 ComputeImageGroupSize(int format, int type); | 108   static uint32 ComputeImageGroupSize(int format, int type); | 
| 109 | 109 | 
| 110   // Computes the size of an image row including alignment padding | 110   // Computes the size of an image row including alignment padding | 
| 111   static bool ComputeImagePaddedRowSize( | 111   static bool ComputeImagePaddedRowSize( | 
| 112     int width, int format, int type, int unpack_alignment, | 112       int width, int format, int type, int unpack_alignment, | 
| 113     uint32* padded_row_size); | 113       uint32* padded_row_size); | 
| 114 | 114 | 
| 115   // Computes the size of image data for TexImage2D and TexSubImage2D. | 115   // Computes the size of image data for TexImage2D and TexSubImage2D. | 
| 116   // Optionally the unpadded and padded row sizes can be returned. If height < 2 | 116   // Optionally the unpadded and padded row sizes can be returned. If height < 2 | 
| 117   // then the padded_row_size will be the same as the unpadded_row_size since | 117   // then the padded_row_size will be the same as the unpadded_row_size since | 
| 118   // padding is not necessary. | 118   // padding is not necessary. | 
| 119   static bool ComputeImageDataSizes( | 119   static bool ComputeImageDataSizes( | 
| 120     int width, int height, int format, int type, int unpack_alignment, | 120       int width, int height, int format, int type, int unpack_alignment, | 
| 121     uint32* size, uint32* unpadded_row_size, uint32* padded_row_size); | 121       uint32* size, uint32* unpadded_row_size, uint32* padded_row_size); | 
| 122 | 122 | 
| 123   static size_t RenderbufferBytesPerPixel(int format); | 123   static size_t RenderbufferBytesPerPixel(int format); | 
| 124 | 124 | 
| 125   static uint32 GetGLDataTypeSizeForUniforms(int type); | 125   static uint32 GetGLDataTypeSizeForUniforms(int type); | 
| 126 | 126 | 
| 127   static size_t GetGLTypeSizeForTexturesAndBuffers(uint32 type); | 127   static size_t GetGLTypeSizeForTexturesAndBuffers(uint32 type); | 
| 128 | 128 | 
| 129   static uint32 GLErrorToErrorBit(uint32 gl_error); | 129   static uint32 GLErrorToErrorBit(uint32 gl_error); | 
| 130 | 130 | 
| 131   static uint32 GLErrorBitToGLError(uint32 error_bit); | 131   static uint32 GLErrorBitToGLError(uint32 error_bit); | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 190   bool buffer_preserved_; | 190   bool buffer_preserved_; | 
| 191   bool share_resources_; | 191   bool share_resources_; | 
| 192   bool bind_generates_resource_; | 192   bool bind_generates_resource_; | 
| 193 }; | 193 }; | 
| 194 | 194 | 
| 195 }  // namespace gles2 | 195 }  // namespace gles2 | 
| 196 }  // namespace gpu | 196 }  // namespace gpu | 
| 197 | 197 | 
| 198 #endif  // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 198 #endif  // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ | 
| 199 | 199 | 
| OLD | NEW | 
|---|