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

Unified Diff: content/gpu/gpu_child_thread.h

Issue 1711533002: Decouple browser-specific GPU IPC messages from GPU service IPCs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restored if guards on GpuChannelManager Created 4 years, 10 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/content_common.gypi ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.h
diff --git a/content/gpu/gpu_child_thread.h b/content/gpu/gpu_child_thread.h
index b83ff794e7bf353014a5049bd6f41212ee8da36b..c279c5f2a7caf07b97d5c45f40ae3749cc0c5325 100644
--- a/content/gpu/gpu_child_thread.h
+++ b/content/gpu/gpu_child_thread.h
@@ -19,6 +19,7 @@
#include "content/child/child_thread_impl.h"
#include "content/common/gpu/gpu_channel.h"
#include "content/common/gpu/gpu_channel_manager.h"
+#include "content/common/gpu/gpu_channel_manager_delegate.h"
#include "content/common/gpu/gpu_config.h"
#include "content/common/gpu/x_util.h"
#include "content/common/process_control.mojom.h"
@@ -44,7 +45,8 @@ class GpuWatchdogThread;
// these per process. It does process initialization and shutdown. It forwards
// IPC messages to GpuChannelManager, which is responsible for issuing rendering
// commands to the GPU.
-class GpuChildThread : public ChildThreadImpl {
+class GpuChildThread : public ChildThreadImpl,
+ public GpuChannelManagerDelegate {
public:
typedef std::queue<IPC::Message*> DeferredMessages;
@@ -72,6 +74,30 @@ class GpuChildThread : public ChildThreadImpl {
bool OnMessageReceived(const IPC::Message& msg) override;
private:
+ // GpuChannelManagerDelegate implementation.
+ void AddSubscription(int32_t client_id, unsigned int target) override;
+ void ChannelEstablished(const IPC::ChannelHandle& channel_handle) override;
+ void DidCreateOffscreenContext(const GURL& active_url) override;
+ void DidDestroyChannel(int client_id) override;
+ void DidDestroyOffscreenContext(const GURL& active_url) override;
+ void DidLoseContext(bool offscreen,
+ gpu::error::ContextLostReason reason,
+ const GURL& active_url) override;
+ void GpuMemoryUmaStats(const GPUMemoryUmaStats& params) override;
+ void RemoveSubscription(int32_t client_id, unsigned int target) override;
+#if defined(OS_MACOSX)
+ void SendAcceleratedSurfaceBuffersSwapped(
+ const AcceleratedSurfaceBuffersSwappedParams& params) override;
+#endif
+#if defined(OS_WIN)
+ void SendAcceleratedSurfaceCreatedChildWindow(
+ const gfx::PluginWindowHandle& parent_window,
+ const gfx::PluginWindowHandle& child_window) override;
+#endif
+ void StoreShaderToDisk(int32_t client_id,
+ const std::string& key,
+ const std::string& shader) override;
+
// Message handlers.
void OnInitialize();
void OnFinalize();
@@ -85,6 +111,23 @@ class GpuChildThread : public ChildThreadImpl {
void OnDisableWatchdog();
void OnGpuSwitched();
+#if defined(OS_MACOSX)
+ void OnBufferPresented(const BufferPresentedParams& params);
+#endif
+ void OnEstablishChannel(const EstablishChannelParams& params);
+ void OnCloseChannel(const IPC::ChannelHandle& channel_handle);
+ void OnLoadedShader(const std::string& shader);
+ void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
+ int client_id,
+ const gpu::SyncToken& sync_token);
+ void OnUpdateValueState(int client_id,
+ unsigned int target,
+ const gpu::ValueState& state);
+#if defined(OS_ANDROID)
+ void OnWakeUpGpu();
+#endif
+ void OnLoseAllContexts();
+
void BindProcessControlRequest(
mojo::InterfaceRequest<ProcessControl> request);
« no previous file with comments | « content/content_common.gypi ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698