New issue
Advanced search Search tips

Issue 869922 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 3
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-08-09
OS: Chrome
Pri: 3
Type: Bug

Blocking:
issue 839970



Sign in to add a comment

Canvas 3D low latency on Chrome OS does not turn into overlay

Project Member Reported by mcasas@chromium.org, Aug 1

Issue description

CrOs crrev.com/c/1154128 landed support for GL_MESA_framebuffer_flip_y
on intel Mesa i965.  

With that, the demo scribbling on a 3D canvas [1] with the flag
  chrome://flags#enable-experimental-web-platform-features
set to "Enabled", should draw a WebGL canvas that turns into
overlay.

The said CL [1] landed on 10925.0.0, this is on a Nautilus with
Chrome 70.0.3508.0 and OS 10928.0.0.

Same situation happens on an ARM-base Rockchip (scarlet) with the
said demo and Chrome 70.0.3505.0 and platform 10925.0.0 (RK
has no i965 of course, but it might be that the issue is 
platform independent).

Also I see no overlays with non lowLatency canvases like eg [2]

[1] https://codepen.io/miguelao/full/WKZaqd
[2] https://webrtc.github.io/samples/src/content/capture/canvas-pc/
 
Blocking: 839970
Cc: andrescj@chromium.org
Components: -Blink>Canvas Blink>WebGL
Owner: mcasas@chromium.org
Status: Assigned (was: Unconfirmed)
Labels: LowLatency
Description: Show this description
Also applicable to this bug: ----------------------------------------------

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

commit 86d4fd13113a1daf835d15bee3879486cdfc1185
Author: Miguel Casas <mcasas@chromium.org>
Date: Wed Aug 01 18:18:38 2018

CanvasResourceDispatcher: correct viz::TextureDrawQuad size

This CL fixes the Size we SetAll() in the viz::TextureDrawQuad
from an empty one to the appropriate CanvasResource Size -- this
is needed to indicate to e.g. Ozone the |resource_size_in_pixels|
of the overlay candidate, but it's also more correct in general.

Also removes an unused variable and adds {} in a few needed places.

Bug:  869161 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ice28fb8c9d7f9a4eee29a22f8634b08c9dfb2e36
Reviewed-on: https://chromium-review.googlesource.com/1157232
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579864}
[modify] https://crrev.com/86d4fd13113a1daf835d15bee3879486cdfc1185/third_party/blink/renderer/platform/graphics/canvas_resource_dispatcher.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 3

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

commit 746550cd334fc1d7907acf39d623cd7a51e7fd39
Author: Miguel Casas <mcasas@chromium.org>
Date: Fri Aug 03 02:09:16 2018

webgl lowLatency: don't flip vertically the DrawQuad if not needed

This CL adds a CanvasRenderingContext::IsOriginTopLeft() method
that is used to indicate if the canvas origin of coords -top left
corner- and the CanvasResource origin -low left corner- differ
and need reconciliation.

IsOriginTopLeft() is usually false if the context IsAccelerated();
for WebGL cases the framebuffer can be flipped itself instead:
this is marked by the presence of a context flag. IsOriginTopLeft()
is true in this case.

This CL wires this info to CanvasResourceDispatcher::PrepareFrame()
so that the DrawQuad is marked appropriately. On some platforms (intel)
only non-flipped quads can be promoted to overlays (enabling front
buffer rendering).

Running with the patch makes the webgl demo [1] show up as overlay on
both nautilus and scarlet (needs at least 10925 OS). Canvas2D still OK.

[1] https://codepen.io/miguelao/full/WKZaqd

Bug:  869922 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Idbe2bf4901c8f71b3fe0b596f5e7c3e3f0ae0df6
Reviewed-on: https://chromium-review.googlesource.com/1159185
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580415}
[modify] https://crrev.com/746550cd334fc1d7907acf39d623cd7a51e7fd39/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h
[modify] https://crrev.com/746550cd334fc1d7907acf39d623cd7a51e7fd39/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc
[modify] https://crrev.com/746550cd334fc1d7907acf39d623cd7a51e7fd39/third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.cc
[modify] https://crrev.com/746550cd334fc1d7907acf39d623cd7a51e7fd39/third_party/blink/renderer/modules/webgl/DEPS
[modify] https://crrev.com/746550cd334fc1d7907acf39d623cd7a51e7fd39/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
[modify] https://crrev.com/746550cd334fc1d7907acf39d623cd7a51e7fd39/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
[modify] https://crrev.com/746550cd334fc1d7907acf39d623cd7a51e7fd39/third_party/blink/renderer/platform/graphics/canvas_resource_dispatcher.cc
[modify] https://crrev.com/746550cd334fc1d7907acf39d623cd7a51e7fd39/third_party/blink/renderer/platform/graphics/canvas_resource_dispatcher.h
[modify] https://crrev.com/746550cd334fc1d7907acf39d623cd7a51e7fd39/third_party/blink/renderer/platform/graphics/offscreen_canvas_frame_dispatcher_test.cc

Cc: tbuck...@chromium.org
NextAction: 2018-08-09
Status: Fixed (was: Assigned)
This should be fix, let's verify independently on ToT in a few days
Project Member

Comment 8 by bugdroid1@chromium.org, Aug 7

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

commit 2c8441eacde1f873603fb0c27a5dc219a3dcec0e
Author: Miguel Casas <mcasas@chromium.org>
Date: Tue Aug 07 02:06:06 2018

WebGLRenderingContextBase: use default member initializer

This CL follows up on a comment [1] and moves a few constant values
out of the ctor initialization list to default member initializers.

This clarifies what initialization must be delayed to ctor time
(because it needs parameters) vs purely constant, and homogenises it.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1159185/16/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h#715

Bug:  869922 
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: Icdf567886519853ced6ee88a135fcb85caf1316b
Reviewed-on: https://chromium-review.googlesource.com/1162644
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581093}
[modify] https://crrev.com/2c8441eacde1f873603fb0c27a5dc219a3dcec0e/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
[modify] https://crrev.com/2c8441eacde1f873603fb0c27a5dc219a3dcec0e/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h

The NextAction date has arrived: 2018-08-09

Sign in to add a comment