Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_utils.h

Issue 10012057: Add GL_EXT_unpack_subimage support to command buffer client code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 void set_num_shader_binary_formats(int num_shader_binary_formats) { 98 void set_num_shader_binary_formats(int num_shader_binary_formats) {
99 num_shader_binary_formats_ = num_shader_binary_formats; 99 num_shader_binary_formats_ = num_shader_binary_formats;
100 } 100 }
101 101
102 // Gets the number of values a particular id will return when a glGet 102 // Gets the number of values a particular id will return when a glGet
103 // function is called. If 0 is returned the id is invalid. 103 // function is called. If 0 is returned the id is invalid.
104 int GLGetNumValuesReturned(int id) const; 104 int GLGetNumValuesReturned(int id) const;
105 105
106 // Computes the size of a single group of elements from a format and type pair
107 static uint32 ComputeImageGroupSize(int format, int type);
108
109 // Computes the size of an image row including alignment padding
110 static bool ComputeImagePaddedRowSize(
111 int width, int format, int type, int unpack_alignment,
112 uint32* padded_row_size);
113
106 // Computes the size of image data for TexImage2D and TexSubImage2D. 114 // Computes the size of image data for TexImage2D and TexSubImage2D.
107 static bool ComputeImageDataSize( 115 // Optionally the unpadded and padded row sizes can be returned. If height < 2
116 // then the padded_row_size will be the same as the unpadded_row_size since
117 // padding is not necessary.
118 static bool ComputeImageDataSizes(
108 int width, int height, int format, int type, int unpack_alignment, 119 int width, int height, int format, int type, int unpack_alignment,
109 uint32* size); 120 uint32* size, uint32* unpadded_row_size, uint32* padded_row_size);
110 121
111 static size_t RenderbufferBytesPerPixel(int format); 122 static size_t RenderbufferBytesPerPixel(int format);
112 123
113 static uint32 GetGLDataTypeSizeForUniforms(int type); 124 static uint32 GetGLDataTypeSizeForUniforms(int type);
114 125
115 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32 type); 126 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32 type);
116 127
117 static uint32 GLErrorToErrorBit(uint32 gl_error); 128 static uint32 GLErrorToErrorBit(uint32 gl_error);
118 129
119 static uint32 GLErrorBitToGLError(uint32 error_bit); 130 static uint32 GLErrorBitToGLError(uint32 error_bit);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 bool buffer_preserved_; 176 bool buffer_preserved_;
166 bool share_resources_; 177 bool share_resources_;
167 bool bind_generates_resource_; 178 bool bind_generates_resource_;
168 }; 179 };
169 180
170 } // namespace gles2 181 } // namespace gles2
171 } // namespace gpu 182 } // namespace gpu
172 183
173 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 184 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
174 185
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_unittest.cc ('k') | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698