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

Unified Diff: ui/gl/gl_context_cgl.cc

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, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_context_cgl.h ('k') | ui/gl/gl_context_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context_cgl.cc
===================================================================
--- ui/gl/gl_context_cgl.cc (revision 158210)
+++ ui/gl/gl_context_cgl.cc (working copy)
@@ -13,7 +13,6 @@
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_cgl.h"
-#include "ui/gl/gpu_switching_manager.h"
namespace gfx {
@@ -28,9 +27,6 @@
GpuPreference gpu_preference) {
DCHECK(compatible_surface);
- gpu_preference = GpuSwitchingManager::GetInstance()->AdjustGpuPreference(
- gpu_preference);
-
GLContextCGL* share_context = share_group() ?
static_cast<GLContextCGL*>(share_group()->GetContext()) : NULL;
@@ -220,6 +216,17 @@
return gpu_preference_;
}
+void GLContextCGL::ForceUseOfDiscreteGPU() {
+ static CGLPixelFormatObj format = NULL;
+ if (format)
+ return;
+ CGLPixelFormatAttribute attribs[1];
+ attribs[0] = static_cast<CGLPixelFormatAttribute>(0);
+ GLint num_pixel_formats = 0;
+ CGLChoosePixelFormat(attribs, &format, &num_pixel_formats);
+ // format is deliberately leaked.
+}
+
void ScopedCGLDestroyRendererInfo::operator()(CGLRendererInfoObj x) const {
CGLDestroyRendererInfo(x);
}
« no previous file with comments | « ui/gl/gl_context_cgl.h ('k') | ui/gl/gl_context_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698