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

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

Issue 1308313008: Fix ReadPixels implementation specific read format/type on desktop GL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clear
Patch Set: Created 5 years, 3 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 static size_t GetGLTypeSizeForPathCoordType(uint32_t type); 130 static size_t GetGLTypeSizeForPathCoordType(uint32_t type);
131 131
132 static uint32_t GLErrorToErrorBit(uint32_t gl_error); 132 static uint32_t GLErrorToErrorBit(uint32_t gl_error);
133 133
134 static uint32_t GLErrorBitToGLError(uint32_t error_bit); 134 static uint32_t GLErrorBitToGLError(uint32_t error_bit);
135 135
136 static uint32_t IndexToGLFaceTarget(int index); 136 static uint32_t IndexToGLFaceTarget(int index);
137 137
138 static size_t GLTargetToFaceIndex(uint32_t target); 138 static size_t GLTargetToFaceIndex(uint32_t target);
139 139
140 static uint32_t GetPreferredGLReadPixelsFormat(uint32_t internal_format); 140 static uint32_t GetGLReadPixelsImplementationFormat(
141 uint32_t internal_format);
141 142
142 static uint32_t GetPreferredGLReadPixelsType( 143 static uint32_t GetGLReadPixelsImplementationType(
143 uint32_t internal_format, uint32_t texture_type); 144 uint32_t internal_format, uint32_t texture_type);
144 145
145 // Returns a bitmask for the channels the given format supports. 146 // Returns a bitmask for the channels the given format supports.
146 // See ChannelBits. 147 // See ChannelBits.
147 static uint32_t GetChannelsForFormat(int format); 148 static uint32_t GetChannelsForFormat(int format);
148 149
149 // Returns a bitmask for the channels the given attachment type needs. 150 // Returns a bitmask for the channels the given attachment type needs.
150 static uint32_t GetChannelsNeededForAttachmentType( 151 static uint32_t GetChannelsNeededForAttachmentType(
151 int type, uint32_t max_color_attachments); 152 int type, uint32_t max_color_attachments);
152 153
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 bool lose_context_when_out_of_memory; 225 bool lose_context_when_out_of_memory;
225 // 0 if not a WebGL context. 226 // 0 if not a WebGL context.
226 unsigned webgl_version; 227 unsigned webgl_version;
227 }; 228 };
228 229
229 } // namespace gles2 230 } // namespace gles2
230 } // namespace gpu 231 } // namespace gpu
231 232
232 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 233 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
233 234
OLDNEW
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698