diff options
author | skyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-08 13:19:37 +0000 |
---|---|---|
committer | skyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-08 13:19:37 +0000 |
commit | 19d18782a9aad77ff72e8a0d083b874894e51741 (patch) | |
tree | 1e3a3e843750fd1ae2eef077f9d1d8897d68d11b /content/port | |
parent | d9de7c05800a6ade7829d17f09577ef5cbd820a6 (diff) | |
download | chromium_src-19d18782a9aad77ff72e8a0d083b874894e51741.zip chromium_src-19d18782a9aad77ff72e8a0d083b874894e51741.tar.gz chromium_src-19d18782a9aad77ff72e8a0d083b874894e51741.tar.bz2 |
Warm up the GPU when the user touches the screen
Some devices perform very aggressive GPU power management. This is good
for battery life, but can lead long delays when the GPU is woken up
after having been idle. As an example, on Nexus 4 the additional delay
from spinning up the GPU is on the order of 10 ms. This can easily cause
us to miss the next vsync when responding to an input event.
This patch adds a mechanism for GPU process clients to notify ahead
of time that they are likely to draw very soon and the GPU should be
warmed up. We drive this signal with the TapDown gesture, which is sent
whenever the user starts touching the display. This fits well to the
common scrolling scenario where the TapDown is sent several tens of
milliseconds before the first ScrollBy event that actually causes
rendering.
BUG=309734
Review URL: https://codereview.chromium.org/49623002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233889 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/port')
-rw-r--r-- | content/port/browser/render_widget_host_view_port.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/content/port/browser/render_widget_host_view_port.h b/content/port/browser/render_widget_host_view_port.h index 3360bfc..13f3766 100644 --- a/content/port/browser/render_widget_host_view_port.h +++ b/content/port/browser/render_widget_host_view_port.h @@ -212,6 +212,8 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView, // Called when accelerated compositing state changes. virtual void OnAcceleratedCompositingStateChange() = 0; + // Called when an accelerated compositing surface is initialized. + virtual void AcceleratedSurfaceInitialized(int host_id, int route_id) = 0; // |params.window| and |params.surface_id| indicate which accelerated // surface's buffers swapped. |params.renderer_id| and |params.route_id| // are used to formulate a reply to the GPU process to prevent it from getting |