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

Unified Diff: ui/gl/gl_surface_osmesa.cc

Issue 1168993002: Update the native_viewport interface to allow specification of the surface configuration, currently… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Final cleanups Created 5 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
« no previous file with comments | « ui/gl/gl_surface_osmesa.h ('k') | ui/gl/gl_surface_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(); }
« no previous file with comments | « ui/gl/gl_surface_osmesa.h ('k') | ui/gl/gl_surface_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698