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

Side by Side Diff: ui/gl/gl_surface_win.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/gl/gl_surface_egl.cc ('k') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gl/gl_surface.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 scoped_refptr<GLSurface> surface( 223 scoped_refptr<GLSurface> surface(
224 new NativeViewGLSurfaceOSMesa(window)); 224 new NativeViewGLSurfaceOSMesa(window));
225 if (!surface->Initialize()) 225 if (!surface->Initialize())
226 return NULL; 226 return NULL;
227 227
228 return surface; 228 return surface;
229 } 229 }
230 case kGLImplementationEGLGLES2: { 230 case kGLImplementationEGLGLES2: {
231 scoped_refptr<NativeViewGLSurfaceEGL> surface( 231 scoped_refptr<NativeViewGLSurfaceEGL> surface(
232 new NativeViewGLSurfaceEGL(window)); 232 new NativeViewGLSurfaceEGL(window));
233 DWMVSyncProvider* sync_provider = NULL; 233 scoped_ptr<VSyncProvider> sync_provider;
234 if (base::win::GetVersion() >= base::win::VERSION_VISTA) 234 if (base::win::GetVersion() >= base::win::VERSION_VISTA)
235 sync_provider = new DWMVSyncProvider; 235 sync_provider.reset(new DWMVSyncProvider);
236 if (!surface->Initialize(sync_provider)) 236 if (!surface->Initialize(sync_provider.Pass()))
237 return NULL; 237 return NULL;
238 238
239 return surface; 239 return surface;
240 } 240 }
241 case kGLImplementationDesktopGL: { 241 case kGLImplementationDesktopGL: {
242 scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceWGL( 242 scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceWGL(
243 window)); 243 window));
244 if (!surface->Initialize()) 244 if (!surface->Initialize())
245 return NULL; 245 return NULL;
246 246
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 282 }
283 case kGLImplementationMockGL: 283 case kGLImplementationMockGL:
284 return new GLSurfaceStub; 284 return new GLSurfaceStub;
285 default: 285 default:
286 NOTREACHED(); 286 NOTREACHED();
287 return NULL; 287 return NULL;
288 } 288 }
289 } 289 }
290 290
291 } // namespace gfx 291 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698