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

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

Issue 102563005: [Ozone] Rename GetVSyncProvider to CreateVSyncProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win 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/gfx/ozone/dri/dri_surface_factory.h ('k') | ui/gfx/ozone/impl/file_surface_factory.h » ('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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 return true; 231 return true;
232 } 232 }
233 233
234 SkCanvas* DriSurfaceFactory::GetCanvasForWidget( 234 SkCanvas* DriSurfaceFactory::GetCanvasForWidget(
235 gfx::AcceleratedWidget w) { 235 gfx::AcceleratedWidget w) {
236 CHECK(state_ == INITIALIZED); 236 CHECK(state_ == INITIALIZED);
237 return reinterpret_cast<DriSurface*>(w)->GetDrawableForWidget(); 237 return reinterpret_cast<DriSurface*>(w)->GetDrawableForWidget();
238 } 238 }
239 239
240 gfx::VSyncProvider* DriSurfaceFactory::GetVSyncProvider( 240 scoped_ptr<gfx::VSyncProvider> DriSurfaceFactory::CreateVSyncProvider(
241 gfx::AcceleratedWidget w) { 241 gfx::AcceleratedWidget w) {
242 CHECK(state_ == INITIALIZED); 242 CHECK(state_ == INITIALIZED);
243 return new DriVSyncProvider(controller_.get()); 243 return scoped_ptr<VSyncProvider>(new DriVSyncProvider(controller_.get()));
244 } 244 }
245 245
246 //////////////////////////////////////////////////////////////////////////////// 246 ////////////////////////////////////////////////////////////////////////////////
247 // DriSurfaceFactory private 247 // DriSurfaceFactory private
248 248
249 DriSurface* DriSurfaceFactory::CreateSurface( 249 DriSurface* DriSurfaceFactory::CreateSurface(
250 HardwareDisplayController* controller) { 250 HardwareDisplayController* controller) {
251 return new DriSurface(controller); 251 return new DriSurface(controller);
252 } 252 }
253 253
(...skipping 54 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/gfx/ozone/dri/dri_surface_factory.h ('k') | ui/gfx/ozone/impl/file_surface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698