| Index: content/browser/renderer_host/image_transport_factory_android.cc
|
| diff --git a/content/browser/renderer_host/image_transport_factory_android.cc b/content/browser/renderer_host/image_transport_factory_android.cc
|
| index 7299656b5e86130245d2c02a26b8d4671a8f40b5..e8db509d00b1de97f6d752d4f6d130fc1f64cc09 100644
|
| --- a/content/browser/renderer_host/image_transport_factory_android.cc
|
| +++ b/content/browser/renderer_host/image_transport_factory_android.cc
|
| @@ -8,6 +8,7 @@
|
| #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
|
| #include "content/common/gpu/gpu_process_launch_causes.h"
|
| #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
|
| +#include "third_party/khronos/GLES2/gl2.h"
|
|
|
| using content::BrowserGpuChannelHostFactory;
|
|
|
| @@ -48,11 +49,6 @@ gfx::GLSurfaceHandle ImageTransportFactoryAndroid::CreateSharedSurfaceHandle() {
|
| gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle(
|
| gfx::kNullPluginWindow, true);
|
| handle.parent_gpu_process_id = context_->GetGPUProcessID();
|
| - handle.parent_client_id = context_->GetChannelID();
|
| - handle.parent_context_id = context_->GetContextID();
|
| - handle.parent_texture_id[0] = context_->createTexture();
|
| - handle.parent_texture_id[1] = context_->createTexture();
|
| - handle.sync_point = context_->insertSyncPoint();
|
| context_->flush();
|
| return handle;
|
| }
|
| @@ -63,16 +59,32 @@ void ImageTransportFactoryAndroid::DestroySharedSurfaceHandle(
|
| NOTREACHED() << "Failed to make shared graphics context current";
|
| return;
|
| }
|
| -
|
| - context_->deleteTexture(handle.parent_texture_id[0]);
|
| - context_->deleteTexture(handle.parent_texture_id[1]);
|
| - context_->finish();
|
| }
|
|
|
| uint32_t ImageTransportFactoryAndroid::InsertSyncPoint() {
|
| return context_->insertSyncPoint();
|
| }
|
|
|
| +uint32_t ImageTransportFactoryAndroid::CreateTexture() {
|
| + return context_->createTexture();
|
| +}
|
| +
|
| +void ImageTransportFactoryAndroid::DeleteTexture(uint32_t id) {
|
| + context_->deleteTexture(id);
|
| +}
|
| +
|
| +void ImageTransportFactoryAndroid::AcquireTexture(
|
| + uint32 texture_id, const signed char* mailbox_name) {
|
| + context_->bindTexture(GL_TEXTURE_2D, texture_id);
|
| + context_->consumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox_name);
|
| +}
|
| +
|
| +void ImageTransportFactoryAndroid::ReleaseTexture(
|
| + uint32 texture_id, const signed char* mailbox_name) {
|
| + context_->bindTexture(GL_TEXTURE_2D, texture_id);
|
| + context_->produceTextureCHROMIUM(GL_TEXTURE_2D, mailbox_name);
|
| +}
|
| +
|
| WebGraphicsContext3DCommandBufferImpl*
|
| ImageTransportFactoryAndroid::GetContext3D() {
|
| return context_.get();
|
|
|