Index: ui/gl/gl_surface_osmesa.cc |
diff --git a/ui/gl/gl_surface_osmesa.cc b/ui/gl/gl_surface_osmesa.cc |
index 9a556bc9982d528dcfb40aa81fc08e861e454b27..8018fe83824dcc20ed7adf6ad93f8251b7914979 100644 |
--- a/ui/gl/gl_surface_osmesa.cc |
+++ b/ui/gl/gl_surface_osmesa.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "base/logging.h" |
+#include "third_party/mesa/src/include/GL/osmesa.h" |
#include "ui/gl/gl_bindings.h" |
#include "ui/gl/gl_context.h" |
#include "ui/gl/gl_surface_osmesa.h" |
@@ -82,4 +83,13 @@ GLSurfaceOSMesa::~GLSurfaceOSMesa() { |
Destroy(); |
} |
+bool GLSurfaceOSMesaHeadless::IsOffscreen() { return false; } |
+ |
+bool GLSurfaceOSMesaHeadless::SwapBuffers() { return true; } |
+ |
+GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless() |
+ : GLSurfaceOSMesa(OSMESA_BGRA, gfx::Size(1, 1)) {} |
+ |
+GLSurfaceOSMesaHeadless::~GLSurfaceOSMesaHeadless() { Destroy(); } |
+ |
} // namespace gfx |