cr run headless_shell --screenshot http://example.com either hangs or produces a completely black screenshot of the right size. So far it looks like the browser compositor isn't compositing the latest frame from the renderer for some reason.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f commit f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f Author: eseckler <eseckler@chromium.org> Date: Thu Jan 19 10:13:30 2017 [headless] Fix screenshots with gpu enabled. Turns out this is due to two things: 1) We were overriding ShouldCreateCompositorFrameSink in the browser compositor to always return false (which is unnecessary). 2) Contrary to what GpuBrowserCompositorOutputSurface and SoftwareBrowserCompositorOutputSurface do, the OffscreenBrowserCompositorOutputSurface wasn't letting the RWHI know about swapped frames. This fixes both issues. BUG= 681614 Review-Url: https://codereview.chromium.org/2631263003 Cr-Commit-Position: refs/heads/master@{#444694} [modify] https://crrev.com/f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f/content/browser/compositor/gpu_process_transport_factory.cc [modify] https://crrev.com/f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f/content/browser/compositor/offscreen_browser_compositor_output_surface.cc [modify] https://crrev.com/f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f/content/browser/compositor/offscreen_browser_compositor_output_surface.h [modify] https://crrev.com/f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f/headless/BUILD.gn [add] https://crrev.com/f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f/headless/lib/DEPS [modify] https://crrev.com/f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f/headless/lib/headless_web_contents_browsertest.cc [modify] https://crrev.com/f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f/headless/test/headless_browser_test.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5466789f07c47118956eaca0a9baf4f35b02737b commit 5466789f07c47118956eaca0a9baf4f35b02737b Author: mkwst <mkwst@chromium.org> Date: Thu Jan 19 13:38:22 2017 Revert of [headless] Fix screenshots with gpu enabled. (patchset #5 id:100001 of https://codereview.chromium.org/2631263003/ ) Reason for revert: HeadlessWebContentsSecurityTest.RunAsyncTest is failing: https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests/builds/51027/steps/headless_browsertests/logs/HeadlessWebContentsSecurityTest.RunAsyncTest Started in https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests/builds/51027/. This is the only patch in the build that touches headless, so... BUG= 682670 Original issue's description: > [headless] Fix screenshots with gpu enabled. > > Turns out this is due to two things: > 1) We were overriding ShouldCreateCompositorFrameSink in the browser > compositor to always return false (which is unnecessary). > 2) Contrary to what GpuBrowserCompositorOutputSurface and > SoftwareBrowserCompositorOutputSurface do, the > OffscreenBrowserCompositorOutputSurface wasn't letting the RWHI know > about swapped frames. > > This fixes both issues. > > BUG= 681614 > > Review-Url: https://codereview.chromium.org/2631263003 > Cr-Commit-Position: refs/heads/master@{#444694} > Committed: https://chromium.googlesource.com/chromium/src/+/f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f TBR=skyostil@chromium.org,jbauman@chromium.org,bsalomon@google.com,eseckler@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 681614 Review-Url: https://codereview.chromium.org/2641073004 Cr-Commit-Position: refs/heads/master@{#444720} [modify] https://crrev.com/5466789f07c47118956eaca0a9baf4f35b02737b/content/browser/compositor/gpu_process_transport_factory.cc [modify] https://crrev.com/5466789f07c47118956eaca0a9baf4f35b02737b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc [modify] https://crrev.com/5466789f07c47118956eaca0a9baf4f35b02737b/content/browser/compositor/offscreen_browser_compositor_output_surface.h [modify] https://crrev.com/5466789f07c47118956eaca0a9baf4f35b02737b/headless/BUILD.gn [delete] https://crrev.com/cf2df2fe7c69089d5e6f23863eb41afb3cf7c5c2/headless/lib/DEPS [modify] https://crrev.com/5466789f07c47118956eaca0a9baf4f35b02737b/headless/lib/headless_web_contents_browsertest.cc [modify] https://crrev.com/5466789f07c47118956eaca0a9baf4f35b02737b/headless/test/headless_browser_test.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d2869ffcce7a030d6cceabb6f52d3c67f897e06a commit d2869ffcce7a030d6cceabb6f52d3c67f897e06a Author: eseckler <eseckler@chromium.org> Date: Thu Jan 19 14:46:21 2017 [headless] Fix screenshots with gpu enabled. Turns out this is due to two things: 1) We were overriding ShouldCreateCompositorFrameSink in the browser compositor to always return false (which is unnecessary). 2) Contrary to what GpuBrowserCompositorOutputSurface and SoftwareBrowserCompositorOutputSurface do, the OffscreenBrowserCompositorOutputSurface wasn't letting the RWHI know about swapped frames. This fixes both issues. BUG= 681614 Review-Url: https://codereview.chromium.org/2631263003 Cr-Original-Commit-Position: refs/heads/master@{#444694} Committed: https://chromium.googlesource.com/chromium/src/+/f5077ffe4f7a3d8c053e8bd8b2070bc699ca937f Review-Url: https://codereview.chromium.org/2631263003 Cr-Commit-Position: refs/heads/master@{#444730} [modify] https://crrev.com/d2869ffcce7a030d6cceabb6f52d3c67f897e06a/content/browser/compositor/gpu_process_transport_factory.cc [modify] https://crrev.com/d2869ffcce7a030d6cceabb6f52d3c67f897e06a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc [modify] https://crrev.com/d2869ffcce7a030d6cceabb6f52d3c67f897e06a/content/browser/compositor/offscreen_browser_compositor_output_surface.h [modify] https://crrev.com/d2869ffcce7a030d6cceabb6f52d3c67f897e06a/headless/BUILD.gn [add] https://crrev.com/d2869ffcce7a030d6cceabb6f52d3c67f897e06a/headless/lib/DEPS [modify] https://crrev.com/d2869ffcce7a030d6cceabb6f52d3c67f897e06a/headless/lib/headless_web_contents_browsertest.cc [modify] https://crrev.com/d2869ffcce7a030d6cceabb6f52d3c67f897e06a/headless/test/headless_browser_test.h
Issue chromedriver:1563 has been merged into this issue.
Comment 1 by bugdroid1@chromium.org
, Jan 19 2017