| 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 145cdcccc2b9c16bfcb637e445f0cc141b1b7360..20da8cee9a6b953811af2f71e41597cca6d68eaf 100644
|
| --- a/content/browser/gpu/gpu_process_host.h
|
| +++ b/content/browser/gpu/gpu_process_host.h
|
| @@ -23,6 +23,7 @@
|
| #include "content/public/browser/browser_child_process_host_delegate.h"
|
| #include "content/public/browser/gpu_data_manager.h"
|
| #include "gpu/command_buffer/common/constants.h"
|
| +#include "gpu/command_buffer/common/value_state.h"
|
| #include "gpu/config/gpu_info.h"
|
| #include "ipc/ipc_sender.h"
|
| #include "ipc/message_filter.h"
|
| @@ -86,6 +87,9 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| CauseForGpuLaunch cause,
|
| IPC::Message* message);
|
|
|
| + CONTENT_EXPORT static void SendUpdateValueStateOnIOThread(
|
| + int client_id, unsigned int target, const gpu::ValueState& state);
|
| +
|
| CONTENT_EXPORT static void RegisterGpuMainThreadFactory(
|
| GpuMainThreadFactoryFunction create);
|
|
|
| @@ -142,6 +146,10 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| void EndFrameSubscription(int surface_id);
|
| void LoadedShader(const std::string& key, const std::string& data);
|
|
|
| + void SendUpdateValueState(int client_id,
|
| + unsigned int target,
|
| + const gpu::ValueState& state);
|
| +
|
| private:
|
| static bool ValidateHost(GpuProcessHost* host);
|
|
|
| @@ -179,6 +187,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| void OnDestroyChannel(int32 client_id);
|
| void OnCacheShader(int32 client_id, const std::string& key,
|
| const std::string& shader);
|
| + void OnAddSubscription(unsigned int target);
|
| + void OnRemoveSubscription(unsigned int target);
|
|
|
| bool LaunchGpuProcess(const std::string& channel_id);
|
|
|
| @@ -276,6 +286,12 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| SurfaceRefMap;
|
| SurfaceRefMap surface_refs_;
|
|
|
| + // This is a set of all subscription targets valuebuffers in the GPU process
|
| + // are currently subscribed too. Used to prevent sending unnecessary
|
| + // ValueState updates.
|
| + typedef base::hash_set<unsigned int> SubscriptionSet;
|
| + SubscriptionSet subscription_set_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
|
| };
|
|
|
|
|