| OLD | NEW |
| 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_egl.h" | 5 #include "ui/gl/gl_surface_egl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 GetDisplay(), surface_, EGL_POST_SUB_BUFFER_SUPPORTED_NV, &surfaceVal); | 755 GetDisplay(), surface_, EGL_POST_SUB_BUFFER_SUPPORTED_NV, &surfaceVal); |
| 756 supports_post_sub_buffer_ = (surfaceVal && retVal) == EGL_TRUE; | 756 supports_post_sub_buffer_ = (surfaceVal && retVal) == EGL_TRUE; |
| 757 } | 757 } |
| 758 | 758 |
| 759 supports_swap_buffer_with_damage_ = | 759 supports_swap_buffer_with_damage_ = |
| 760 g_driver_egl.ext.b_EGL_KHR_swap_buffers_with_damage && | 760 g_driver_egl.ext.b_EGL_KHR_swap_buffers_with_damage && |
| 761 base::CommandLine::ForCurrentProcess()->HasSwitch( | 761 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 762 switches::kEnableSwapBuffersWithDamage); | 762 switches::kEnableSwapBuffersWithDamage); |
| 763 | 763 |
| 764 if (sync_provider) | 764 if (sync_provider) |
| 765 vsync_provider_.reset(sync_provider.release()); | 765 vsync_provider_ = std::move(sync_provider); |
| 766 else if (g_egl_sync_control_supported) | 766 else if (g_egl_sync_control_supported) |
| 767 vsync_provider_.reset(new EGLSyncControlVSyncProvider(surface_)); | 767 vsync_provider_.reset(new EGLSyncControlVSyncProvider(surface_)); |
| 768 return true; | 768 return true; |
| 769 } | 769 } |
| 770 | 770 |
| 771 bool NativeViewGLSurfaceEGL::InitializeNativeWindow() { | 771 bool NativeViewGLSurfaceEGL::InitializeNativeWindow() { |
| 772 return true; | 772 return true; |
| 773 } | 773 } |
| 774 | 774 |
| 775 void NativeViewGLSurfaceEGL::Destroy() { | 775 void NativeViewGLSurfaceEGL::Destroy() { |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 void* SurfacelessEGL::GetShareHandle() { | 1218 void* SurfacelessEGL::GetShareHandle() { |
| 1219 return NULL; | 1219 return NULL; |
| 1220 } | 1220 } |
| 1221 | 1221 |
| 1222 SurfacelessEGL::~SurfacelessEGL() { | 1222 SurfacelessEGL::~SurfacelessEGL() { |
| 1223 } | 1223 } |
| 1224 | 1224 |
| 1225 } // namespace gl | 1225 } // namespace gl |
| OLD | NEW |