| Index: ui/gl/gl_surface_egl.cc
|
| diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
|
| index c34ca0e70e7a25396a82cd9310a90c2ef0630cd6..8c08ff4981c19a04101deca89b10581bd259577a 100644
|
| --- a/ui/gl/gl_surface_egl.cc
|
| +++ b/ui/gl/gl_surface_egl.cc
|
| @@ -53,8 +53,6 @@
|
| using ui::GetLastEGLErrorString;
|
|
|
| namespace gfx {
|
| -
|
| -unsigned int NativeViewGLSurfaceEGL::current_swap_generation_ = 0;
|
|
|
| namespace {
|
|
|
| @@ -288,9 +286,7 @@
|
| surface_(NULL),
|
| supports_post_sub_buffer_(false),
|
| config_(NULL),
|
| - size_(1, 1),
|
| - swap_interval_(1),
|
| - swap_generation_(0) {
|
| + size_(1, 1) {
|
| #if defined(OS_ANDROID)
|
| if (window)
|
| ANativeWindow_acquire(window);
|
| @@ -454,36 +450,11 @@
|
| "width", GetSize().width(),
|
| "height", GetSize().height());
|
|
|
| -#if defined(OS_WIN)
|
| - bool force_no_vsync = false;
|
| - if (swap_interval_ != 0) {
|
| - // This code is a simple way of enforcing that only one surface actually
|
| - // vsyncs per frame. This provides single window cases a stable refresh
|
| - // while allowing multi-window cases to not slow down due to multiple syncs
|
| - // on a single thread. A better way to fix this problem would be to have
|
| - // each surface present on its own thread.
|
| - if (current_swap_generation_ == swap_generation_) {
|
| - current_swap_generation_++;
|
| - } else {
|
| - force_no_vsync = true;
|
| - eglSwapInterval(GetDisplay(), 0);
|
| - }
|
| -
|
| - swap_generation_ = current_swap_generation_;
|
| - }
|
| -#endif
|
| -
|
| if (!eglSwapBuffers(GetDisplay(), surface_)) {
|
| DVLOG(1) << "eglSwapBuffers failed with error "
|
| << GetLastEGLErrorString();
|
| return false;
|
| }
|
| -
|
| -#if defined(OS_WIN)
|
| - if (force_no_vsync) {
|
| - eglSwapInterval(GetDisplay(), swap_interval_);
|
| - }
|
| -#endif
|
|
|
| return true;
|
| }
|
| @@ -557,10 +528,6 @@
|
|
|
| VSyncProvider* NativeViewGLSurfaceEGL::GetVSyncProvider() {
|
| return vsync_provider_.get();
|
| -}
|
| -
|
| -void NativeViewGLSurfaceEGL::SetSwapInterval(int interval) {
|
| - swap_interval_ = interval;
|
| }
|
|
|
| NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() {
|
|
|