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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 2827573007: Reset TexImage2D base level to workaround Intel mac driver bug (Closed)
Patch Set: Add gpu unittests Created 3 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
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/service/gles2_cmd_decoder_unittest_base.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 if (!group_->feature_info()->gl_version_info().BehavesLikeGLES() && 1242 if (!group_->feature_info()->gl_version_info().BehavesLikeGLES() &&
1243 group_->feature_info()->gl_version_info().IsAtLeastGL(3, 2)) { 1243 group_->feature_info()->gl_version_info().IsAtLeastGL(3, 2)) {
1244 EXPECT_CALL(*gl_, TexParameteri(target, GL_DEPTH_TEXTURE_MODE, GL_RED)) 1244 EXPECT_CALL(*gl_, TexParameteri(target, GL_DEPTH_TEXTURE_MODE, GL_RED))
1245 .Times(AtMost(1)); 1245 .Times(AtMost(1));
1246 } 1246 }
1247 cmds::BindTexture cmd; 1247 cmds::BindTexture cmd;
1248 cmd.Init(target, client_id); 1248 cmd.Init(target, client_id);
1249 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1249 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1250 } 1250 }
1251 1251
1252 void GLES2DecoderTestBase::DoTexParameteri(GLenum target,
1253 GLenum pname,
1254 GLint paramGLuint) {
1255 EXPECT_CALL(*gl_, TexParameteri(target, pname, paramGLuint))
1256 .Times(1)
1257 .RetiresOnSaturation();
1258 cmds::TexParameteri cmd;
1259 cmd.Init(target, pname, paramGLuint);
1260 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1261 }
1262
1252 bool GLES2DecoderTestBase::DoIsTexture(GLuint client_id) { 1263 bool GLES2DecoderTestBase::DoIsTexture(GLuint client_id) {
1253 return IsObjectHelper<cmds::IsTexture, cmds::IsTexture::Result>(client_id); 1264 return IsObjectHelper<cmds::IsTexture, cmds::IsTexture::Result>(client_id);
1254 } 1265 }
1255 1266
1256 void GLES2DecoderTestBase::DoDeleteTexture( 1267 void GLES2DecoderTestBase::DoDeleteTexture(
1257 GLuint client_id, GLuint service_id) { 1268 GLuint client_id, GLuint service_id) {
1258 1269
1259 { 1270 {
1260 InSequence s; 1271 InSequence s;
1261 1272
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
2180 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 2191 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
2181 } 2192 }
2182 2193
2183 // Include the auto-generated part of this file. We split this because it means 2194 // Include the auto-generated part of this file. We split this because it means
2184 // we can easily edit the non-auto generated parts right here in this file 2195 // we can easily edit the non-auto generated parts right here in this file
2185 // instead of having to edit some template or the code generator. 2196 // instead of having to edit some template or the code generator.
2186 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 2197 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
2187 2198
2188 } // namespace gles2 2199 } // namespace gles2
2189 } // namespace gpu 2200 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698