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

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

Issue 2802663002: GpuProcessHost: setup ipc to propagate supported GpuMemoryBufferAttribs
Patch Set: check for pending calls, rename get_supported_gpu_memory_buffer_attribs_requests_ Created 3 years, 8 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 | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.h
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index 7b25454b7e93a7f81bccf3933fd9914ca903f770..422ef48a8a55b0abdac29a1887c70debcf461c26 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -87,6 +87,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
base::Callback<void(const gfx::GpuMemoryBufferHandle& handle,
BufferCreationStatus status)>;
+ typedef base::Callback<void(const gfx::GpuMemoryBufferAttribVector&)>
+ GetGpuMemoryBufferAttribsCallback;
static bool gpu_enabled() { return gpu_enabled_; }
static int gpu_crash_count() { return gpu_crash_count_; }
@@ -147,6 +149,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
int client_id,
const gpu::SyncToken& sync_token);
+ void GetGpuMemoryBufferAttribs(
+ const GetGpuMemoryBufferAttribsCallback& callback);
#if defined(OS_ANDROID)
// Tells the GPU process that the given surface is being destroyed so that it
// can stop using it.
@@ -206,7 +210,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
const EstablishChannelCallback& callback,
mojo::ScopedMessagePipeHandle channel_handle);
void OnGpuMemoryBufferCreated(const gfx::GpuMemoryBufferHandle& handle);
-
+ void OnGpuMemoryBufferAttribsReceived(
+ const gfx::GpuMemoryBufferAttribVector& supported_attribs);
// Message handlers.
#if defined(OS_ANDROID)
void OnDestroyingVideoSurfaceAck();
@@ -236,6 +241,10 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
// The pending create gpu memory buffer requests we need to reply to.
std::queue<CreateGpuMemoryBufferCallback> create_gpu_memory_buffer_requests_;
+ // The pending get attribs requests we need to reply to.
+ std::queue<GetGpuMemoryBufferAttribsCallback>
+ get_gpu_memory_buffer_attribs_requests_;
+
// A callback to signal the completion of a SendDestroyingVideoSurface call.
base::Closure send_destroying_video_surface_done_cb_;
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698