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

Side by Side Diff: ui/gfx/gl/gl_context_egl.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_cgl.cc ('k') | ui/gfx/gl/gl_context_egl.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 #ifndef UI_GFX_GL_GL_CONTEXT_EGL_H_ 5 #ifndef UI_GFX_GL_GL_CONTEXT_EGL_H_
6 #define UI_GFX_GL_GL_CONTEXT_EGL_H_ 6 #define UI_GFX_GL_GL_CONTEXT_EGL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "ui/gfx/gl/gl_context.h" 11 #include "ui/gfx/gl/gl_context.h"
12 12
13 typedef void* EGLContext; 13 typedef void* EGLContext;
14 typedef void* EGLDisplay; 14 typedef void* EGLDisplay;
15 typedef void* EGLConfig; 15 typedef void* EGLConfig;
16 16
17 namespace gfx { 17 namespace gfx {
18 18
19 class GLSurface; 19 class GLSurface;
20 20
21 // Encapsulates an EGL OpenGL ES context. 21 // Encapsulates an EGL OpenGL ES context.
22 class GLContextEGL : public GLContext { 22 class GLContextEGL : public GLContext {
23 public: 23 public:
24 explicit GLContextEGL(GLShareGroup* share_group); 24 explicit GLContextEGL(GLShareGroup* share_group);
25 virtual ~GLContextEGL(); 25 virtual ~GLContextEGL();
26 26
27 // Implement GLContext. 27 // Implement GLContext.
28 virtual bool Initialize(GLSurface* compatible_surface); 28 virtual bool Initialize(
29 GLSurface* compatible_surface, GpuPreference gpu_preference);
29 virtual void Destroy(); 30 virtual void Destroy();
30 virtual bool MakeCurrent(GLSurface* surface); 31 virtual bool MakeCurrent(GLSurface* surface);
31 virtual void ReleaseCurrent(GLSurface* surface); 32 virtual void ReleaseCurrent(GLSurface* surface);
32 virtual bool IsCurrent(GLSurface* surface); 33 virtual bool IsCurrent(GLSurface* surface);
33 virtual void* GetHandle(); 34 virtual void* GetHandle();
34 virtual void SetSwapInterval(int interval); 35 virtual void SetSwapInterval(int interval);
35 virtual std::string GetExtensions(); 36 virtual std::string GetExtensions();
36 37
37 private: 38 private:
38 EGLContext context_; 39 EGLContext context_;
39 EGLDisplay display_; 40 EGLDisplay display_;
40 EGLConfig config_; 41 EGLConfig config_;
41 42
42 DISALLOW_COPY_AND_ASSIGN(GLContextEGL); 43 DISALLOW_COPY_AND_ASSIGN(GLContextEGL);
43 }; 44 };
44 45
45 } // namespace gfx 46 } // namespace gfx
46 47
47 #endif // UI_GFX_GL_GL_CONTEXT_EGL_H_ 48 #endif // UI_GFX_GL_GL_CONTEXT_EGL_H_
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_context_cgl.cc ('k') | ui/gfx/gl/gl_context_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698