New issue
Advanced search Search tips

Issue 888122 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature

Blocked on:
issue 883362

Blocking:
issue 839970



Sign in to add a comment

Add tests for low latency canvas mode

Project Member Reported by kbr@chromium.org, Sep 21

Issue description

In  Issue 883362  a bug in the low-latency canvas mode was discovered which should have been caught in regression testing. It's not clear whether this would have been caught by the existing WebGL conformance tests because it happened only in low-latency mode. Some thoughts on potential ways to test this feature:

1. Create a new virtual test suite for the layout tests per https://chromium.googlesource.com/chromium/src/+/master/docs/testing/layout_tests.md#Testing-Runtime-Flags and use a command line flag to force-enable low latency mode. Run layout tests and see whether any existing tests under e.g. fast/canvas would have caught the bug.

2. Use the WebGL conformance suite https://github.com/KhronosGroup/WebGL (which is rolled in to Chromium under src/third_party/webgl/src/ and tested with harnesses under src/content/test/gpu/gpu_tests/) to test this mode. Perhaps also add a command line argument to force-enable low-latency mode (since none of the tests will create canvases in this mode by default), and run the entire suite on a ChromeOS device supporting low latency mode.

Happy to brainstorm other ideas.

 
One of the problems with this bug was that it interacted badly with the mesa extension GL_MESA_framebuffer_flip_y.  The extension hasn't been in a mesa release yet.

My understanding is that mesa isn't fully webgl compliant, so the webgl layout tests are not run on cros.  Maybe there is some subset?

Also need to investigate input for low latency.  I don't know if there is a way to simulate that some way.

How about using go/cros-chameleon? For some subset of the webgl tests.
Cc: dcasta...@chromium.org
frkoenig@, dcastagna@ and I discussed this during xdc 2018 and thought
a possible solution would be to fix the screenshot command on CrOs by 
using the writeback connectors (see Issue 880597#c10), and then use it
to wire a number of graphics tast/autotest checking at least the usual
drawing. If option 2. uses pixel reference(s) would it make sense to use
the screenshot command with it?
Sorry for very slow reply.

The WebGL conformance suite right now uses only public web APIs by definition, so it can't see the screen's contents.

However, the Chrome GPU team's pixel integration tests, for example:
https://cs.chromium.org/chromium/src/content/test/gpu/gpu_tests/pixel_integration_test.py?q=pixel_integration_&sq=package:chromium&g=0&l=1

do use screenshot-level functionality.

It would be fantastic to modify the code in https://cs.chromium.org/chromium/src/ui/snapshot/ to use direct screen readback on ChromeOS devices where possible, and get those pixel tests running in that mode on the CroS waterfalls.

We should also investigate wiring content_shell's CapturePixelsAsyncThen primitive:
https://cs.chromium.org/chromium/src/content/shell/test_runner/test_runner_for_specific_view.cc?type=cs&q=capturePixelsAsyncThen&sq=package:chromium&g=0&l=230

to the same thing, and getting the layout tests running on CrOS in this mode.

In terms of impact and breadth of the test suite, the layout tests should take priority. I'm personally more familiar with the code in gpu_tests/ and can help more directly there.

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 6

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

commit 9ed55271b64073856b620869ee3c4926d80bf456
Author: Miguel Casas <mcasas@chromium.org>
Date: Sat Oct 06 00:41:06 2018

canvas test: Extract MockEmbeddedFrameSinkProvider onto a new file

This CL follows up on comments on crrev.com/c/1238798 and
splits MockEmbeddedFrameSinkProvider onto a file on its own.
It also adds a member to be passed to MockCompositorFrameSink
to signal the expected number of calls to SetNeedsBeginFrame.

Bug: 888122
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iceb35a215c6a4b34b152d2d1be077ef2c14e0234
Reviewed-on: https://chromium-review.googlesource.com/c/1248627
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597382}
[modify] https://crrev.com/9ed55271b64073856b620869ee3c4926d80bf456/third_party/blink/renderer/modules/canvas/htmlcanvas/html_canvas_element_module_test.cc
[modify] https://crrev.com/9ed55271b64073856b620869ee3c4926d80bf456/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_test.cc
[modify] https://crrev.com/9ed55271b64073856b620869ee3c4926d80bf456/third_party/blink/renderer/platform/BUILD.gn
[modify] https://crrev.com/9ed55271b64073856b620869ee3c4926d80bf456/third_party/blink/renderer/platform/graphics/canvas_resource_dispatcher_test.cc
[modify] https://crrev.com/9ed55271b64073856b620869ee3c4926d80bf456/third_party/blink/renderer/platform/graphics/test/mock_compositor_frame_sink.h
[add] https://crrev.com/9ed55271b64073856b620869ee3c4926d80bf456/third_party/blink/renderer/platform/graphics/test/mock_embedded_frame_sink_provider.h

Labels: -Pri-1 Pri-2
[GPU Triage Council]

Sign in to add a comment