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

Side by Side Diff: ui/gfx/ozone/dri/dri_surface_factory.cc

Issue 141683005: Removes MessageLoop::Type checks in favor of IsCurrent on MessageLoops. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base:: Created 6 years, 11 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/base/test/ui_controls_mac.mm ('k') | ui/gfx/win/singleton_hwnd.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ozone/dri/dri_surface_factory.h" 5 #include "ui/gfx/ozone/dri/dri_surface_factory.h"
6 6
7 #include <drm.h> 7 #include <drm.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <xf86drm.h> 9 #include <xf86drm.h>
10 10
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 bool DriSurfaceFactory::AttemptToResizeAcceleratedWidget( 196 bool DriSurfaceFactory::AttemptToResizeAcceleratedWidget(
197 gfx::AcceleratedWidget w, 197 gfx::AcceleratedWidget w,
198 const gfx::Rect& bounds) { 198 const gfx::Rect& bounds) {
199 return false; 199 return false;
200 } 200 }
201 201
202 bool DriSurfaceFactory::SchedulePageFlip(gfx::AcceleratedWidget w) { 202 bool DriSurfaceFactory::SchedulePageFlip(gfx::AcceleratedWidget w) {
203 CHECK(state_ == INITIALIZED); 203 CHECK(state_ == INITIALIZED);
204 // TODO(dnicoara) Change this CHECK once we're running with the threaded 204 // TODO(dnicoara) Change this CHECK once we're running with the threaded
205 // compositor. 205 // compositor.
206 CHECK(base::MessageLoop::current()->type() == base::MessageLoop::TYPE_UI); 206 CHECK(base::MessageLoopForUI::IsCurrent());
207 207
208 // TODO(dnicoara) Once we can handle multiple displays this needs to be 208 // TODO(dnicoara) Once we can handle multiple displays this needs to be
209 // changed. 209 // changed.
210 CHECK(w == kDefaultWidgetHandle); 210 CHECK(w == kDefaultWidgetHandle);
211 211
212 if (!controller_->SchedulePageFlip()) 212 if (!controller_->SchedulePageFlip())
213 return false; 213 return false;
214 214
215 // Only wait for the page flip event to finish if it was properly scheduled. 215 // Only wait for the page flip event to finish if it was properly scheduled.
216 // 216 //
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 drmEventContext drm_event; 308 drmEventContext drm_event;
309 drm_event.version = DRM_EVENT_CONTEXT_VERSION; 309 drm_event.version = DRM_EVENT_CONTEXT_VERSION;
310 drm_event.page_flip_handler = HandlePageFlipEvent; 310 drm_event.page_flip_handler = HandlePageFlipEvent;
311 drm_event.vblank_handler = NULL; 311 drm_event.vblank_handler = NULL;
312 312
313 // Wait for the page-flip to complete. 313 // Wait for the page-flip to complete.
314 drmHandleEvent(fd, &drm_event); 314 drmHandleEvent(fd, &drm_event);
315 } 315 }
316 316
317 } // namespace gfx 317 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/base/test/ui_controls_mac.mm ('k') | ui/gfx/win/singleton_hwnd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698