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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 12390077: Android: Support GPU process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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: ui/gl/gl_surface_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 63e2faba30a8694d37052f347336e03d850d7ebd..3b81daf83285a476768cb724f7facde9bbca8950 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -4,6 +4,10 @@
#include "ui/gl/gl_surface_egl.h"
+#if defined(OS_ANDROID)
+#include <android/native_window_jni.h>
+#endif
+
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
@@ -219,6 +223,10 @@ NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(bool software,
supports_post_sub_buffer_(false),
config_(NULL) {
software_ = software;
+#if defined(OS_ANDROID)
+ if (window)
no sievers 2013/03/05 21:47:02 The extra ref is for NativeViewGLSurfaceEGL::Resiz
+ ANativeWindow_acquire(window);
+#endif
}
bool NativeViewGLSurfaceEGL::Initialize() {
@@ -433,6 +441,10 @@ VSyncProvider* NativeViewGLSurfaceEGL::GetVSyncProvider() {
NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() {
Destroy();
+#if defined(OS_ANDROID)
+ if (window_)
+ ANativeWindow_release(window_);
+#endif
}
void NativeViewGLSurfaceEGL::SetHandle(EGLSurface surface) {

Powered by Google App Engine
This is Rietveld 408576698