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

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

Issue 1988303002: Fix depth texture sampling on compatibility profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 13 matching lines...) Expand all
24 #include "gpu/command_buffer/service/test_helper.h" 24 #include "gpu/command_buffer/service/test_helper.h"
25 #include "gpu/command_buffer/service/vertex_attrib_manager.h" 25 #include "gpu/command_buffer/service/vertex_attrib_manager.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 #include "ui/gl/gl_implementation.h" 27 #include "ui/gl/gl_implementation.h"
28 #include "ui/gl/gl_mock.h" 28 #include "ui/gl/gl_mock.h"
29 #include "ui/gl/test/gl_surface_test_support.h" 29 #include "ui/gl/test/gl_surface_test_support.h"
30 30
31 using ::gfx::MockGLInterface; 31 using ::gfx::MockGLInterface;
32 using ::testing::_; 32 using ::testing::_;
33 using ::testing::AnyNumber; 33 using ::testing::AnyNumber;
34 using ::testing::AtMost;
34 using ::testing::DoAll; 35 using ::testing::DoAll;
35 using ::testing::InSequence; 36 using ::testing::InSequence;
36 using ::testing::Invoke; 37 using ::testing::Invoke;
37 using ::testing::InvokeWithoutArgs; 38 using ::testing::InvokeWithoutArgs;
38 using ::testing::MatcherCast; 39 using ::testing::MatcherCast;
39 using ::testing::Pointee; 40 using ::testing::Pointee;
40 using ::testing::Return; 41 using ::testing::Return;
41 using ::testing::SetArrayArgument; 42 using ::testing::SetArrayArgument;
42 using ::testing::SetArgPointee; 43 using ::testing::SetArgPointee;
43 using ::testing::SetArgumentPointee; 44 using ::testing::SetArgumentPointee;
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 .Times(1) 1150 .Times(1)
1150 .RetiresOnSaturation(); 1151 .RetiresOnSaturation();
1151 GenHelper<cmds::DeleteRenderbuffersImmediate>(client_id); 1152 GenHelper<cmds::DeleteRenderbuffersImmediate>(client_id);
1152 } 1153 }
1153 1154
1154 void GLES2DecoderTestBase::DoBindTexture( 1155 void GLES2DecoderTestBase::DoBindTexture(
1155 GLenum target, GLuint client_id, GLuint service_id) { 1156 GLenum target, GLuint client_id, GLuint service_id) {
1156 EXPECT_CALL(*gl_, BindTexture(target, service_id)) 1157 EXPECT_CALL(*gl_, BindTexture(target, service_id))
1157 .Times(1) 1158 .Times(1)
1158 .RetiresOnSaturation(); 1159 .RetiresOnSaturation();
1160 if (!group_->feature_info()->gl_version_info().BehavesLikeGLES() &&
1161 group_->feature_info()->gl_version_info().IsAtLeastGL(3, 2)) {
1162 EXPECT_CALL(*gl_, TexParameteri(target, GL_DEPTH_TEXTURE_MODE, GL_RED))
1163 .Times(AtMost(1));
1164 }
1159 cmds::BindTexture cmd; 1165 cmds::BindTexture cmd;
1160 cmd.Init(target, client_id); 1166 cmd.Init(target, client_id);
1161 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1167 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1162 } 1168 }
1163 1169
1164 bool GLES2DecoderTestBase::DoIsTexture(GLuint client_id) { 1170 bool GLES2DecoderTestBase::DoIsTexture(GLuint client_id) {
1165 return IsObjectHelper<cmds::IsTexture, cmds::IsTexture::Result>(client_id); 1171 return IsObjectHelper<cmds::IsTexture, cmds::IsTexture::Result>(client_id);
1166 } 1172 }
1167 1173
1168 void GLES2DecoderTestBase::DoDeleteTexture( 1174 void GLES2DecoderTestBase::DoDeleteTexture(
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 SetupDefaultProgram(); 2063 SetupDefaultProgram();
2058 } 2064 }
2059 2065
2060 // Include the auto-generated part of this file. We split this because it means 2066 // Include the auto-generated part of this file. We split this because it means
2061 // we can easily edit the non-auto generated parts right here in this file 2067 // we can easily edit the non-auto generated parts right here in this file
2062 // instead of having to edit some template or the code generator. 2068 // instead of having to edit some template or the code generator.
2063 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 2069 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
2064 2070
2065 } // namespace gles2 2071 } // namespace gles2
2066 } // namespace gpu 2072 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698