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

Unified Diff: ui/gfx/gl/gl_context_linux.cc

Issue 6839008: Split EGLContext in GLContextEGL and GLSurfaceEGL. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 | « ui/gfx/gl/gl_context_egl.cc ('k') | ui/gfx/gl/gl_context_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gl/gl_context_linux.cc
===================================================================
--- ui/gfx/gl/gl_context_linux.cc (revision 81471)
+++ ui/gfx/gl/gl_context_linux.cc (working copy)
@@ -21,6 +21,7 @@
#include "ui/gfx/gl/gl_context_osmesa.h"
#include "ui/gfx/gl/gl_context_stub.h"
#include "ui/gfx/gl/gl_implementation.h"
+#include "ui/gfx/gl/gl_surface_egl.h"
namespace {
@@ -217,8 +218,8 @@
break;
}
case kGLImplementationEGLGLES2:
- if (!BaseEGLContext::InitializeOneOff()) {
- LOG(ERROR) << "BaseEGLContext::InitializeOneOff failed.";
+ if (!GLSurfaceEGL::InitializeOneOff()) {
+ LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
return false;
}
break;
@@ -515,11 +516,16 @@
return context.release();
}
case kGLImplementationEGLGLES2: {
- scoped_ptr<NativeViewEGLContext> context(
- new NativeViewEGLContext(reinterpret_cast<void *>(window)));
- if (!context->Initialize())
+ scoped_ptr<NativeViewGLSurfaceEGL> surface(new NativeViewGLSurfaceEGL(
+ reinterpret_cast<void*>(window)));
+ if (!surface->Initialize())
return NULL;
+ scoped_ptr<GLContextEGL> context(
+ new GLContextEGL(surface.release()));
+ if (!context->Initialize(NULL))
+ return NULL;
+
return context.release();
}
case kGLImplementationOSMesaGL: {
@@ -805,8 +811,12 @@
return NULL;
}
case kGLImplementationEGLGLES2: {
- scoped_ptr<SecondaryEGLContext> context(
- new SecondaryEGLContext());
+ scoped_ptr<PbufferGLSurfaceEGL> surface(new PbufferGLSurfaceEGL(
+ gfx::Size(1, 1)));
+ if (!surface->Initialize())
+ return NULL;
+
+ scoped_ptr<GLContextEGL> context(new GLContextEGL(surface.release()));
if (!context->Initialize(shared_context))
return NULL;
« no previous file with comments | « ui/gfx/gl/gl_context_egl.cc ('k') | ui/gfx/gl/gl_context_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698