Index: content/browser/renderer_host/render_process_host_impl.h |
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h |
index 9175a2c6c0dfa9cb58ad3bd60e59bd9a8347543e..690ccef2b4ee079989385e6a42d7e5441874ac18 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.h |
+++ b/content/browser/renderer_host/render_process_host_impl.h |
@@ -33,6 +33,10 @@ namespace gfx { |
class Size; |
} |
+namespace gpu { |
+class ValueStateMap; |
+} |
+ |
namespace IPC { |
class ChannelMojoHost; |
} |
@@ -140,6 +144,11 @@ class CONTENT_EXPORT RenderProcessHostImpl |
void NotifyTimezoneChange() override; |
ServiceRegistry* GetServiceRegistry() override; |
const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; |
+ bool SubscribeUniformEnabled() const override; |
+ void OnAddSubscription(unsigned int target) override; |
+ void OnRemoveSubscription(unsigned int target) override; |
+ void SendUpdateValueState( |
+ unsigned int target, const gpu::ValueState& state) override; |
// IPC::Sender via RenderProcessHost. |
bool Send(IPC::Message* msg) override; |
@@ -470,6 +479,20 @@ class CONTENT_EXPORT RenderProcessHostImpl |
// Context shared for each PermissionService instance created for this RPH. |
scoped_ptr<PermissionServiceContext> permission_service_context_; |
+ // 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_; |
+ |
+ // Maintains ValueStates which are not currently subscribed too so we can |
+ // pass them to the GpuService if a Valuebuffer ever subscribes to the |
+ // respective subscription target |
+ scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; |
+ |
+ // Whether or not the CHROMIUM_subscribe_uniform WebGL extension is enabled |
+ bool subscribe_uniform_enabled_; |
+ |
base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |