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

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_utils_unittest.cc

Issue 10635011: Add glBindUniformLocationCHROMIUM (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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) 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 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 5 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 EXPECT_EQ(4u, GLES2Util::RenderbufferBytesPerPixel(GL_RGBA)); 174 EXPECT_EQ(4u, GLES2Util::RenderbufferBytesPerPixel(GL_RGBA));
175 EXPECT_EQ( 175 EXPECT_EQ(
176 4u, GLES2Util::RenderbufferBytesPerPixel(GL_DEPTH24_STENCIL8_OES)); 176 4u, GLES2Util::RenderbufferBytesPerPixel(GL_DEPTH24_STENCIL8_OES));
177 EXPECT_EQ(4u, GLES2Util::RenderbufferBytesPerPixel(GL_RGB8_OES)); 177 EXPECT_EQ(4u, GLES2Util::RenderbufferBytesPerPixel(GL_RGB8_OES));
178 EXPECT_EQ(4u, GLES2Util::RenderbufferBytesPerPixel(GL_RGBA8_OES)); 178 EXPECT_EQ(4u, GLES2Util::RenderbufferBytesPerPixel(GL_RGBA8_OES));
179 EXPECT_EQ( 179 EXPECT_EQ(
180 4u, GLES2Util::RenderbufferBytesPerPixel(GL_DEPTH_COMPONENT24_OES)); 180 4u, GLES2Util::RenderbufferBytesPerPixel(GL_DEPTH_COMPONENT24_OES));
181 EXPECT_EQ(0u, GLES2Util::RenderbufferBytesPerPixel(-1)); 181 EXPECT_EQ(0u, GLES2Util::RenderbufferBytesPerPixel(-1));
182 } 182 }
183 183
184 TEST_F(GLES2UtilTest, SwizzleLocation) {
185 GLint power = 1;
186 for (GLint p = 0; p < 5; ++p, power *= 10) {
187 GLint limit = power * 20 + 1;
188 for (GLint ii = -limit; ii < limit; ii += power) {
189 GLint s = GLES2Util::SwizzleLocation(ii);
190 EXPECT_EQ(ii, GLES2Util::UnswizzleLocation(s));
191 }
192 }
193 }
194
195 } // namespace gles2 184 } // namespace gles2
196 } // namespace gpu 185 } // namespace gpu
197 186
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.cc ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698