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

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

Issue 10959061: Revert 158076 - Implement blacklist's force GPU capability in dual GPU machines. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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/gl/gl.gyp ('k') | ui/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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_GL_GL_CONTEXT_CGL_H_ 5 #ifndef UI_GL_GL_CONTEXT_CGL_H_
6 #define UI_GL_GL_CONTEXT_CGL_H_ 6 #define UI_GL_GL_CONTEXT_CGL_H_
7 7
8 #include <OpenGL/CGLTypes.h> 8 #include <OpenGL/CGLTypes.h>
9 9
10 #include "base/memory/scoped_generic_obj.h" 10 #include "base/memory/scoped_generic_obj.h"
(...skipping 20 matching lines...) Expand all
31 virtual bool GetTotalGpuMemory(size_t* bytes) OVERRIDE; 31 virtual bool GetTotalGpuMemory(size_t* bytes) OVERRIDE;
32 32
33 // Helper for dual-GPU support on systems where this is necessary 33 // Helper for dual-GPU support on systems where this is necessary
34 // for stability reasons. 34 // for stability reasons.
35 static void ForceUseOfDiscreteGPU(); 35 static void ForceUseOfDiscreteGPU();
36 36
37 protected: 37 protected:
38 virtual ~GLContextCGL(); 38 virtual ~GLContextCGL();
39 39
40 private: 40 private:
41 // Expose ForceUseOfDiscreteGPU only to GLContext implementation.
42 friend class GLContext;
43
41 GpuPreference GetGpuPreference(); 44 GpuPreference GetGpuPreference();
42 45
46 // Helper for dual-GPU support on systems where this is necessary
47 // for stability reasons.
48 static void ForceUseOfDiscreteGPU();
49
43 void* context_; 50 void* context_;
44 GpuPreference gpu_preference_; 51 GpuPreference gpu_preference_;
45 52
46 CGLPixelFormatObj discrete_pixelformat_; 53 CGLPixelFormatObj discrete_pixelformat_;
47 54
48 DISALLOW_COPY_AND_ASSIGN(GLContextCGL); 55 DISALLOW_COPY_AND_ASSIGN(GLContextCGL);
49 }; 56 };
50 57
51 class ScopedCGLDestroyRendererInfo { 58 class ScopedCGLDestroyRendererInfo {
52 public: 59 public:
53 void operator()(CGLRendererInfoObj x) const; 60 void operator()(CGLRendererInfoObj x) const;
54 }; 61 };
55 62
56 typedef ScopedGenericObj<CGLRendererInfoObj, ScopedCGLDestroyRendererInfo> 63 typedef ScopedGenericObj<CGLRendererInfoObj, ScopedCGLDestroyRendererInfo>
57 ScopedCGLRendererInfoObj; 64 ScopedCGLRendererInfoObj;
58 65
59 } // namespace gfx 66 } // namespace gfx
60 67
61 #endif // UI_GL_GL_CONTEXT_CGL_H_ 68 #endif // UI_GL_GL_CONTEXT_CGL_H_
OLDNEW
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_context_cgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698