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 // This include must be here so that the includes provided transitively | 5 // This include must be here so that the includes provided transitively |
6 // by gl_surface_egl.h don't make it impossible to compile this code. | 6 // by gl_surface_egl.h don't make it impossible to compile this code. |
7 #include "third_party/mesa/src/include/GL/osmesa.h" | 7 #include "third_party/mesa/src/include/GL/osmesa.h" |
8 | 8 |
9 #include "ui/gl/gl_surface_egl.h" | 9 #include "ui/gl/gl_surface_egl.h" |
10 | 10 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 return false; | 288 return false; |
289 } | 289 } |
290 | 290 |
291 EGLint surfaceVal; | 291 EGLint surfaceVal; |
292 EGLBoolean retVal = eglQuerySurface(GetDisplay(), | 292 EGLBoolean retVal = eglQuerySurface(GetDisplay(), |
293 surface_, | 293 surface_, |
294 EGL_POST_SUB_BUFFER_SUPPORTED_NV, | 294 EGL_POST_SUB_BUFFER_SUPPORTED_NV, |
295 &surfaceVal); | 295 &surfaceVal); |
296 supports_post_sub_buffer_ = (surfaceVal && retVal) == EGL_TRUE; | 296 supports_post_sub_buffer_ = (surfaceVal && retVal) == EGL_TRUE; |
297 | 297 |
298 #if defined(OS_WIN) | |
299 // Partial swaps may be causing performance issues on Windows. | |
300 supports_post_sub_buffer_ = false; | |
301 #endif | |
302 | |
303 if (sync_provider) | 298 if (sync_provider) |
304 vsync_provider_.swap(vsync_provider); | 299 vsync_provider_.swap(vsync_provider); |
305 else if (g_egl_sync_control_supported) | 300 else if (g_egl_sync_control_supported) |
306 vsync_provider_.reset(new EGLSyncControlVSyncProvider(surface_)); | 301 vsync_provider_.reset(new EGLSyncControlVSyncProvider(surface_)); |
307 return true; | 302 return true; |
308 } | 303 } |
309 | 304 |
310 void NativeViewGLSurfaceEGL::Destroy() { | 305 void NativeViewGLSurfaceEGL::Destroy() { |
311 if (surface_) { | 306 if (surface_) { |
312 if (!eglDestroySurface(GetDisplay(), surface_)) { | 307 if (!eglDestroySurface(GetDisplay(), surface_)) { |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 } | 761 } |
767 default: | 762 default: |
768 NOTREACHED(); | 763 NOTREACHED(); |
769 return NULL; | 764 return NULL; |
770 } | 765 } |
771 } | 766 } |
772 | 767 |
773 #endif | 768 #endif |
774 | 769 |
775 } // namespace gfx | 770 } // namespace gfx |
OLD | NEW |