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

Unified Diff: ui/gl/gl_implementation_ozone.cc

Issue 17932004: Support ozone=1 compositor_unittests with OSMesa (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix on linux Created 7 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
Index: ui/gl/gl_implementation_ozone.cc
diff --git a/ui/gl/gl_implementation_ozone.cc b/ui/gl/gl_implementation_ozone.cc
index 481a309e0cd890c7089b98fc4270d3f6bf9c423c..607078a4797b5ac65392ab65c030f24b8e01b9b7 100644
--- a/ui/gl/gl_implementation_ozone.cc
+++ b/ui/gl/gl_implementation_ozone.cc
@@ -2,17 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/base_paths.h"
-#include "base/command_line.h"
-#include "base/files/file_path.h"
-#include "base/logging.h"
-#include "base/native_library.h"
-#include "base/path_service.h"
#include "ui/base/ozone/surface_factory_ozone.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_egl_api_implementation.h"
#include "ui/gl/gl_gl_api_implementation.h"
#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_implementation_linux.h"
#include "ui/gl/gl_osmesa_api_implementation.h"
namespace gfx {
@@ -32,6 +27,7 @@ void GL_BINDING_CALL MarshalDepthRangeToDepthRangef(GLclampd z_near,
void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) {
impls->push_back(kGLImplementationEGLGLES2);
+ impls->push_back(kGLImplementationOSMesaGL);
}
bool InitializeGLBindings(GLImplementation implementation) {
@@ -42,6 +38,8 @@ bool InitializeGLBindings(GLImplementation implementation) {
return true;
switch (implementation) {
+ case kGLImplementationOSMesaGL:
+ return InitializeGLBindingsOSMesaGL();
case kGLImplementationEGLGLES2:
if (!ui::SurfaceFactoryOzone::GetInstance()->LoadEGLGLES2Bindings())
return false;
@@ -62,7 +60,7 @@ bool InitializeGLBindings(GLImplementation implementation) {
}
default:
NOTIMPLEMENTED()
- << "Unsupported GL type for NativeSurfaceLinux GL implementation";
+ << "Unsupported GL type for Ozone surface implementation";
return false;
}
@@ -72,6 +70,10 @@ bool InitializeGLBindings(GLImplementation implementation) {
bool InitializeGLExtensionBindings(GLImplementation implementation,
GLContext* context) {
switch (implementation) {
+ case kGLImplementationOSMesaGL:
+ InitializeGLExtensionBindingsGL(context);
+ InitializeGLExtensionBindingsOSMESA(context);
+ break;
case kGLImplementationEGLGLES2:
InitializeGLExtensionBindingsGL(context);
InitializeGLExtensionBindingsEGL(context);
« ui/gl/gl.gyp ('K') | « ui/gl/gl_image_ozone.cc ('k') | ui/gl/gl_implementation_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698