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

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

Issue 98643013: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Accommodated changes in content tests 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
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 9b499d2626be2f0d90bf3799a64c4d0c22d47a84..5895c3e3d23eecf6db60f00b16d46cc3ba120e85 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -62,6 +62,7 @@ GLES2DecoderTestBase::~GLES2DecoderTestBase() {}
void GLES2DecoderTestBase::SetUp() {
InitDecoder(
"", // extensions
+ "3.0", // gl version
true, // has alpha
true, // has depth
false, // has stencil
@@ -81,6 +82,7 @@ void GLES2DecoderTestBase::AddExpectationsForVertexAttribManager() {
void GLES2DecoderTestBase::InitDecoder(
const char* extensions,
+ const char* gl_version,
bool has_alpha,
bool has_depth,
bool has_stencil,
@@ -89,6 +91,7 @@ void GLES2DecoderTestBase::InitDecoder(
bool request_stencil,
bool bind_generates_resource) {
InitDecoderWithCommandLine(extensions,
+ gl_version,
has_alpha,
has_depth,
has_stencil,
@@ -101,6 +104,7 @@ void GLES2DecoderTestBase::InitDecoder(
void GLES2DecoderTestBase::InitDecoderWithCommandLine(
const char* extensions,
+ const char* gl_version,
bool has_alpha,
bool has_depth,
bool has_stencil,
@@ -110,6 +114,10 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
bool bind_generates_resource,
const CommandLine* command_line) {
Framebuffer::ClearFramebufferCompleteComboMap();
+
+ gfx::ClearGLBindings();
+ gfx::InitializeStaticGLBindings(gfx::kGLImplementationMockGL);
+
gl_.reset(new StrictMock<MockGLInterface>());
::gfx::GLInterface::SetGLInterface(gl_.get());
@@ -279,9 +287,12 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
surface_ = new gfx::GLSurfaceStub;
surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight));
- context_ = new gfx::GLContextStub;
+ context_ = new gfx::GLContextStubWithExtensions;
+ context_->AddExtensionsString(extensions);
+ context_->SetGLVersionString(gl_version);
context_->MakeCurrent(surface_.get());
+ gfx::InitializeDynamicGLBindings(gfx::kGLImplementationMockGL, context_);
int32 attributes[] = {
EGL_ALPHA_SIZE, request_alpha ? 8 : 0,
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h ('k') | gpu/config/gpu_info_collector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698