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

Unified Diff: ui/gl/gl_surface_nsl.cc

Issue 13886018: Add a factory and defines for native Linux surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: ui/gl/gl_surface_nsl.cc
diff --git a/ui/gl/gl_surface_android.cc b/ui/gl/gl_surface_nsl.cc
similarity index 90%
copy from ui/gl/gl_surface_android.cc
copy to ui/gl/gl_surface_nsl.cc
index 6c2565798a375b2b97783fe2612244314824fce9..034eca770c8e530279989a32982d40a4cd8659a8 100644
--- a/ui/gl/gl_surface_android.cc
+++ b/ui/gl/gl_surface_nsl.cc
@@ -1,13 +1,12 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 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/gl_surface.h"
-#include <EGL/egl.h>
-
#include "base/logging.h"
#include "base/memory/ref_counted.h"
+#include "ui/base/linux/native_surface_linux_factory.h"
#include "ui/gl/egl_util.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
@@ -26,6 +25,7 @@ bool GLSurface::InitializeOneOffInternal() {
switch (GetGLImplementation()) {
case kGLImplementationEGLGLES2:
+ ui::NativeSurfaceLinuxFactory::GetInstance()->InitializeHardware();
if (!GLSurfaceEGL::InitializeOneOff()) {
LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
return false;
@@ -39,6 +39,7 @@ bool GLSurface::InitializeOneOffInternal() {
initialized = true;
return true;
}
+
// static
scoped_refptr<GLSurface>
GLSurface::CreateViewGLSurface(bool software, gfx::AcceleratedWidget window) {

Powered by Google App Engine
This is Rietveld 408576698