| Index: content/browser/gpu/gpu_process_host.cc
|
| diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
| index c6aec18302f4f036fbbc2b412eeaa32bdff6d26d..46fcb25795130cf9f43ae14710c0b348e45dfb50 100644
|
| --- a/content/browser/gpu/gpu_process_host.cc
|
| +++ b/content/browser/gpu/gpu_process_host.cc
|
| @@ -607,6 +607,7 @@ bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {
|
| OnDestroyChannel)
|
| IPC_MESSAGE_HANDLER(GpuHostMsg_CacheShader,
|
| OnCacheShader)
|
| + IPC_MESSAGE_HANDLER(GpuHostMsg_StreamTextureCreated, OnStreamTextureCreated)
|
|
|
| IPC_MESSAGE_UNHANDLED(RouteOnUIThread(message))
|
| IPC_END_MESSAGE_MAP()
|
| @@ -682,6 +683,19 @@ void GpuProcessHost::CreateViewCommandBuffer(
|
| }
|
| }
|
|
|
| +void GpuProcessHost::CreateStreamTexture(
|
| + int32 image_id,
|
| + int client_id,
|
| + int32 route_id,
|
| + int32 stream_id,
|
| + const CreateStreamTextureCallback& callback) {
|
| + TRACE_EVENT0("gpu", "GpuProcessHost::CreateStreamTexture");
|
| + DCHECK(CalledOnValidThread());
|
| + Send(
|
| + new GpuMsg_CreateStreamTexture(image_id, client_id, route_id, stream_id));
|
| + create_stream_texture_requests_.push(callback);
|
| +}
|
| +
|
| void GpuProcessHost::CreateGpuMemoryBuffer(
|
| gfx::GpuMemoryBufferId id,
|
| const gfx::Size& size,
|
| @@ -779,6 +793,15 @@ void GpuProcessHost::OnCommandBufferCreated(CreateCommandBufferResult result) {
|
| callback.Run(result);
|
| }
|
|
|
| +void GpuProcessHost::OnStreamTextureCreated(bool result) {
|
| + if (create_stream_texture_requests_.empty())
|
| + return;
|
| + CreateStreamTextureCallback callback =
|
| + create_stream_texture_requests_.front();
|
| + create_stream_texture_requests_.pop();
|
| + callback.Run(result);
|
| +}
|
| +
|
| void GpuProcessHost::OnDestroyCommandBuffer(int32 surface_id) {
|
| TRACE_EVENT0("gpu", "GpuProcessHost::OnDestroyCommandBuffer");
|
| SurfaceRefMap::iterator it = surface_refs_.find(surface_id);
|
|
|