Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 213493002: content: Add multi-proc surface texture support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698