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

Unified Diff: ui/gl/gl_context_cgl.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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.cc ('k') | ui/gl/gl_mock_autogen_gl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context_cgl.cc
diff --git a/ui/gl/gl_context_cgl.cc b/ui/gl/gl_context_cgl.cc
index 102407c4d58da6e3df624482126b227785e534ae..d4bc7805fc6d3156d90889ab0f9b7289fd0ba39c 100644
--- a/ui/gl/gl_context_cgl.cc
+++ b/ui/gl/gl_context_cgl.cc
@@ -122,15 +122,12 @@ bool GLContextCGL::Initialize(GLSurface* compatible_surface,
void GLContextCGL::Destroy() {
if (discrete_pixelformat_) {
- if (base::MessageLoop::current() != NULL) {
- // Delay releasing the pixel format for 10 seconds to reduce the number of
- // unnecessary GPU switches.
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE, base::Bind(&CGLReleasePixelFormat, discrete_pixelformat_),
- base::TimeDelta::FromSeconds(10));
- } else {
- CGLReleasePixelFormat(discrete_pixelformat_);
- }
+ // Delay releasing the pixel format for 10 seconds to reduce the number of
+ // unnecessary GPU switches.
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&CGLReleasePixelFormat, discrete_pixelformat_),
+ base::TimeDelta::FromSeconds(10));
discrete_pixelformat_ = NULL;
}
if (context_) {
« no previous file with comments | « ui/gl/gl_context.cc ('k') | ui/gl/gl_mock_autogen_gl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698