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

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

Issue 10392068: ui: Move gl/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac_rel Created 8 years, 7 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_android.cc ('k') | ui/gfx/gl/gl_context_cgl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/gfx/gl/gl_context.h"
6
7 namespace gfx {
8
9 class GLSurface;
10
11 // Encapsulates a CGL OpenGL context.
12 class GLContextCGL : public GLContext {
13 public:
14 explicit GLContextCGL(GLShareGroup* share_group);
15
16 // Implement GLContext.
17 virtual bool Initialize(GLSurface* compatible_surface,
18 GpuPreference gpu_preference) OVERRIDE;
19 virtual void Destroy() OVERRIDE;
20 virtual bool MakeCurrent(GLSurface* surface) OVERRIDE;
21 virtual void ReleaseCurrent(GLSurface* surface) OVERRIDE;
22 virtual bool IsCurrent(GLSurface* surface) OVERRIDE;
23 virtual void* GetHandle() OVERRIDE;
24 virtual void SetSwapInterval(int interval) OVERRIDE;
25
26 protected:
27 virtual ~GLContextCGL();
28
29 private:
30 // Expose ForceUseOfDiscreteGPU only to GLContext implementation.
31 friend class GLContext;
32
33 GpuPreference GetGpuPreference();
34
35 // Helper for dual-GPU support on systems where this is necessary
36 // for stability reasons.
37 static void ForceUseOfDiscreteGPU();
38
39 void* context_;
40 GpuPreference gpu_preference_;
41
42 DISALLOW_COPY_AND_ASSIGN(GLContextCGL);
43 };
44
45 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_context_android.cc ('k') | ui/gfx/gl/gl_context_cgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698