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

Unified Diff: ui/gl/gl_surface_egl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 3f8923ae895ecc38887237d6bd09f3c9425aa6e1..d11577b3fd10f621f3d028b3d75198ec4793e4d0 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -250,12 +250,12 @@ NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(gfx::AcceleratedWidget window)
}
bool NativeViewGLSurfaceEGL::Initialize() {
- return Initialize(NULL);
+ return Initialize(scoped_ptr<VSyncProvider>());
}
-bool NativeViewGLSurfaceEGL::Initialize(VSyncProvider* sync_provider) {
+bool NativeViewGLSurfaceEGL::Initialize(
+ scoped_ptr<VSyncProvider> sync_provider) {
DCHECK(!surface_);
- scoped_ptr<VSyncProvider> vsync_provider(sync_provider);
if (window_ == kNullAcceleratedWidget) {
LOG(ERROR) << "Trying to create surface without window.";
@@ -296,7 +296,7 @@ bool NativeViewGLSurfaceEGL::Initialize(VSyncProvider* sync_provider) {
supports_post_sub_buffer_ = (surfaceVal && retVal) == EGL_TRUE;
if (sync_provider)
- vsync_provider_.swap(vsync_provider);
+ vsync_provider_.reset(sync_provider.release());
else if (g_egl_sync_control_supported)
vsync_provider_.reset(new EGLSyncControlVSyncProvider(surface_));
return true;
@@ -718,15 +718,15 @@ GLSurface::CreateViewGLSurface(gfx::AcceleratedWidget window) {
DCHECK(GetGLImplementation() == kGLImplementationEGLGLES2);
if (window) {
scoped_refptr<NativeViewGLSurfaceEGL> surface;
- VSyncProvider* sync_provider = NULL;
+ scoped_ptr<VSyncProvider> sync_provider;
#if defined(USE_OZONE)
window = gfx::SurfaceFactoryOzone::GetInstance()->RealizeAcceleratedWidget(
window);
sync_provider =
- gfx::SurfaceFactoryOzone::GetInstance()->GetVSyncProvider(window);
+ gfx::SurfaceFactoryOzone::GetInstance()->CreateVSyncProvider(window);
#endif
surface = new NativeViewGLSurfaceEGL(window);
- if(surface->Initialize(sync_provider))
+ if(surface->Initialize(sync_provider.Pass()))
return surface;
} else {
scoped_refptr<GLSurface> surface = new GLSurfaceStub();
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698