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

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

Issue 8588059: Upstream: GL implementation on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« ui/gfx/gl/gl_surface.h ('K') | « ui/gfx/gl/gl_surface_egl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gl/gl_surface_egl.cc
diff --git a/ui/gfx/gl/gl_surface_egl.cc b/ui/gfx/gl/gl_surface_egl.cc
index 8301bc407997507c45d08a60d19a4d710b720b48..5c851a801e5133a61c92a6ef494ba0665b6d2450 100644
--- a/ui/gfx/gl/gl_surface_egl.cc
+++ b/ui/gfx/gl/gl_surface_egl.cc
@@ -7,10 +7,16 @@
#include "build/build_config.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#if !defined(OS_ANDROID)
#include "third_party/angle/include/EGL/egl.h"
#include "third_party/angle/include/EGL/eglext.h"
+#endif
#include "ui/gfx/gl/egl_util.h"
+#if defined(OS_ANDROID)
+#include <EGL/egl.h>
+#endif
+
// This header must come after the above third-party include, as
// it brings in #defines that cause conflicts.
#include "ui/gfx/gl/gl_bindings.h"
@@ -110,7 +116,7 @@ bool GLSurfaceEGL::InitializeOneOff() {
initialized = true;
-#if defined(USE_X11)
+#if defined(USE_X11) || defined(OS_ANDROID)
return true;
#else
g_software_native_display = EGL_SOFTWARE_DISPLAY_ANGLE;
@@ -184,6 +190,9 @@ NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() {
}
bool NativeViewGLSurfaceEGL::Initialize() {
+#if defined(OS_ANDROID)
jonathan.backer 2011/11/18 19:33:32 NOTREACHED()?
michaelbai 2011/11/21 18:28:58 Done.
+ return false;
+#else
DCHECK(!surface_);
if (!GetDisplay()) {
@@ -219,6 +228,7 @@ bool NativeViewGLSurfaceEGL::Initialize() {
supports_post_sub_buffer_ = (surfaceVal && retVal) == EGL_TRUE;
return true;
+#endif
}
void NativeViewGLSurfaceEGL::Destroy() {
@@ -351,6 +361,9 @@ EGLSurface PbufferGLSurfaceEGL::GetHandle() {
}
void* PbufferGLSurfaceEGL::GetShareHandle() {
+#if defined(OS_ANDROID)
jonathan.backer 2011/11/18 19:33:32 NOTREACHED()?
michaelbai 2011/11/21 18:28:58 Done.
+ return NULL;
+#else
const char* extensions = eglQueryString(g_display, EGL_EXTENSIONS);
if (!strstr(extensions, "EGL_ANGLE_query_surface_pointer"))
return NULL;
@@ -364,6 +377,7 @@ void* PbufferGLSurfaceEGL::GetShareHandle() {
}
return handle;
+#endif
}
} // namespace gfx
« ui/gfx/gl/gl_surface.h ('K') | « ui/gfx/gl/gl_surface_egl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698