Chromium Code Reviews| Index: gpu/command_buffer/service/gl_context_virtual.cc |
| diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc |
| index 2582d00a754fc193d6cf1bb48e3c6aaad8217e73..51cc84fb2e969f57c75efa421067e7e032fba221 100644 |
| --- a/gpu/command_buffer/service/gl_context_virtual.cc |
| +++ b/gpu/command_buffer/service/gl_context_virtual.cc |
| @@ -51,10 +51,12 @@ bool GLContextVirtual::IsCurrent(gl::GLSurface* surface) { |
| // If it's a real surface it needs to be current. |
| if (surface && |
| !surface->IsOffscreen()) |
| - return shared_context_->IsCurrent(surface); |
| + return shared_context_->IsCurrent(surface) && |
| + shared_context_->current_virtual_context_ == this; |
| // Otherwise, only insure the context itself is current. |
| - return shared_context_->IsCurrent(NULL); |
| + return shared_context_->IsCurrent(NULL) && |
| + shared_context_->current_virtual_context_ == this; |
|
piman
2017/05/03 19:47:41
One feature of this code is to avoid calling eglMa
Zhenyao Mo
2017/05/03 22:21:34
Thanks for pointing this out, although this design
|
| } |
| void* GLContextVirtual::GetHandle() { |