| 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_) {
|
|
|