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

Issue 652931 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

device_scale_factor need to be updated for high dpi devices

Project Member Reported by xidac...@chromium.org, Oct 5 2016

Issue description

Currently we hard code this one to be 1, should be changed for high dpi devices.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 9 2016

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

commit 489b3d0b87cbe796fabf42c2f0c2ac696e0af622
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Wed Nov 09 11:11:54 2016

Reland of gpu_test: enable Pixel_OffscreenCanvasUnaccelerated2DGPUCompositing

Original CL: https://codereview.chromium.org/2471173002/

Revert CL: https://codereview.chromium.org/2479923002

Reason for reland: mark
Pixel_OffscreenCanvasUnaccelerated2DGPUCompositingWorker to fail on only Mac
Nvidia as-is in https://codereview.chromium.org/2454153002

TBR=kbr@chromium.org
BUG= 615325 , 652931
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2487923002
Cr-Commit-Position: refs/heads/master@{#430908}

[modify] https://crrev.com/489b3d0b87cbe796fabf42c2f0c2ac696e0af622/content/test/gpu/gpu_tests/pixel_expectations.py

Cc: -xlai@chromium.org
Owner: xlai@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 16 2016

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

commit 5e87e713d6ed8c36fb37b814c6b65e7096d4554e
Author: xlai <xlai@chromium.org>
Date: Fri Dec 16 02:10:25 2016

Match html canvas which is transferred to OffscreenCanvas to CSS style

This CL aims to make html canvas to match to CSS style restriction regardless
whether it is transferred to OffscreenCanvas or not.

In a usual compositor commit, when a css style is imposed on the html canvas
to change its width and height, its layer will reset a different bounds.
However, in the case when html canvas has transferred control to offscreen,
it is using a SurfaceLayer, which directly use surface_size_ without
incorporating layer bounds to append SurfaceDrawQuad. This CL changes
SurfaceLayerImpl to take into account the special case when layer bounds is
different from surface_size by doing a transformation on the
Quad, especially when the aspect ratio is different.

The CL respects existing non-canvas cases on high-dpi devices and settings
when enable-use-zoom-for-dsf is on or off.

Also, it is also possible that the compositor commit due to style change
happens before the Surface Layer for html canvas is created. To prevent
flakiness, we force a compositor commit at the time when Surface Layer is
created and registered to GraphicsLayers.

TBR=khushalsagar@chromium.org, twellington@chromium.org, pfeldman@chromium.org
BUG= 655335 , 652931
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2495373003
Cr-Commit-Position: refs/heads/master@{#438986}

[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/blimp/client/core/compositor/blimp_compositor.cc
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/heads_up_display_layer_impl.cc
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/layer_impl.cc
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/layer_impl.h
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/painted_scrollbar_layer_impl.cc
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/picture_layer_impl.cc
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/surface_layer.cc
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/surface_layer.h
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/surface_layer_impl.cc
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/surface_layer_impl.h
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/surface_layer_impl_unittest.cc
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/cc/layers/surface_layer_unittest.cc
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/content/renderer/child_frame_compositing_helper.cc
[add] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/content/test/data/gpu/pixel_offscreenCanvas_transfer_after_style_resize.html
[add] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/content/test/data/gpu/pixel_offscreenCanvas_transfer_before_style_resize.html
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/content/test/gpu/gpu_tests/pixel_test_pages.py
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/ui/android/delegated_frame_host_android.cc
[modify] https://crrev.com/5e87e713d6ed8c36fb37b814c6b65e7096d4554e/ui/compositor/layer.cc

Comment 4 Deleted

Comment 5 by xlai@chromium.org, May 7 2018

Cc: -junov@chromium.org danakj@chromium.org fsam...@chromium.org
Components: Internals>Compositing Internals>Services>Viz
Owner: fs...@chromium.org
Currently, the CompositorFrame prepared in OffscreenCanvasFrameDispatcher (in worker) simply sets device scale factor to be 1.0f:

  // TODO(crbug.com/652931): update the device_scale_factor
  frame.metadata.device_scale_factor = 1.0f;

(https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/graphics/offscreen_canvas_frame_dispatcher.cc?q=DispatchFrame&sq=package:chromium&l=149)

This should be updated to read the device scale factor from display compositor. The challenge is how we can know this information from the worker thread of renderer, and how we can plumb this information to Blink.

Delegating this to fserb@ who've been working on OffscreenCanvas. The viz team might know how it can be done so I'm cc danakj@ and fsamuel@ here.
Cc: fs...@chromium.org
Components: -Internals>Compositing -Internals>Services>Viz Blink>Canvas
Owner: ----
Status: Available (was: Assigned)
Pass this info along from blink? I would suggest looking into how we propagate along WebScreenInfo and carry that into offscreen canvas.

Sign in to add a comment