| 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 344032a75a8f43b2137907f525dbea883cdd3a7c..f3f10e33a64b00c278f2b21c3c75c7702a02a311 100644
|
| --- a/content/browser/renderer_host/render_widget_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
| @@ -60,6 +60,7 @@
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/common/result_codes.h"
|
| #include "content/public/common/web_preferences.h"
|
| +#include "gpu/command_buffer/service/gpu_switches.h"
|
| #include "skia/ext/image_operations.h"
|
| #include "skia/ext/platform_canvas.h"
|
| #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
|
| @@ -186,6 +187,7 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
|
| allow_privileged_mouse_lock_(false),
|
| has_touch_handler_(false),
|
| last_input_number_(static_cast<int64>(GetProcess()->GetID()) << 32),
|
| + subscribe_uniform_enabled_(false),
|
| next_browser_snapshot_id_(1),
|
| browser_composite_latency_history_(kBrowserCompositeLatencyHistorySize),
|
| weak_factory_(this) {
|
| @@ -234,6 +236,10 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
|
| base::Bind(&RenderWidgetHostImpl::RendererIsUnresponsive,
|
| weak_factory_.GetWeakPtr())));
|
| }
|
| +
|
| + subscribe_uniform_enabled_ =
|
| + base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableSubscribeUniformExtension);
|
| }
|
|
|
| RenderWidgetHostImpl::~RenderWidgetHostImpl() {
|
| @@ -899,6 +905,19 @@ void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(
|
|
|
| input_router_->SendMouseEvent(MouseEventWithLatencyInfo(mouse_event,
|
| latency_info));
|
| +
|
| + // Pass mouse state to gpu service if the subscribe uniform
|
| + // extension is enabled.
|
| + if (subscribe_uniform_enabled_) {
|
| + 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));
|
| + }
|
| }
|
|
|
| void RenderWidgetHostImpl::OnPointerEventActivate() {
|
|
|