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

Unified Diff: app/gfx/gl/gl_context_osmesa.cc

Issue 2134006: Added EGL based GLContext.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | « app/gfx/gl/gl_context_osmesa.h ('k') | app/gfx/gl/gl_context_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/gl/gl_context_osmesa.cc
===================================================================
--- app/gfx/gl/gl_context_osmesa.cc (revision 49195)
+++ app/gfx/gl/gl_context_osmesa.cc (working copy)
@@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <GL/glew.h>
-#include <GL/osmew.h>
-
#include <algorithm>
+#include "app/gfx/gl/gl_bindings.h"
#include "app/gfx/gl/gl_context_osmesa.h"
namespace gfx {
@@ -18,14 +16,17 @@
OSMesaGLContext::~OSMesaGLContext() {
}
-bool OSMesaGLContext::Initialize(void* shared_handle) {
+bool OSMesaGLContext::Initialize(GLContext* shared_context) {
DCHECK(!context_);
size_ = gfx::Size(1, 1);
buffer_.reset(new int32[1]);
- context_ = OSMesaCreateContext(GL_RGBA,
- static_cast<OSMesaContext>(shared_handle));
+ OSMesaContext shared_handle = NULL;
+ if (shared_context)
+ shared_handle = static_cast<OSMesaContext>(shared_context->GetHandle());
+
+ context_ = OSMesaCreateContext(GL_RGBA, shared_handle);
if (!context_)
return false;
@@ -34,11 +35,6 @@
return false;
}
- if (!InitializeGLEW()) {
- Destroy();
- return false;
- }
-
if (!InitializeCommon()) {
Destroy();
return false;
« no previous file with comments | « app/gfx/gl/gl_context_osmesa.h ('k') | app/gfx/gl/gl_context_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698