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

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

Issue 6623063: Connect up --disable-gl-multisampling to command buffer (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix style. Created 9 years, 9 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 #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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 void GLES2DecoderTestBase::InitDecoder( 52 void GLES2DecoderTestBase::InitDecoder(
53 const char* extensions, bool has_alpha_backbuffer) { 53 const char* extensions, bool has_alpha_backbuffer) {
54 gl_.reset(new StrictMock<MockGLInterface>()); 54 gl_.reset(new StrictMock<MockGLInterface>());
55 ::gfx::GLInterface::SetGLInterface(gl_.get()); 55 ::gfx::GLInterface::SetGLInterface(gl_.get());
56 group_ = ContextGroup::Ref(new ContextGroup()); 56 group_ = ContextGroup::Ref(new ContextGroup());
57 57
58 InSequence sequence; 58 InSequence sequence;
59 59
60 TestHelper::SetupContextGroupInitExpectations(gl_.get(), extensions); 60 TestHelper::SetupContextGroupInitExpectations(gl_.get(),
61 DisallowedExtensions(), extensions);
61 62
62 EXPECT_TRUE(group_->Initialize(extensions)); 63 EXPECT_TRUE(group_->Initialize(DisallowedExtensions(), extensions));
63 64
64 EXPECT_CALL(*gl_, GetIntegerv(GL_ALPHA_BITS, _)) 65 EXPECT_CALL(*gl_, GetIntegerv(GL_ALPHA_BITS, _))
65 .WillOnce(SetArgumentPointee<1>(has_alpha_backbuffer ? 8 : 0)) 66 .WillOnce(SetArgumentPointee<1>(has_alpha_backbuffer ? 8 : 0))
66 .RetiresOnSaturation(); 67 .RetiresOnSaturation();
67 EXPECT_CALL(*gl_, EnableVertexAttribArray(0)) 68 EXPECT_CALL(*gl_, EnableVertexAttribArray(0))
68 .Times(1) 69 .Times(1)
69 .RetiresOnSaturation(); 70 .RetiresOnSaturation();
70 static GLuint attrib_0_id[] = { 71 static GLuint attrib_0_id[] = {
71 kServiceAttrib0BufferId, 72 kServiceAttrib0BufferId,
72 }; 73 };
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 shared_memory_offset_ = kSharedMemoryOffset; 123 shared_memory_offset_ = kSharedMemoryOffset;
123 shared_memory_address_ = reinterpret_cast<int8*>(buffer.ptr) + 124 shared_memory_address_ = reinterpret_cast<int8*>(buffer.ptr) +
124 shared_memory_offset_; 125 shared_memory_offset_;
125 shared_memory_id_ = kSharedMemoryId; 126 shared_memory_id_ = kSharedMemoryId;
126 127
127 context_ = new gfx::StubGLContext; 128 context_ = new gfx::StubGLContext;
128 context_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); 129 context_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight));
129 130
130 decoder_.reset(GLES2Decoder::Create(group_.get())); 131 decoder_.reset(GLES2Decoder::Create(group_.get()));
131 decoder_->Initialize( 132 decoder_->Initialize(
132 context_, context_->GetSize(), NULL, std::vector<int32>(), NULL, 0); 133 context_, context_->GetSize(), DisallowedExtensions(),
134 NULL, std::vector<int32>(), NULL, 0);
133 decoder_->set_engine(engine_.get()); 135 decoder_->set_engine(engine_.get());
134 136
135 EXPECT_CALL(*gl_, GenBuffersARB(_, _)) 137 EXPECT_CALL(*gl_, GenBuffersARB(_, _))
136 .WillOnce(SetArgumentPointee<1>(kServiceBufferId)) 138 .WillOnce(SetArgumentPointee<1>(kServiceBufferId))
137 .RetiresOnSaturation(); 139 .RetiresOnSaturation();
138 GenHelper<GenBuffersImmediate>(client_buffer_id_); 140 GenHelper<GenBuffersImmediate>(client_buffer_id_);
139 EXPECT_CALL(*gl_, GenFramebuffersEXT(_, _)) 141 EXPECT_CALL(*gl_, GenFramebuffersEXT(_, _))
140 .WillOnce(SetArgumentPointee<1>(kServiceFramebufferId)) 142 .WillOnce(SetArgumentPointee<1>(kServiceFramebufferId))
141 .RetiresOnSaturation(); 143 .RetiresOnSaturation();
142 GenHelper<GenFramebuffersImmediate>(client_framebuffer_id_); 144 GenHelper<GenFramebuffersImmediate>(client_framebuffer_id_);
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 800
799 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; 801 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1";
800 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; 802 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2";
801 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; 803 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3";
802 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; 804 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1";
803 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; 805 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]";
804 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; 806 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]";
805 807
806 } // namespace gles2 808 } // namespace gles2
807 } // namespace gpu 809 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_mock.h ('k') | gpu/command_buffer/service/gpu_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698