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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Computes the size of an image row including alignment padding 119 // Computes the size of an image row including alignment padding
120 static bool ComputeImagePaddedRowSize( 120 static bool ComputeImagePaddedRowSize(
121 int width, int format, int type, int unpack_alignment, 121 int width, int format, int type, int unpack_alignment,
122 uint32_t* padded_row_size); 122 uint32_t* padded_row_size);
123 123
124 // Computes the size of image data for TexImage2D and TexSubImage2D. 124 // Computes the size of image data for TexImage2D and TexSubImage2D.
125 // Optionally the unpadded and padded row sizes can be returned. If height < 2 125 // Optionally the unpadded and padded row sizes can be returned. If height < 2
126 // then the padded_row_size will be the same as the unpadded_row_size since 126 // then the padded_row_size will be the same as the unpadded_row_size since
127 // padding is not necessary. 127 // padding is not necessary.
128 static bool ComputeImageDataSizes( 128 static bool ComputeImageDataSizes(
129 int width, int height, int format, int type, int unpack_alignment, 129 int width, int height, int depth, int format, int type,
130 uint32_t* size, uint32_t* unpadded_row_size, uint32_t* padded_row_size); 130 int unpack_alignment, uint32_t* size, uint32_t* unpadded_row_size,
131 uint32_t* padded_row_size);
131 132
132 static size_t RenderbufferBytesPerPixel(int format); 133 static size_t RenderbufferBytesPerPixel(int format);
133 134
134 static uint32_t GetGLDataTypeSizeForUniforms(int type); 135 static uint32_t GetGLDataTypeSizeForUniforms(int type);
135 136
136 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32_t type); 137 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32_t type);
137 138
138 static uint32_t GLErrorToErrorBit(uint32_t gl_error); 139 static uint32_t GLErrorToErrorBit(uint32_t gl_error);
139 140
140 static uint32_t GLErrorBitToGLError(uint32_t error_bit); 141 static uint32_t GLErrorBitToGLError(uint32_t error_bit);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 bool bind_generates_resource; 216 bool bind_generates_resource;
216 bool fail_if_major_perf_caveat; 217 bool fail_if_major_perf_caveat;
217 bool lose_context_when_out_of_memory; 218 bool lose_context_when_out_of_memory;
218 }; 219 };
219 220
220 } // namespace gles2 221 } // namespace gles2
221 } // namespace gpu 222 } // namespace gpu
222 223
223 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 224 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
224 225
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_ids_autogen.h ('k') | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698