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

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

Issue 1925093002: Handle compressed textures allocated via TexStorage2D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed obsolete method and fixed tests. Created 4 years, 7 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Optionally the skipped bytes in the beginning can be returned. 139 // Optionally the skipped bytes in the beginning can be returned.
140 // Note the returned |size| does NOT include |skip_size|. 140 // Note the returned |size| does NOT include |skip_size|.
141 // TODO(zmo): merging ComputeImageDataSize and ComputeImageDataSizeES3. 141 // TODO(zmo): merging ComputeImageDataSize and ComputeImageDataSizeES3.
142 static bool ComputeImageDataSizesES3( 142 static bool ComputeImageDataSizesES3(
143 int width, int height, int depth, int format, int type, 143 int width, int height, int depth, int format, int type,
144 const PixelStoreParams& params, 144 const PixelStoreParams& params,
145 uint32_t* size, uint32_t* opt_unpadded_row_size, 145 uint32_t* size, uint32_t* opt_unpadded_row_size,
146 uint32_t* opt_padded_row_size, uint32_t* opt_skip_size, 146 uint32_t* opt_padded_row_size, uint32_t* opt_skip_size,
147 uint32_t* opt_padding); 147 uint32_t* opt_padding);
148 148
149 static bool IsCompressedTextureFormat(int internal_format);
Zhenyao Mo 2016/04/28 17:57:12 You don't have to redefined this function. We alr
Ken Russell (switch to Gerrit) 2016/04/29 13:10:06 Thanks for pointing this out. It's necessary to ca
150
149 static size_t RenderbufferBytesPerPixel(int format); 151 static size_t RenderbufferBytesPerPixel(int format);
150 152
151 // Return the element's number of bytes. 153 // Return the element's number of bytes.
152 // For example, GL_FLOAT_MAT3 returns sizeof(GLfloat). 154 // For example, GL_FLOAT_MAT3 returns sizeof(GLfloat).
153 static uint32_t GetElementSizeForUniformType(int type); 155 static uint32_t GetElementSizeForUniformType(int type);
154 // Return the number of elements. 156 // Return the number of elements.
155 // For example, GL_FLOAT_MAT3 returns 9. 157 // For example, GL_FLOAT_MAT3 returns 9.
156 static uint32_t GetElementCountForUniformType(int type); 158 static uint32_t GetElementCountForUniformType(int type);
157 159
158 static size_t GetGLTypeSizeForTextures(uint32_t type); 160 static size_t GetGLTypeSizeForTextures(uint32_t type);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 bool fail_if_major_perf_caveat; 293 bool fail_if_major_perf_caveat;
292 bool lose_context_when_out_of_memory; 294 bool lose_context_when_out_of_memory;
293 ContextType context_type; 295 ContextType context_type;
294 }; 296 };
295 297
296 } // namespace gles2 298 } // namespace gles2
297 } // namespace gpu 299 } // namespace gpu
298 300
299 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 301 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
300 302
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698