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

Side by Side Diff: ui/gfx/gl/gl_context_glx.h

Issue 8233027: Support dynamic switching between integrated and discrete GPUs on Mac OS X. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/gl/gl_context_egl.cc ('k') | ui/gfx/gl/gl_context_glx.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "ui/gfx/gl/gl_context.h" 7 #include "ui/gfx/gl/gl_context.h"
8 8
9 namespace gfx { 9 namespace gfx {
10 10
11 class GLSurface; 11 class GLSurface;
12 12
13 // Encapsulates a GLX OpenGL context. 13 // Encapsulates a GLX OpenGL context.
14 class GLContextGLX : public GLContext { 14 class GLContextGLX : public GLContext {
15 public: 15 public:
16 explicit GLContextGLX(GLShareGroup* share_group); 16 explicit GLContextGLX(GLShareGroup* share_group);
17 virtual ~GLContextGLX(); 17 virtual ~GLContextGLX();
18 18
19 // Implement GLContext. 19 // Implement GLContext.
20 virtual bool Initialize(GLSurface* compatible_surface); 20 virtual bool Initialize(
21 GLSurface* compatible_surface, GpuPreference gpu_preference);
21 virtual void Destroy(); 22 virtual void Destroy();
22 virtual bool MakeCurrent(GLSurface* surface); 23 virtual bool MakeCurrent(GLSurface* surface);
23 virtual void ReleaseCurrent(GLSurface* surface); 24 virtual void ReleaseCurrent(GLSurface* surface);
24 virtual bool IsCurrent(GLSurface* surface); 25 virtual bool IsCurrent(GLSurface* surface);
25 virtual void* GetHandle(); 26 virtual void* GetHandle();
26 virtual void SetSwapInterval(int interval); 27 virtual void SetSwapInterval(int interval);
27 virtual std::string GetExtensions(); 28 virtual std::string GetExtensions();
28 virtual bool WasAllocatedUsingARBRobustness(); 29 virtual bool WasAllocatedUsingARBRobustness();
29 30
30 private: 31 private:
31 void* context_; 32 void* context_;
32 33
33 DISALLOW_COPY_AND_ASSIGN(GLContextGLX); 34 DISALLOW_COPY_AND_ASSIGN(GLContextGLX);
34 }; 35 };
35 36
36 } // namespace gfx 37 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_context_egl.cc ('k') | ui/gfx/gl/gl_context_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698