diff options
Diffstat (limited to 'app/surface/accelerated_surface_mac.cc')
-rw-r--r-- | app/surface/accelerated_surface_mac.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/surface/accelerated_surface_mac.cc b/app/surface/accelerated_surface_mac.cc index 357b4a3..b139cb8 100644 --- a/app/surface/accelerated_surface_mac.cc +++ b/app/surface/accelerated_surface_mac.cc @@ -5,6 +5,7 @@ #include "app/surface/accelerated_surface_mac.h" #include "app/gfx/gl/gl_bindings.h" +#include "app/gfx/gl/gl_implementation.h" #include "app/surface/io_surface_support_mac.h" #include "base/logging.h" #include "gfx/rect.h" @@ -188,6 +189,12 @@ uint64 AcceleratedSurface::SetSurfaceSize(const gfx::Size& size) { return 0; } + // Only support IO surfaces if the GL implementation is the native desktop GL. + // IO surfaces will not work with, for example, OSMesa software renderer + // GL contexts. + if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) + return 0; + IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize(); if (!io_surface_support) return 0; // Caller can try using SetWindowSizeForTransportDIB(). |