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

Side by Side Diff: ui/gfx/compositor/compositor_gl.cc

Issue 6990019: Remove override on thread IO restrictions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "ui/gfx/compositor/compositor.h" 5 #include "ui/gfx/compositor/compositor.h"
6 6
7 #include <GL/gl.h> 7 #include <GL/gl.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 void CompositorGL::NotifyEnd() { 236 void CompositorGL::NotifyEnd() {
237 DCHECK(started_); 237 DCHECK(started_);
238 gl_context_->SwapBuffers(); 238 gl_context_->SwapBuffers();
239 started_ = false; 239 started_ = false;
240 } 240 }
241 241
242 } // namespace 242 } // namespace
243 243
244 // static 244 // static
245 Compositor* Compositor::Create(gfx::AcceleratedWidget widget) { 245 Compositor* Compositor::Create(gfx::AcceleratedWidget widget) {
246 // The following line of code exists soley to disable IO restrictions
247 // on this thread long enough to perform the GL bindings.
248 // TODO(backer) Remove this when GL initialisation cleaned up.
249 base::ThreadRestrictions::ScopedAllowIO allow_io;
sky 2011/05/20 21:42:47 Is there a corresponding include that can be nuked
250 // TODO(backer) Remove this when GL thread patch lands. Should be init'd 246 // TODO(backer) Remove this when GL thread patch lands. Should be init'd
251 // by the new GPU thread. 247 // by the new GPU thread.
252 // http://codereview.chromium.org/6677055/ 248 // http://codereview.chromium.org/6677055/
253 gfx::InitializeGLBindings(gfx::kGLImplementationDesktopGL); 249 gfx::InitializeGLBindings(gfx::kGLImplementationDesktopGL);
254 gfx::GLSurfaceGLX::InitializeOneOff(); 250 gfx::GLSurfaceGLX::InitializeOneOff();
255 251
256 if (gfx::GetGLImplementation() != gfx::kGLImplementationNone) 252 if (gfx::GetGLImplementation() != gfx::kGLImplementationNone)
257 return new glHidden::CompositorGL(widget); 253 return new glHidden::CompositorGL(widget);
258 return NULL; 254 return NULL;
259 } 255 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 314
319 // static 315 // static
320 Compositor* Compositor::Create(gfx::AcceleratedWidget widget) { 316 Compositor* Compositor::Create(gfx::AcceleratedWidget widget) {
321 if (gfx::GetGLImplementation() != gfx::kGLImplementationNone) 317 if (gfx::GetGLImplementation() != gfx::kGLImplementationNone)
322 return new CompositorGL(widget); 318 return new CompositorGL(widget);
323 return NULL; 319 return NULL;
324 } 320 }
325 #endif 321 #endif
326 322
327 } // namespace ui 323 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698