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

Unified Diff: ui/gl/gl_surface_glx.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_glx.h ('k') | ui/gl/gl_surface_osmesa.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_glx.cc
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index d66078c89df64179436d7b6d9eacdea6058b6a05..2a52fc7d3fd334e582619720ee3b96283619bbd7 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -317,7 +317,10 @@ Display* SGIVideoSyncProviderThreadShim::display_ = NULL;
} // namespace
-GLSurfaceGLX::GLSurfaceGLX() {}
+GLSurfaceGLX::GLSurfaceGLX(
+ const gfx::SurfaceConfiguration& requested_configuration)
+ : GLSurface(requested_configuration) {
+}
bool GLSurfaceGLX::InitializeOneOff() {
static bool initialized = false;
@@ -404,8 +407,11 @@ void* GLSurfaceGLX::GetDisplay() {
GLSurfaceGLX::~GLSurfaceGLX() {}
-NativeViewGLSurfaceGLX::NativeViewGLSurfaceGLX(gfx::AcceleratedWidget window)
- : parent_window_(window),
+NativeViewGLSurfaceGLX::NativeViewGLSurfaceGLX(
+ gfx::AcceleratedWidget window,
+ const gfx::SurfaceConfiguration& requested_configuration)
+ : GLSurfaceGLX(requested_configuration),
+ parent_window_(window),
window_(0),
config_(NULL) {
}
@@ -529,6 +535,11 @@ void* NativeViewGLSurfaceGLX::GetConfig() {
// use when creating the window in the first place. Then we can
// pass that FBConfig down rather than attempting to reconstitute
// it.
+ //
+ // TODO(iansf): Perhaps instead of kbr's suggestion above, we can
+ // now use GLSurface::GetSurfaceConfiguration to use the returned
+ // gfx::SurfaceConfiguration with glXChooseFBConfig in a manner
+ // similar to that used in NativeViewGLSurfaceEGL::GetConfig.
XWindowAttributes attributes;
if (!XGetWindowAttributes(
@@ -590,8 +601,11 @@ NativeViewGLSurfaceGLX::~NativeViewGLSurfaceGLX() {
Destroy();
}
-PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(const gfx::Size& size)
- : size_(size),
+PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(
+ const gfx::Size& size,
+ const gfx::SurfaceConfiguration& requested_configuration)
+ : GLSurfaceGLX(requested_configuration),
+ size_(size),
config_(NULL),
pbuffer_(0) {
// Some implementations of Pbuffer do not support having a 0 size. For such
« no previous file with comments | « ui/gl/gl_surface_glx.h ('k') | ui/gl/gl_surface_osmesa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698