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

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

Issue 2723163002: gpu: Replace more chrome ipc with mojom api. (Closed)
Patch Set: . Created 3 years, 10 months 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/gpu/gpu_process_host.cc ('k') | content/common/gpu_host_messages.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_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 5b47fbad932eeeef7c367c4b486ad33fdcb5ad88..3d83b228460a55f4d9d27007f723c896445e9723 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -46,7 +46,7 @@
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
-#include "content/browser/gpu/gpu_process_host_ui_shim.h"
+#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/media/android/media_web_contents_observer_android.h"
#include "content/browser/renderer_host/compositor_impl_android.h"
#include "content/browser/renderer_host/dip_util.h"
@@ -403,6 +403,14 @@ bool FloatEquals(float a, float b) {
return std::abs(a - b) < FLT_EPSILON;
}
+void WakeUpGpu(GpuProcessHost* host) {
+ DCHECK(host);
+ GpuDataManagerImpl* gpu_data = GpuDataManagerImpl::GetInstance();
+ if (gpu_data &&
+ gpu_data->IsDriverBugWorkaroundActive(gpu::WAKE_UP_GPU_BEFORE_DRAWING))
+ host->gpu_service()->WakeUpGpu();
+}
+
} // namespace
void RenderWidgetHostViewAndroid::OnContextLost() {
@@ -1552,11 +1560,8 @@ InputEventAckState RenderWidgetHostViewAndroid::FilterInputEvent(
if (input_event.type() == blink::WebInputEvent::GestureTapDown ||
input_event.type() == blink::WebInputEvent::TouchStart) {
- GpuDataManagerImpl* gpu_data = GpuDataManagerImpl::GetInstance();
- GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
- if (shim && gpu_data &&
- gpu_data->IsDriverBugWorkaroundActive(gpu::WAKE_UP_GPU_BEFORE_DRAWING))
- shim->Send(new GpuMsg_WakeUpGpu);
+ GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
+ false /* force_create */, base::Bind(&WakeUpGpu));
}
return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/common/gpu_host_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698