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

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

Issue 413953002: Reuse GLES2Util code instead of defining new function in TextureManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 static uint32_t GetGLDataTypeSizeForUniforms(int type); 134 static uint32_t GetGLDataTypeSizeForUniforms(int type);
135 135
136 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32_t type); 136 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32_t type);
137 137
138 static uint32_t GLErrorToErrorBit(uint32_t gl_error); 138 static uint32_t GLErrorToErrorBit(uint32_t gl_error);
139 139
140 static uint32_t GLErrorBitToGLError(uint32_t error_bit); 140 static uint32_t GLErrorBitToGLError(uint32_t error_bit);
141 141
142 static uint32_t IndexToGLFaceTarget(int index); 142 static uint32_t IndexToGLFaceTarget(int index);
143 143
144 static size_t GLTargetToFaceIndex(uint32_t target);
145
144 static uint32_t GetPreferredGLReadPixelsFormat(uint32_t internal_format); 146 static uint32_t GetPreferredGLReadPixelsFormat(uint32_t internal_format);
145 147
146 static uint32_t GetPreferredGLReadPixelsType( 148 static uint32_t GetPreferredGLReadPixelsType(
147 uint32_t internal_format, uint32_t texture_type); 149 uint32_t internal_format, uint32_t texture_type);
148 150
149 // Returns a bitmask for the channels the given format supports. 151 // Returns a bitmask for the channels the given format supports.
150 // See ChannelBits. 152 // See ChannelBits.
151 static uint32_t GetChannelsForFormat(int format); 153 static uint32_t GetChannelsForFormat(int format);
152 154
153 // Returns a bitmask for the channels the given attachment type needs. 155 // Returns a bitmask for the channels the given attachment type needs.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool bind_generates_resource_; 211 bool bind_generates_resource_;
210 bool fail_if_major_perf_caveat_; 212 bool fail_if_major_perf_caveat_;
211 bool lose_context_when_out_of_memory_; 213 bool lose_context_when_out_of_memory_;
212 }; 214 };
213 215
214 } // namespace gles2 216 } // namespace gles2
215 } // namespace gpu 217 } // namespace gpu
216 218
217 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 219 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
218 220
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698