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

Issue 831303 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

canvas/imagebitmap/transferFromImageBitmap-alpha.html different with GPU and software compositing

Project Member Reported by kylec...@chromium.org, Apr 10 2018

Issue description

I was looking at third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferFromImageBitmap-alpha.html for examples of things that use ImageLayerBridge. I noticed that the rendered output is different when using GPU compositing vs software compositing. I'm running a release build of ToT Linux chrome and turning off GPU compositing with the --disable-gpu flag. Adjust the file paths to match your local dir structure.

$ ./chrome file:///chrome/src/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferFromImageBitmap-alpha.html
# this produces a green square.

$ ./chrome --disable-gpu file:///chrome/src/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferFromImageBitmap-alpha.html
# this produces a black square.

+junov for triage
 
Cc: danakj@chromium.org

Comment 2 by danakj@chromium.org, Apr 13 2018

So in general we don't support software compositing in layout tests, though it mostly works. This may point at some bug we'd see in prod, though.
Cc: junov@chromium.org
Owner: kylec...@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 18 2018

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

commit 4c934ee45176cd21a97be327e5e25ca019d16049
Author: kylechar <kylechar@chromium.org>
Date: Wed Apr 18 16:48:29 2018

Use SharedBitmapIdRegistrar with ImageLayerBridge.

This uses the new TextureLayer APIs to register SharedBitmapIds instead
of using ClientSharedBitmapManager, in order to get the registration in
the same IPC channel that the compositor uses for submitting frames
that include the ImageLayerBridge's shared memory bitmaps.

This CL also fixes a bug where bitmap data wasn't properly copied into
shared memory. All rows from the source were copied into the same row of
the destination. This was causing the canvas to appear (almost?) all
black when using software compositing. I've tested the fix with
https://codepen.io/anon/pen/qoeQEE which looks the same using GPU and
software compositing.

Bug:  730660 ,  831303 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ibf778947a68c5948596f5dd516606937a8c5c442
Reviewed-on: https://chromium-review.googlesource.com/1014380
Reviewed-by: Justin Novosad <junov@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551718}
[modify] https://crrev.com/4c934ee45176cd21a97be327e5e25ca019d16049/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.cc
[modify] https://crrev.com/4c934ee45176cd21a97be327e5e25ca019d16049/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.h

Status: Fixed (was: Started)
All done. I wonder if some of the WebKit tests should run a second time with software compositing though?

Sign in to add a comment