| Index: gpu/command_buffer/service/test_helper.cc
|
| diff --git a/gpu/command_buffer/service/test_helper.cc b/gpu/command_buffer/service/test_helper.cc
|
| index 3ad2093b7eba1b9476a22b6901d79f43b24f8e2d..98fb05093b93fadcef178c898b1275f432e6bc78 100644
|
| --- a/gpu/command_buffer/service/test_helper.cc
|
| +++ b/gpu/command_buffer/service/test_helper.cc
|
| @@ -102,7 +102,7 @@ const GLint TestHelper::kUniformBufferOffsetAlignment;
|
| std::vector<std::string> TestHelper::split_extensions_;
|
|
|
| void TestHelper::SetupTextureInitializationExpectations(
|
| - ::gfx::MockGLInterface* gl,
|
| + ::gl::MockGLInterface* gl,
|
| GLenum target,
|
| bool use_default_textures) {
|
| InSequence sequence;
|
| @@ -202,7 +202,7 @@ void TestHelper::SetupTextureInitializationExpectations(
|
| }
|
|
|
| void TestHelper::SetupTextureManagerInitExpectations(
|
| - ::gfx::MockGLInterface* gl,
|
| + ::gl::MockGLInterface* gl,
|
| bool is_es3_enabled,
|
| bool is_desktop_core_profile,
|
| const char* extensions,
|
| @@ -246,7 +246,7 @@ void TestHelper::SetupTextureManagerInitExpectations(
|
| }
|
|
|
| void TestHelper::SetupTextureDestructionExpectations(
|
| - ::gfx::MockGLInterface* gl,
|
| + ::gl::MockGLInterface* gl,
|
| GLenum target,
|
| bool use_default_textures) {
|
| if (!use_default_textures)
|
| @@ -282,7 +282,7 @@ void TestHelper::SetupTextureDestructionExpectations(
|
| }
|
|
|
| void TestHelper::SetupTextureManagerDestructionExpectations(
|
| - ::gfx::MockGLInterface* gl,
|
| + ::gl::MockGLInterface* gl,
|
| bool is_es3_enabled,
|
| bool is_desktop_core_profile,
|
| const char* extensions,
|
| @@ -327,7 +327,7 @@ void TestHelper::SetupTextureManagerDestructionExpectations(
|
| }
|
|
|
| void TestHelper::SetupContextGroupInitExpectations(
|
| - ::gfx::MockGLInterface* gl,
|
| + ::gl::MockGLInterface* gl,
|
| const DisallowedFeatures& disallowed_features,
|
| const char* extensions,
|
| const char* gl_version,
|
| @@ -336,7 +336,7 @@ void TestHelper::SetupContextGroupInitExpectations(
|
|
|
| SetupFeatureInfoInitExpectationsWithGLVersion(gl, extensions, "", gl_version);
|
|
|
| - gfx::GLVersionInfo gl_info(gl_version, "", extensions);
|
| + gl::GLVersionInfo gl_info(gl_version, "", extensions);
|
|
|
| EXPECT_CALL(*gl, GetIntegerv(GL_MAX_RENDERBUFFER_SIZE, _))
|
| .WillOnce(SetArgumentPointee<1>(kMaxRenderbufferSize))
|
| @@ -466,17 +466,17 @@ void TestHelper::SetupContextGroupInitExpectations(
|
| use_default_textures);
|
| }
|
|
|
| -void TestHelper::SetupFeatureInfoInitExpectations(
|
| - ::gfx::MockGLInterface* gl, const char* extensions) {
|
| +void TestHelper::SetupFeatureInfoInitExpectations(::gl::MockGLInterface* gl,
|
| + const char* extensions) {
|
| SetupFeatureInfoInitExpectationsWithGLVersion(gl, extensions, "", "");
|
| }
|
|
|
| void TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
|
| - ::gfx::MockGLInterface* gl,
|
| - const char* extensions,
|
| - const char* gl_renderer,
|
| - const char* gl_version,
|
| - bool enable_es3) {
|
| + ::gl::MockGLInterface* gl,
|
| + const char* extensions,
|
| + const char* gl_renderer,
|
| + const char* gl_version,
|
| + bool enable_es3) {
|
| InSequence sequence;
|
|
|
| EXPECT_CALL(*gl, GetString(GL_VERSION))
|
| @@ -490,7 +490,7 @@ void TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
|
| extensions, " ", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
|
| }
|
|
|
| - gfx::GLVersionInfo gl_info(gl_version, gl_renderer, extensions);
|
| + gl::GLVersionInfo gl_info(gl_version, gl_renderer, extensions);
|
| if (!gl_info.is_es && gl_info.major_version >= 3) {
|
| EXPECT_CALL(*gl, GetIntegerv(GL_NUM_EXTENSIONS, _))
|
| .WillOnce(SetArgumentPointee<1>(split_extensions_.size()))
|
| @@ -699,8 +699,9 @@ void TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
|
| }
|
| }
|
|
|
| -void TestHelper::SetupExpectationsForClearingUniforms(
|
| - ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms) {
|
| +void TestHelper::SetupExpectationsForClearingUniforms(::gl::MockGLInterface* gl,
|
| + UniformInfo* uniforms,
|
| + size_t num_uniforms) {
|
| for (size_t ii = 0; ii < num_uniforms; ++ii) {
|
| const UniformInfo& info = uniforms[ii];
|
| switch (info.type) {
|
| @@ -800,7 +801,7 @@ void TestHelper::SetupExpectationsForClearingUniforms(
|
| }
|
|
|
| void TestHelper::SetupProgramSuccessExpectations(
|
| - ::gfx::MockGLInterface* gl,
|
| + ::gl::MockGLInterface* gl,
|
| const FeatureInfo* feature_info,
|
| AttribInfo* attribs,
|
| size_t num_attribs,
|
| @@ -965,7 +966,7 @@ void TestHelper::SetupProgramSuccessExpectations(
|
| }
|
| }
|
|
|
| -void TestHelper::SetupShaderExpectations(::gfx::MockGLInterface* gl,
|
| +void TestHelper::SetupShaderExpectations(::gl::MockGLInterface* gl,
|
| const FeatureInfo* feature_info,
|
| AttribInfo* attribs,
|
| size_t num_attribs,
|
| @@ -982,7 +983,7 @@ void TestHelper::SetupShaderExpectations(::gfx::MockGLInterface* gl,
|
| }
|
|
|
| void TestHelper::SetupShaderExpectationsWithVaryings(
|
| - ::gfx::MockGLInterface* gl,
|
| + ::gl::MockGLInterface* gl,
|
| const FeatureInfo* feature_info,
|
| AttribInfo* attribs,
|
| size_t num_attribs,
|
| @@ -1005,10 +1006,15 @@ void TestHelper::SetupShaderExpectationsWithVaryings(
|
| num_varyings, program_outputs, num_program_outputs, service_id);
|
| }
|
|
|
| -void TestHelper::DoBufferData(
|
| - ::gfx::MockGLInterface* gl, MockErrorState* error_state,
|
| - BufferManager* manager, Buffer* buffer, GLenum target, GLsizeiptr size,
|
| - GLenum usage, const GLvoid* data, GLenum error) {
|
| +void TestHelper::DoBufferData(::gl::MockGLInterface* gl,
|
| + MockErrorState* error_state,
|
| + BufferManager* manager,
|
| + Buffer* buffer,
|
| + GLenum target,
|
| + GLsizeiptr size,
|
| + GLenum usage,
|
| + const GLvoid* data,
|
| + GLenum error) {
|
| EXPECT_CALL(*error_state, CopyRealGLErrorsToWrapper(_, _, _))
|
| .Times(1)
|
| .RetiresOnSaturation();
|
| @@ -1027,10 +1033,13 @@ void TestHelper::DoBufferData(
|
| manager->DoBufferData(error_state, buffer, target, size, usage, data);
|
| }
|
|
|
| -void TestHelper::SetTexParameteriWithExpectations(
|
| - ::gfx::MockGLInterface* gl, MockErrorState* error_state,
|
| - TextureManager* manager, TextureRef* texture_ref,
|
| - GLenum pname, GLint value, GLenum error) {
|
| +void TestHelper::SetTexParameteriWithExpectations(::gl::MockGLInterface* gl,
|
| + MockErrorState* error_state,
|
| + TextureManager* manager,
|
| + TextureRef* texture_ref,
|
| + GLenum pname,
|
| + GLint value,
|
| + GLenum error) {
|
| if (error == GL_NO_ERROR) {
|
| EXPECT_CALL(*gl, TexParameteri(texture_ref->texture()->target(),
|
| pname, value))
|
| @@ -1050,7 +1059,7 @@ void TestHelper::SetTexParameteriWithExpectations(
|
|
|
| // static
|
| void TestHelper::SetShaderStates(
|
| - ::gfx::MockGLInterface* gl,
|
| + ::gl::MockGLInterface* gl,
|
| Shader* shader,
|
| bool expected_valid,
|
| const std::string* const expected_log_info,
|
| @@ -1134,8 +1143,9 @@ void TestHelper::SetShaderStates(
|
| }
|
|
|
| // static
|
| -void TestHelper::SetShaderStates(
|
| - ::gfx::MockGLInterface* gl, Shader* shader, bool valid) {
|
| +void TestHelper::SetShaderStates(::gl::MockGLInterface* gl,
|
| + Shader* shader,
|
| + bool valid) {
|
| SetShaderStates(gl, shader, valid, nullptr, nullptr, nullptr, nullptr,
|
| nullptr, nullptr, nullptr, nullptr, nullptr);
|
| }
|
| @@ -1175,13 +1185,13 @@ sh::OutputVariable TestHelper::ConstructOutputVariable(
|
| }
|
|
|
| ScopedGLImplementationSetter::ScopedGLImplementationSetter(
|
| - gfx::GLImplementation implementation)
|
| - : old_implementation_(gfx::GetGLImplementation()) {
|
| - gfx::SetGLImplementation(implementation);
|
| + gl::GLImplementation implementation)
|
| + : old_implementation_(gl::GetGLImplementation()) {
|
| + gl::SetGLImplementation(implementation);
|
| }
|
|
|
| ScopedGLImplementationSetter::~ScopedGLImplementationSetter() {
|
| - gfx::SetGLImplementation(old_implementation_);
|
| + gl::SetGLImplementation(old_implementation_);
|
| }
|
|
|
| } // namespace gles2
|
|
|