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

Unified Diff: ui/gl/init/gl_initializer_android.cc

Issue 2024953002: Move GL one-off initialization code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_x11
Patch Set: Delete GLInitializer class. Created 4 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 | « ui/gl/init/gl_initializer.h ('k') | ui/gl/init/gl_initializer_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_initializer_android.cc
diff --git a/ui/gl/init/gl_initializer_android.cc b/ui/gl/init/gl_initializer_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7d7a88e38b58fcdfd0dbfa481739b320c51cb060
--- /dev/null
+++ b/ui/gl/init/gl_initializer_android.cc
@@ -0,0 +1,28 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/gl/init/gl_initializer.h"
+
+#include "base/logging.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_surface_egl.h"
+
+namespace gl {
+namespace init {
+
+bool InitializeGLOneOffPlatform() {
+ switch (GetGLImplementation()) {
+ case kGLImplementationEGLGLES2:
+ if (!GLSurfaceEGL::InitializeOneOff()) {
+ LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
+ return false;
+ }
+ return true;
+ default:
+ return true;
+ }
+}
+
+} // namespace init
+} // namespace gl
« no previous file with comments | « ui/gl/init/gl_initializer.h ('k') | ui/gl/init/gl_initializer_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698