| Index: ui/gl/gl_context_egl.cc
|
| diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc
|
| index 5dd1aaf58ce88ceed3c1a0ef61c2a8116f6488c9..076de98635788463d1bbf08f9bd6a8596cc65449 100644
|
| --- a/ui/gl/gl_context_egl.cc
|
| +++ b/ui/gl/gl_context_egl.cc
|
| @@ -29,7 +29,8 @@ GLContextEGL::GLContextEGL(GLShareGroup* share_group)
|
| context_(NULL),
|
| display_(NULL),
|
| config_(NULL),
|
| - unbind_fbo_on_makecurrent_(false) {
|
| + unbind_fbo_on_makecurrent_(false),
|
| + swap_interval_(1) {
|
| }
|
|
|
| bool GLContextEGL::Initialize(
|
| @@ -125,6 +126,8 @@ bool GLContextEGL::MakeCurrent(GLSurface* surface) {
|
| return false;
|
| }
|
|
|
| + surface->OnSetSwapInterval(swap_interval_);
|
| +
|
| release_current.Cancel();
|
| return true;
|
| }
|
| @@ -183,6 +186,9 @@ void GLContextEGL::OnSetSwapInterval(int interval) {
|
| if (!eglSwapInterval(display_, interval)) {
|
| LOG(ERROR) << "eglSwapInterval failed with error "
|
| << GetLastEGLErrorString();
|
| + } else {
|
| + swap_interval_ = interval;
|
| + GLSurface::GetCurrent()->OnSetSwapInterval(interval);
|
| }
|
| }
|
|
|
|
|