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

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

Issue 135213003: Ensure GL initialization only happens once, and provide common init path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initgl: compile3 Created 6 years, 11 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
« no previous file with comments | « gpu/command_buffer/common/unittest_main.cc ('k') | gpu/config/gpu_info_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 097d8cd3fba363d9c19fb68ae9c88567bd49f079..c41777a9e946f5c66f0613d13b5f36860e2e1a30 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -22,6 +22,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_mock.h"
+#include "ui/gl/gl_surface.h"
using ::gfx::MockGLInterface;
using ::testing::_;
@@ -115,9 +116,8 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
const CommandLine* command_line) {
Framebuffer::ClearFramebufferCompleteComboMap();
- gfx::ClearGLBindings();
gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress);
- gfx::InitializeStaticGLBindings(gfx::kGLImplementationMockGL);
+ gfx::GLSurface::InitializeOneOffWithMockBindingsForTests();
gl_.reset(new StrictMock<MockGLInterface>());
::gfx::MockGLInterface::SetGLInterface(gl_.get());
@@ -289,7 +289,7 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
context_->SetGLVersionString(gl_version);
context_->MakeCurrent(surface_.get());
- gfx::InitializeDynamicGLBindings(gfx::kGLImplementationMockGL, context_);
+ gfx::GLSurface::InitializeDynamicMockBindingsForTests(context_);
int32 attributes[] = {
EGL_ALPHA_SIZE, request_alpha ? 8 : 0,
« no previous file with comments | « gpu/command_buffer/common/unittest_main.cc ('k') | gpu/config/gpu_info_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698