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

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

Issue 6028005: Make CopyTexImage2D and CopyTexSubImage2D fail if... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 static uint32 GetGLDataTypeSizeForUniforms(int type); 73 static uint32 GetGLDataTypeSizeForUniforms(int type);
74 74
75 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32 type); 75 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32 type);
76 76
77 static uint32 GLErrorToErrorBit(uint32 gl_error); 77 static uint32 GLErrorToErrorBit(uint32 gl_error);
78 78
79 static uint32 GLErrorBitToGLError(uint32 error_bit); 79 static uint32 GLErrorBitToGLError(uint32 error_bit);
80 80
81 static uint32 IndexToGLFaceTarget(int index); 81 static uint32 IndexToGLFaceTarget(int index);
82 82
83 // Returns a bitmask for the channels the given format supports where
84 // 0x1 is red
85 // 0x2 is green
86 // 0x4 is blue
87 // 0x8 is alpha
88 static uint32 GetChannelsForFormat(int format);
89
83 static bool IsNPOT(uint32 value) { 90 static bool IsNPOT(uint32 value) {
84 return value > 0 && (value & (value - 1)) != 0; 91 return value > 0 && (value & (value - 1)) != 0;
85 } 92 }
86 93
87 private: 94 private:
88 int num_compressed_texture_formats_; 95 int num_compressed_texture_formats_;
89 }; 96 };
90 97
91 } // namespace gles2 98 } // namespace gles2
92 } // namespace gpu 99 } // namespace gpu
93 100
94 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 101 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
95 102
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