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

Unified Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 780133002: Add optimization for CHROMIUM_subscribe_uniform extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: piman@ review 3 Created 6 years 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
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);
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698