summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorposciak@chromium.org <posciak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-04 22:41:40 +0000
committerposciak@chromium.org <posciak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-04 22:41:40 +0000
commit9921da7038a99b4bf02d3d3dfb5ef16c3428b0eb (patch)
treeb8483b1954057d4635aa72c492ae2157fcec2d2d /ui
parent0feccfea7b39133fe14058ad4a7d92b1d2a8ff2c (diff)
downloadchromium_src-9921da7038a99b4bf02d3d3dfb5ef16c3428b0eb.zip
chromium_src-9921da7038a99b4bf02d3d3dfb5ef16c3428b0eb.tar.gz
chromium_src-9921da7038a99b4bf02d3d3dfb5ef16c3428b0eb.tar.bz2
Add display() getter to GLX context class.
Add a getter to return Display from GLX context class. Add include guards. This is in service of https://chromiumcodereview.appspot.com/9814001/ BUG=117062 Review URL: http://codereview.chromium.org/10378010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/gl/gl_context_glx.cc4
-rw-r--r--ui/gfx/gl/gl_context_glx.h9
2 files changed, 12 insertions, 1 deletions
diff --git a/ui/gfx/gl/gl_context_glx.cc b/ui/gfx/gl/gl_context_glx.cc
index b97b7c8..8cb65db 100644
--- a/ui/gfx/gl/gl_context_glx.cc
+++ b/ui/gfx/gl/gl_context_glx.cc
@@ -42,6 +42,10 @@ GLContextGLX::~GLContextGLX() {
Destroy();
}
+Display* GLContextGLX::display() {
+ return display_;
+}
+
bool GLContextGLX::Initialize(
GLSurface* compatible_surface, GpuPreference gpu_preference) {
display_ = static_cast<Display*>(compatible_surface->GetDisplay());
diff --git a/ui/gfx/gl/gl_context_glx.h b/ui/gfx/gl/gl_context_glx.h
index 7479eee..9b35152 100644
--- a/ui/gfx/gl/gl_context_glx.h
+++ b/ui/gfx/gl/gl_context_glx.h
@@ -1,7 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#ifndef UI_GFX_GL_GL_CONTEXT_GLX_H_
+#define UI_GFX_GL_GL_CONTEXT_GLX_H_
+
#include <string>
#include "base/compiler_specific.h"
@@ -18,6 +21,8 @@ class GLContextGLX : public GLContext {
explicit GLContextGLX(GLShareGroup* share_group);
virtual ~GLContextGLX();
+ Display* display();
+
// Implement GLContext.
virtual bool Initialize(
GLSurface* compatible_surface, GpuPreference gpu_preference) OVERRIDE;
@@ -38,3 +43,5 @@ class GLContextGLX : public GLContext {
};
} // namespace gfx
+
+#endif //UI_GFX_GL_GL_CONTEXT_GLX_H_