| 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 1b58ae876f545313e9c9ecefa5d407a33e5ebdda..635543659b7ae8bb93310149d5f1c83349fee30a 100644
|
| --- a/content/browser/gpu/gpu_process_host.cc
|
| +++ b/content/browser/gpu/gpu_process_host.cc
|
| @@ -764,6 +764,22 @@ void GpuProcessHost::DeleteImage(int client_id,
|
| Send(new GpuMsg_DeleteImage(client_id, image_id, sync_point));
|
| }
|
|
|
| +void GpuProcessHost::CreateSurfaceTexture(
|
| + int surface_texture_id,
|
| + base::ProcessHandle process_handle,
|
| + const CreateSurfaceTextureCallback& callback) {
|
| + TRACE_EVENT0("gpu", "GpuProcessHost::CreateSurfaceTexture");
|
| +
|
| + DCHECK(CalledOnValidThread());
|
| +
|
| + if (Send(new GpuMsg_CreateSurfaceTexture(surface_texture_id,
|
| + process_handle))) {
|
| + create_surface_texture_requests_.push(callback);
|
| + } else {
|
| + callback.Run();
|
| + }
|
| +}
|
| +
|
| void GpuProcessHost::OnInitialized(bool result, const gpu::GPUInfo& gpu_info) {
|
| UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessInitialized", result);
|
| initialized_ = result;
|
| @@ -837,6 +853,18 @@ void GpuProcessHost::OnImageCreated(const gfx::Size size) {
|
| callback.Run(size);
|
| }
|
|
|
| +void GpuProcessHost::OnSurfaceTextureCreated() {
|
| + TRACE_EVENT0("gpu", "GpuProcessHost::OnSurfaceTextureCreated");
|
| +
|
| + if (create_surface_texture_requests_.empty())
|
| + return;
|
| +
|
| + CreateSurfaceTextureCallback callback =
|
| + create_surface_texture_requests_.front();
|
| + create_surface_texture_requests_.pop();
|
| + callback.Run();
|
| +}
|
| +
|
| void GpuProcessHost::OnDidCreateOffscreenContext(const GURL& url) {
|
| urls_with_live_offscreen_contexts_.insert(url);
|
| }
|
|
|