| Index: ui/gl/gl_surface_osmesa.cc
|
| diff --git a/ui/gl/gl_surface_osmesa.cc b/ui/gl/gl_surface_osmesa.cc
|
| index 7f1b1ad881d0bc1b6b2ce5a99a0bf6e80188ae89..2efe12be35b5fe3af5df4b3d96860c585bd1fc8d 100644
|
| --- a/ui/gl/gl_surface_osmesa.cc
|
| +++ b/ui/gl/gl_surface_osmesa.cc
|
| @@ -12,9 +12,11 @@
|
|
|
| namespace gfx {
|
|
|
| -GLSurfaceOSMesa::GLSurfaceOSMesa(OSMesaSurfaceFormat format,
|
| - const gfx::Size& size)
|
| - : size_(size) {
|
| +GLSurfaceOSMesa::GLSurfaceOSMesa(
|
| + OSMesaSurfaceFormat format,
|
| + const gfx::Size& size,
|
| + const gfx::SurfaceConfiguration requested_configuration)
|
| + : GLSurface(requested_configuration), size_(size) {
|
| switch (format) {
|
| case OSMesaSurfaceFormatBGRA:
|
| format_ = OSMESA_BGRA;
|
| @@ -37,6 +39,14 @@ void GLSurfaceOSMesa::Destroy() {
|
| buffer_.reset();
|
| }
|
|
|
| +void* GLSurfaceOSMesa::GetConfig() {
|
| + // TODO(iansf): Possibly choose a configuration in a manner similar to
|
| + // NativeViewGLSurfaceEGL::GetConfig, using the gfx::SurfaceConfiguration
|
| + // returned by GLSurface::GetSurfaceConfiguration.
|
| + NOTIMPLEMENTED();
|
| + return NULL;
|
| +}
|
| +
|
| bool GLSurfaceOSMesa::Resize(const gfx::Size& new_size) {
|
| scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current;
|
| GLContext* current_context = GLContext::GetCurrent();
|
| @@ -109,8 +119,19 @@ bool GLSurfaceOSMesaHeadless::IsOffscreen() { return false; }
|
|
|
| bool GLSurfaceOSMesaHeadless::SwapBuffers() { return true; }
|
|
|
| -GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless()
|
| - : GLSurfaceOSMesa(OSMesaSurfaceFormatBGRA, gfx::Size(1, 1)) {
|
| +GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless(
|
| + const gfx::SurfaceConfiguration requested_configuration)
|
| + : GLSurfaceOSMesa(OSMesaSurfaceFormatBGRA,
|
| + gfx::Size(1, 1),
|
| + requested_configuration) {
|
| +}
|
| +
|
| +void* GLSurfaceOSMesaHeadless::GetConfig() {
|
| + // TODO(iansf): Possibly choose a configuration in a manner similar to
|
| + // NativeViewGLSurfaceEGL::GetConfig, using the gfx::SurfaceConfiguration
|
| + // returned by GLSurface::GetSurfaceConfiguration.
|
| + NOTIMPLEMENTED();
|
| + return NULL;
|
| }
|
|
|
| GLSurfaceOSMesaHeadless::~GLSurfaceOSMesaHeadless() { Destroy(); }
|
|
|