Skip to content

Commit

Permalink
Implement client side PBOs for glReadPixel
Browse files Browse the repository at this point in the history
Use PBOs in gl_helper
swizzle bytes on gpu
flip vertically on gpu
remove gl_helper_thread

Implements GLHelper::CropScaleReadbackAndCleanTexture() to be non-blocking in the client by using shared memory combined with a query (not requiring actual GL PBO support, which would not be available on Android). 


Review URL: https://chromiumcodereview.appspot.com/12892005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191737 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
hubbe@chromium.org committed Apr 2, 2013
1 parent 3111489 commit de43f08
Show file tree
Hide file tree
Showing 13 changed files with 377 additions and 291 deletions.
10 changes: 2 additions & 8 deletions content/browser/renderer_host/image_transport_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,9 @@ class GpuProcessTransportFactory
virtual GLHelper* GetGLHelper() OVERRIDE {
if (!gl_helper_.get()) {
CreateSharedContextLazy();
WebKit::WebGraphicsContext3D* context_for_main_thread =
WebGraphicsContext3DCommandBufferImpl* context_for_main_thread =
shared_contexts_main_thread_->Context3d();
WebKit::WebGraphicsContext3D* context_for_thread =
CreateOffscreenContext();
if (!context_for_thread)
return NULL;

gl_helper_.reset(new GLHelper(context_for_main_thread,
context_for_thread));
gl_helper_.reset(new GLHelper(context_for_main_thread));
}
return gl_helper_.get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void CmdBufferImageTransportFactory::ReleaseTexture(

GLHelper* CmdBufferImageTransportFactory::GetGLHelper() {
if (!gl_helper_.get())
gl_helper_.reset(new GLHelper(GetContext3D(), NULL));
gl_helper_.reset(new GLHelper(context_.get()));

return gl_helper_.get();
}
Expand Down
Loading

0 comments on commit de43f08

Please sign in to comment.