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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
index 8e063c7e3d4e706147808dd66bf5bbe1ba1aae06..3e386bbf815dccd259aea721aadb0e8a2594d02c 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -28,7 +28,7 @@
#include "ui/gl/gl_mock.h"
#include "ui/gl/test/gl_surface_test_support.h"
-using ::gfx::MockGLInterface;
+using ::gl::MockGLInterface;
using ::testing::_;
using ::testing::AnyNumber;
using ::testing::AtMost;
@@ -180,11 +180,11 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
// For easier substring/extension matching
DCHECK(normalized_init.extensions.empty() ||
*normalized_init.extensions.rbegin() == ' ');
- gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress);
- gfx::GLSurfaceTestSupport::InitializeOneOffWithMockBindings();
+ gl::SetGLGetProcAddressProc(gl::MockGLInterface::GetGLProcAddress);
+ gl::GLSurfaceTestSupport::InitializeOneOffWithMockBindings();
gl_.reset(new StrictMock<MockGLInterface>());
- ::gfx::MockGLInterface::SetGLInterface(gl_.get());
+ ::gl::MockGLInterface::SetGLInterface(gl_.get());
SetupMockGLBehaviors();
@@ -203,7 +203,7 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
InSequence sequence;
- surface_ = new gfx::GLSurfaceStub;
+ surface_ = new gl::GLSurfaceStub;
surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight));
// Context needs to be created before initializing ContextGroup, which will
@@ -214,7 +214,7 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
context_->SetGLVersionString(normalized_init.gl_version.c_str());
context_->GLContextStubWithExtensions::MakeCurrent(surface_.get());
- gfx::GLSurfaceTestSupport::InitializeDynamicMockBindings(context_.get());
+ gl::GLSurfaceTestSupport::InitializeDynamicMockBindings(context_.get());
TestHelper::SetupContextGroupInitExpectations(
gl_.get(),
@@ -512,7 +512,7 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
reset_unsafe_es3_apis_enabled = true;
}
- const gfx::GLVersionInfo* version = context_->GetVersionInfo();
+ const gl::GLVersionInfo* version = context_->GetVersionInfo();
if (version->IsAtLeastGL(3, 3) || version->IsAtLeastGLES(3, 0)) {
EXPECT_CALL(*gl_, GenSamplers(_, _))
.WillOnce(SetArgumentPointee<1>(kServiceSamplerId))
@@ -572,9 +572,9 @@ void GLES2DecoderTestBase::ResetDecoder() {
decoder_.reset();
group_->Destroy(mock_decoder_.get(), false);
engine_.reset();
- ::gfx::MockGLInterface::SetGLInterface(NULL);
+ ::gl::MockGLInterface::SetGLInterface(NULL);
gl_.reset();
- gfx::ClearGLBindings();
+ gl::ClearGLBindings();
}
void GLES2DecoderTestBase::TearDown() {
@@ -1479,16 +1479,15 @@ void GLES2DecoderTestBase::AddExpectationsForRestoreAttribState(GLuint attrib) {
.RetiresOnSaturation();
if (attrib != 0 ||
- gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2) {
-
- // TODO(bajones): Not sure if I can tell which of these will be called
- EXPECT_CALL(*gl_, EnableVertexAttribArray(attrib))
- .Times(testing::AtMost(1))
- .RetiresOnSaturation();
+ gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2) {
+ // TODO(bajones): Not sure if I can tell which of these will be called
+ EXPECT_CALL(*gl_, EnableVertexAttribArray(attrib))
+ .Times(testing::AtMost(1))
+ .RetiresOnSaturation();
- EXPECT_CALL(*gl_, DisableVertexAttribArray(attrib))
- .Times(testing::AtMost(1))
- .RetiresOnSaturation();
+ EXPECT_CALL(*gl_, DisableVertexAttribArray(attrib))
+ .Times(testing::AtMost(1))
+ .RetiresOnSaturation();
}
}

Powered by Google App Engine
This is Rietveld 408576698