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

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

Issue 7979031: Code cleanup: rename DisallowedExtensions to DisallowedFeature. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 bool request_depth, 68 bool request_depth,
69 bool request_stencil, 69 bool request_stencil,
70 bool bind_generates_resource) { 70 bool bind_generates_resource) {
71 gl_.reset(new StrictMock<MockGLInterface>()); 71 gl_.reset(new StrictMock<MockGLInterface>());
72 ::gfx::GLInterface::SetGLInterface(gl_.get()); 72 ::gfx::GLInterface::SetGLInterface(gl_.get());
73 group_ = ContextGroup::Ref(new ContextGroup(bind_generates_resource)); 73 group_ = ContextGroup::Ref(new ContextGroup(bind_generates_resource));
74 74
75 InSequence sequence; 75 InSequence sequence;
76 76
77 TestHelper::SetupContextGroupInitExpectations(gl_.get(), 77 TestHelper::SetupContextGroupInitExpectations(gl_.get(),
78 DisallowedExtensions(), extensions); 78 DisallowedFeatures(), extensions);
79 79
80 EXPECT_TRUE(group_->Initialize(DisallowedExtensions(), NULL)); 80 EXPECT_TRUE(group_->Initialize(DisallowedFeatures(), NULL));
81 81
82 EXPECT_CALL(*gl_, EnableVertexAttribArray(0)) 82 EXPECT_CALL(*gl_, EnableVertexAttribArray(0))
83 .Times(1) 83 .Times(1)
84 .RetiresOnSaturation(); 84 .RetiresOnSaturation();
85 static GLuint attrib_0_id[] = { 85 static GLuint attrib_0_id[] = {
86 kServiceAttrib0BufferId, 86 kServiceAttrib0BufferId,
87 }; 87 };
88 static GLuint fixed_attrib_buffer_id[] = { 88 static GLuint fixed_attrib_buffer_id[] = {
89 kServiceFixedAttribBufferId, 89 kServiceFixedAttribBufferId,
90 }; 90 };
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 int32 attributes[] = { 176 int32 attributes[] = {
177 EGL_ALPHA_SIZE, request_alpha ? 8 : 0, 177 EGL_ALPHA_SIZE, request_alpha ? 8 : 0,
178 EGL_DEPTH_SIZE, request_depth ? 24 : 0, 178 EGL_DEPTH_SIZE, request_depth ? 24 : 0,
179 EGL_STENCIL_SIZE, request_stencil ? 8 : 0, 179 EGL_STENCIL_SIZE, request_stencil ? 8 : 0,
180 }; 180 };
181 std::vector<int32> attribs(attributes, attributes + arraysize(attributes)); 181 std::vector<int32> attribs(attributes, attributes + arraysize(attributes));
182 182
183 decoder_.reset(GLES2Decoder::Create(group_.get())); 183 decoder_.reset(GLES2Decoder::Create(group_.get()));
184 decoder_->Initialize( 184 decoder_->Initialize(
185 surface_, context_, surface_->GetSize(), DisallowedExtensions(), 185 surface_, context_, surface_->GetSize(), DisallowedFeatures(),
186 NULL, attribs); 186 NULL, attribs);
187 decoder_->set_engine(engine_.get()); 187 decoder_->set_engine(engine_.get());
188 188
189 EXPECT_CALL(*gl_, GenBuffersARB(_, _)) 189 EXPECT_CALL(*gl_, GenBuffersARB(_, _))
190 .WillOnce(SetArgumentPointee<1>(kServiceBufferId)) 190 .WillOnce(SetArgumentPointee<1>(kServiceBufferId))
191 .RetiresOnSaturation(); 191 .RetiresOnSaturation();
192 GenHelper<GenBuffersImmediate>(client_buffer_id_); 192 GenHelper<GenBuffersImmediate>(client_buffer_id_);
193 EXPECT_CALL(*gl_, GenFramebuffersEXT(_, _)) 193 EXPECT_CALL(*gl_, GenFramebuffersEXT(_, _))
194 .WillOnce(SetArgumentPointee<1>(kServiceFramebufferId)) 194 .WillOnce(SetArgumentPointee<1>(kServiceFramebufferId))
195 .RetiresOnSaturation(); 195 .RetiresOnSaturation();
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 895
896 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; 896 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1";
897 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; 897 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2";
898 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; 898 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3";
899 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; 899 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1";
900 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; 900 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]";
901 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; 901 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]";
902 902
903 } // namespace gles2 903 } // namespace gles2
904 } // namespace gpu 904 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_mock.h ('k') | gpu/command_buffer/service/test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698