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

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

Issue 10795037: Revert 147328 - Current status of patch: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/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 #include <vector>
10 9
11 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
12 #include "gpu/command_buffer/common/gl_mock.h" 11 #include "gpu/command_buffer/common/gl_mock.h"
13 #include "gpu/command_buffer/common/gles2_cmd_format.h" 12 #include "gpu/command_buffer/common/gles2_cmd_format.h"
14 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 13 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
15 #include "gpu/command_buffer/service/cmd_buffer_engine.h" 14 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
16 #include "gpu/command_buffer/service/context_group.h" 15 #include "gpu/command_buffer/service/context_group.h"
17 #include "gpu/command_buffer/service/program_manager.h" 16 #include "gpu/command_buffer/service/program_manager.h"
18 #include "gpu/command_buffer/service/test_helper.h" 17 #include "gpu/command_buffer/service/test_helper.h"
19 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const char* extensions, 76 const char* extensions,
78 bool has_alpha, 77 bool has_alpha,
79 bool has_depth, 78 bool has_depth,
80 bool has_stencil, 79 bool has_stencil,
81 bool request_alpha, 80 bool request_alpha,
82 bool request_depth, 81 bool request_depth,
83 bool request_stencil, 82 bool request_stencil,
84 bool bind_generates_resource) { 83 bool bind_generates_resource) {
85 gl_.reset(new StrictMock<MockGLInterface>()); 84 gl_.reset(new StrictMock<MockGLInterface>());
86 ::gfx::GLInterface::SetGLInterface(gl_.get()); 85 ::gfx::GLInterface::SetGLInterface(gl_.get());
87 group_ = ContextGroup::Ref(new ContextGroup(NULL, 86 group_ = ContextGroup::Ref(new ContextGroup(NULL, bind_generates_resource));
88 bind_generates_resource,
89 NULL));
90 87
91 InSequence sequence; 88 InSequence sequence;
92 89
93 TestHelper::SetupContextGroupInitExpectations(gl_.get(), 90 TestHelper::SetupContextGroupInitExpectations(gl_.get(),
94 DisallowedFeatures(), extensions); 91 DisallowedFeatures(), extensions);
95 92
96 EXPECT_TRUE(group_->Initialize(DisallowedFeatures(), NULL)); 93 EXPECT_TRUE(group_->Initialize(DisallowedFeatures(), NULL));
97 94
98 AddExpectationsForVertexAttribManager(); 95 AddExpectationsForVertexAttribManager();
99 96
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 target, level, format, width, height, border, 867 target, level, format, width, height, border,
871 bucket_id); 868 bucket_id);
872 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 869 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
873 } 870 }
874 871
875 void GLES2DecoderTestBase::DoTexImage2DSameSize( 872 void GLES2DecoderTestBase::DoTexImage2DSameSize(
876 GLenum target, GLint level, GLenum internal_format, 873 GLenum target, GLint level, GLenum internal_format,
877 GLsizei width, GLsizei height, GLint border, 874 GLsizei width, GLsizei height, GLint border,
878 GLenum format, GLenum type, 875 GLenum format, GLenum type,
879 uint32 shared_memory_id, uint32 shared_memory_offset) { 876 uint32 shared_memory_id, uint32 shared_memory_offset) {
880 if (GLES2Decoder::IsAngle()) { 877 if (GLES2Decoder::IsAngle())
878 {
881 EXPECT_CALL(*gl_, TexSubImage2D( 879 EXPECT_CALL(*gl_, TexSubImage2D(
882 target, level, 0, 0, width, height, format, type, _)) 880 target, level, 0, 0, width, height, format, type, _))
883 .Times(1) 881 .Times(1)
884 .RetiresOnSaturation(); 882 .RetiresOnSaturation();
885 } else { 883 } else {
886 EXPECT_CALL(*gl_, GetError()) 884 EXPECT_CALL(*gl_, GetError())
887 .WillOnce(Return(GL_NO_ERROR)) 885 .WillOnce(Return(GL_NO_ERROR))
888 .RetiresOnSaturation(); 886 .RetiresOnSaturation();
889 EXPECT_CALL(*gl_, TexImage2D(target, level, internal_format, 887 EXPECT_CALL(*gl_, TexImage2D(target, level, internal_format,
890 width, height, border, format, type, _)) 888 width, height, border, format, type, _))
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 num_vertices, buffer_id, GL_NO_ERROR); 1338 num_vertices, buffer_id, GL_NO_ERROR);
1341 } 1339 }
1342 1340
1343 void GLES2DecoderWithShaderTestBase::SetUp() { 1341 void GLES2DecoderWithShaderTestBase::SetUp() {
1344 GLES2DecoderTestBase::SetUp(); 1342 GLES2DecoderTestBase::SetUp();
1345 SetupDefaultProgram(); 1343 SetupDefaultProgram();
1346 } 1344 }
1347 1345
1348 } // namespace gles2 1346 } // namespace gles2
1349 } // namespace gpu 1347 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc ('k') | gpu/command_buffer/service/memory_program_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698