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

Issue 867025 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocking:
issue 839970
issue 868596



Sign in to add a comment

WebGL lowlatency canvas on CrOs doesn't show up on the screen

Project Member Reported by mcasas@chromium.org, Jul 24

Issue description

Steps to repro:

Compile and run a ToT (r577574) simplechrome on nautilus (or eve), with chrome:flags
  enable-experimental-web-platform-features
set to "enabled"

Navigate to https://codepen.io/miguelao/pen/ejdRQX
which essentially does:

  var ctx = canvas.getContext('webgl', {lowLatency: true});
  function draw_stuff() {
    ctx.clearColor(0, Math.random(), 0, 1.0);
    ctx.clear(ctx.COLOR_BUFFER_BIT);
  } 
  setTimeout( draw_stuff, 5000 )

the call stack reveals
 HTMLCanvasElement::FinalizeFrame() [1]
  ... ResourceProvider()->ProduceFrame() [2] 
    ... CanvasResourceProviderTextureGpuMemoryBuffer::ProduceFrame() [3]
      ... CanvasResourceGpuMemoryBuffer::CopyFromTexture() [4]

nothing shows up on the screen and there's only one call to ProduceFrame().

The same codepen works (shows a shade of green changing every 5s)
when removing {lowLatency: true}.



[1] https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc?q=html_canvas_element&sq=package:chromium&dr=C&l=389
[2] https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc?q=html_canvas_element&sq=package:chromium&dr=C&l=428
[3] https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc?gsn=ProduceFrame&g=0&l=168
[4] https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/graphics/canvas_resource.cc?gsn=DispatchFrameSync&g=0&l=466
 
Just to add more data, a similar situation happens with a 2D canvas if [1]:

  // TODO( crbug.com/789232 ): Make low latency mode work with GPU acceleration
  if (LowLatencyEnabled())
    return false;

is commented out, enabling 2D canvases to use CanvasResourceProviderTextureGMB
too.  Nothing is shown on screen with e.g. https://codepen.io/miguelao/pen/EReOgO

[1] https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc?gsn=ShouldAccelerate2dContext&g=0&l=972
Blocking: 789232
Labels: OS-Android OS-Linux OS-Mac OS-Windows
Owner: junov@chromium.org
Status: Assigned (was: Unconfirmed)
Bug is not platform specific.
Cc: -junov@chromium.org
Owner: ----
Status: Available (was: Assigned)
Description: Show this description
Blocking: -789232
Components: Blink>WebGL
Owner: mcasas@chromium.org
Status: Assigned (was: Available)
Blocking: 839970
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 26

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

commit bf0ec022e836e41f460fc38c9cc418cc4ae3062e
Author: Justin Novosad <junov@chromium.org>
Date: Thu Jul 26 20:20:03 2018

Fix low latency webgl graphics update

BUG= 867025 

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I4d6abf4ecfb611a23214d96cd2bfe410c0529476
Reviewed-on: https://chromium-review.googlesource.com/1149003
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578416}
[add] https://crrev.com/bf0ec022e836e41f460fc38c9cc418cc4ae3062e/content/test/data/gpu/pixel_canvas_low_latency_webgl.html
[modify] https://crrev.com/bf0ec022e836e41f460fc38c9cc418cc4ae3062e/content/test/gpu/gpu_tests/pixel_test_pages.py
[modify] https://crrev.com/bf0ec022e836e41f460fc38c9cc418cc4ae3062e/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc

Owner: junov@chromium.org
Status: Fixed (was: Assigned)
#9 did the trick and https://codepen.io/miguelao/pen/ejdRQX
did the trick, marking as Fixed, thanks junov@ !!
Blocking: 868596

Sign in to add a comment