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

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

Issue 79643002: Disable partial swap on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « no previous file | 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 // 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
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
298 if (sync_provider) 303 if (sync_provider)
299 vsync_provider_.swap(vsync_provider); 304 vsync_provider_.swap(vsync_provider);
300 else if (g_egl_sync_control_supported) 305 else if (g_egl_sync_control_supported)
301 vsync_provider_.reset(new EGLSyncControlVSyncProvider(surface_)); 306 vsync_provider_.reset(new EGLSyncControlVSyncProvider(surface_));
302 return true; 307 return true;
303 } 308 }
304 309
305 void NativeViewGLSurfaceEGL::Destroy() { 310 void NativeViewGLSurfaceEGL::Destroy() {
306 if (surface_) { 311 if (surface_) {
307 if (!eglDestroySurface(GetDisplay(), surface_)) { 312 if (!eglDestroySurface(GetDisplay(), surface_)) {
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 } 766 }
762 default: 767 default:
763 NOTREACHED(); 768 NOTREACHED();
764 return NULL; 769 return NULL;
765 } 770 }
766 } 771 }
767 772
768 #endif 773 #endif
769 774
770 } // namespace gfx 775 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698