New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 616973 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

OutputSurface is using ThreadTaskRunnerHandle to post tasks

Project Member Reported by danakj@chromium.org, Jun 3 2016

Issue description

The compositor has a TaskRunner that is not from the MessageLoop to pump things specially during resize.

However some parts of OutputSurface implementations are using ThreadTaskRunnerHandle::Get() to post tasks, instead of the compositor's TaskRunner, which bypasses this.

Places include:
SoftwareBrowserCompositorOutputSurface::SwapBuffers
OutputSurface::PostSwapBuffersComplete

So if the message loop is blocked, we won't hear about the swap being done, and we will throttle new frames, making things bad.

This probably will affect a lot more users when we make resizing better on windows.
 
Cc: piman@chromium.org
Should basically be a matter of plumbing the task runner in, either from the creator of the OutputSurface, or from the compositor when it BindToClient or something.
After this is fixed, we shouldn't need a MessageLoop in the SoftwareBrowserCompositorOutputSurfaceTest tests anymore.
Components: Internals>Compositing
If no one has started, i can work on it?
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/daad1d10fb3932de760bdc3688e96c947d3c7b18

commit daad1d10fb3932de760bdc3688e96c947d3c7b18
Author: danakj <danakj@chromium.org>
Date: Tue Oct 11 00:00:34 2016

cc: Get rid of PostSwapBuffersComplete.

OutputSurface and CompositorFrameSink both have this method which is
not part of the interface but used to post a call to the client's
DidSwapBuffersComplete to the current ThreadTaskRunnerHandle. This is
problematic since that is *not* the compositor task runner which can
be overridden, and it clutters these base class APIs.

This moves the calls to the client DidSwapBuffersComplete() out to each
implementation of OutputSurface or CompositorFrameSink.

Some additional changes in the process:

- BrowserCompositorOutputSurface had OnGpuSwapBuffersCompleted but it
was only used for gpu cases, so moved to GpuBrowserCompositorOutputSurface
and remove the NOTREACHED() version in
SoftwareBrowserCompositorOutputSurface.

- Blimp was not using the draw callback to provide backpressure for
submitted CompositorFrames, and just posting immediately, so hook that
up instead of doing a simple post-task dance there.

- SoftwareBrowserCompositorOutputSurface was using ThreadTaskRunnerHandle
to make another post task too but it should be using the compositor's
task runner. Since it now has it, use that.

R=enne@chromium.org, khushalsagar@chromium.org
BUG= 616973 , 606056 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2402173002
Cr-Commit-Position: refs/heads/master@{#424294}

[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/blimp/client/core/compositor/blimp_compositor.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/blimp/client/core/compositor/blimp_compositor.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/blimp/client/core/compositor/blimp_compositor_frame_sink.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/blimp/client/core/compositor/blimp_compositor_frame_sink.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/blimp/client/core/compositor/blimp_compositor_frame_sink_proxy.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/blimp/client/core/compositor/blimp_compositor_frame_sink_unittest.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/blimp/client/support/compositor/blimp_embedder_compositor.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/output/compositor_frame_sink.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/output/compositor_frame_sink.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/output/output_surface.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/output/output_surface.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/surfaces/direct_compositor_frame_sink.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/test/fake_compositor_frame_sink.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/test/fake_compositor_frame_sink.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/test/fake_output_surface.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/test/fake_output_surface.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/test/layer_tree_test.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/test/pixel_test_output_surface.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/test/pixel_test_output_surface.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/test/test_compositor_frame_sink.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/cc/test/test_compositor_frame_sink.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/browser_compositor_output_surface.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/gpu_browser_compositor_output_surface.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/gpu_browser_compositor_output_surface.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/gpu_process_transport_factory.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/offscreen_browser_compositor_output_surface.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/reflector_impl_unittest.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/software_browser_compositor_output_surface.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/software_browser_compositor_output_surface.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/software_browser_compositor_output_surface_unittest.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/vulkan_browser_compositor_output_surface.cc
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/compositor/vulkan_browser_compositor_output_surface.h
[modify] https://crrev.com/daad1d10fb3932de760bdc3688e96c947d3c7b18/content/browser/renderer_host/compositor_impl_android.cc

Comment 7 by danakj@chromium.org, Oct 11 2016

Status: Fixed (was: Untriaged)

Sign in to add a comment