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

Side by Side Diff: ui/gl/gl_fence.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
« no previous file with comments | « ui/gl/gl_context_x11.cc ('k') | ui/gl/gl_image_glx.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 (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_fence.h" 5 #include "ui/gl/gl_fence.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ui/gl/gl_bindings.h" 9 #include "ui/gl/gl_bindings.h"
10 #include "ui/gl/gl_context.h" 10 #include "ui/gl/gl_context.h"
(...skipping 25 matching lines...) Expand all
36 #else 36 #else
37 g_driver_egl.ext.b_EGL_KHR_fence_sync || 37 g_driver_egl.ext.b_EGL_KHR_fence_sync ||
38 #endif 38 #endif
39 g_driver_gl.ext.b_GL_NV_fence; 39 g_driver_gl.ext.b_GL_NV_fence;
40 } 40 }
41 41
42 GLFence* GLFence::Create() { 42 GLFence* GLFence::Create() {
43 DCHECK(GLContext::GetCurrent()) 43 DCHECK(GLContext::GetCurrent())
44 << "Trying to create fence with no context"; 44 << "Trying to create fence with no context";
45 45
46 scoped_ptr<GLFence> fence; 46 std::unique_ptr<GLFence> fence;
47 // Prefer ARB_sync which supports server-side wait. 47 // Prefer ARB_sync which supports server-side wait.
48 if (g_driver_gl.ext.b_GL_ARB_sync || 48 if (g_driver_gl.ext.b_GL_ARB_sync ||
49 GetGLVersionInfo()->is_es3 || 49 GetGLVersionInfo()->is_es3 ||
50 GetGLImplementation() == kGLImplementationDesktopGLCoreProfile) { 50 GetGLImplementation() == kGLImplementationDesktopGLCoreProfile) {
51 fence.reset(new GLFenceARB); 51 fence.reset(new GLFenceARB);
52 #if defined(OS_MACOSX) 52 #if defined(OS_MACOSX)
53 } else if (g_driver_gl.ext.b_GL_APPLE_fence) { 53 } else if (g_driver_gl.ext.b_GL_APPLE_fence) {
54 fence.reset(new GLFenceAPPLE); 54 fence.reset(new GLFenceAPPLE);
55 #else 55 #else
56 } else if (g_driver_egl.ext.b_EGL_KHR_fence_sync) { 56 } else if (g_driver_egl.ext.b_EGL_KHR_fence_sync) {
(...skipping 10 matching lines...) Expand all
67 bool GLFence::ResetSupported() { 67 bool GLFence::ResetSupported() {
68 // Resetting a fence to its original state isn't supported by default. 68 // Resetting a fence to its original state isn't supported by default.
69 return false; 69 return false;
70 } 70 }
71 71
72 void GLFence::ResetState() { 72 void GLFence::ResetState() {
73 NOTIMPLEMENTED(); 73 NOTIMPLEMENTED();
74 } 74 }
75 75
76 } // namespace gfx 76 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_context_x11.cc ('k') | ui/gl/gl_image_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698