diff options
author | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 21:37:35 +0000 |
---|---|---|
committer | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 21:37:35 +0000 |
commit | db7e6b76197244048659657514eacefe84cf684f (patch) | |
tree | d5eabc1656a39350ba5b9db53d692fdb9b35d4a2 | |
parent | 5fb71458b3318853e862ab417cdb9d4c3f373e2f (diff) | |
download | chromium_src-db7e6b76197244048659657514eacefe84cf684f.zip chromium_src-db7e6b76197244048659657514eacefe84cf684f.tar.gz chromium_src-db7e6b76197244048659657514eacefe84cf684f.tar.bz2 |
Extend virtual context MakeCurrent fastpath to offscreen surfaces.
Similar to transport surfaces with an explicit fbo backing,
we can avoid the call into the driver to make the surface current
since the command decoder guarantess an fbo backing for offscreen
surfaces.
On Android, this specifically affects canvas contexts and the helper
context used on the UI thread for mailbox texture exchange.
BUG=160710
Review URL: https://chromiumcodereview.appspot.com/11537014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172410 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | gpu/command_buffer/service/gl_context_virtual.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc index 4632650..63550d6 100644 --- a/gpu/command_buffer/service/gl_context_virtual.cc +++ b/gpu/command_buffer/service/gl_context_virtual.cc @@ -66,6 +66,7 @@ bool GLContextVirtual::IsCurrent(gfx::GLSurface* surface) { gfx::GLSurface* current_surface = gfx::GLSurface::GetCurrent(); return surface->GetBackingFrameBufferObject() || + surface->IsOffscreen() || (current_surface && current_surface->GetHandle() == surface->GetHandle()); } |