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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 780133002: Add optimization for CHROMIUM_subscribe_uniform extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: piman@ review 2 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 54e59de423ca3e3298a7c2fa40f772112b07bc2d..6e248e6e648a0bdd541fc451f910448fe62bdbdc 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -183,7 +183,6 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
pending_mouse_lock_request_(false),
allow_privileged_mouse_lock_(false),
has_touch_handler_(false),
- subscribe_uniform_enabled_(false),
next_browser_snapshot_id_(1),
weak_factory_(this) {
CHECK(delegate_);
@@ -233,10 +232,6 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
base::Bind(&RenderWidgetHostImpl::RendererIsUnresponsive,
weak_factory_.GetWeakPtr())));
}
-
- subscribe_uniform_enabled_ =
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableSubscribeUniformExtension);
}
RenderWidgetHostImpl::~RenderWidgetHostImpl() {
@@ -902,17 +897,11 @@ void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(
// Pass mouse state to gpu service if the subscribe uniform
// extension is enabled.
- // TODO(orglofch): Only pass mouse information if one of the GL Contexts
- // is subscribed to GL_MOUSE_POSITION_CHROMIUM
- if (subscribe_uniform_enabled_) {
+ if (process_->SubscribeUniformEnabled()) {
gpu::ValueState state;
state.int_value[0] = mouse_event.x;
state.int_value[1] = mouse_event.y;
- GpuProcessHost::SendOnIO(
- GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
- CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
- new GpuMsg_UpdateValueState(
- process_->GetID(), GL_MOUSE_POSITION_CHROMIUM, state));
+ process_->SendUpdateValueState(GL_MOUSE_POSITION_CHROMIUM, state);
piman 2014/12/12 01:47:38 So, you still have the problem that the RPH receiv
orglofch 2014/12/12 02:17:58 I guess I'm missing an understanding of what a RW
piman 2014/12/12 02:41:40 a RW is the contents of a tab. You can have severa
orglofch 2014/12/12 02:58:55 Ok I see what you're saying, I was confused becaus
}
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698