New issue
Advanced search Search tips

Issue 652448 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Apply better composited raster scale heuristics to images

Project Member Reported by chrishtr@chromium.org, Oct 3 2016

Issue description

We currently do not special-case images in composited rasterization,
except for "directly composited images". These are composited <img> elements
that have no box decoration. In such cases we raster tiles at the intrinsic
scale of the image, and then scale those tiles as appropriate to the desired
scale. This has better-quality output, because images can look quite bad
when rastered at a smaller scale than the display scale.

This bug tracks plumbing and utilizing a raster scale setting for
cc::PictureLayer's that represent bare images, with no box decoration,
either via <img> or CSS background-image. This expands the use cases for
raster optimization to background-image, which is a very common way to
put images on web pages, especially involving sprites. It will also allow
us to remove PictureImageLayer.
 
Not sure if this helps or is relevant, but here's how things compare in the latest Chrome Canary: https://www.youtube.com/watch?v=PNTvGhXdLvU

Better than Chrome 53, but certainly not "good". Still jittery and there's a noticeable shift when it goes from layerized 3d transform to 2d. 
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 19 2016

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

commit cde557b63b79a0b3a22253f125af6c209aa4bce1
Author: chrishtr <chrishtr@chromium.org>
Date: Wed Oct 19 19:04:01 2016

WIP: plumb preferred raster scale for background images from Blink to cc layers.

BUG= 652448 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://chromiumcodereview.appspot.com/2410513002
Cr-Commit-Position: refs/heads/master@{#426255}

[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/cc/blink/web_layer_impl.cc
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/cc/blink/web_layer_impl.h
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/cc/layers/layer.cc
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/cc/layers/layer.h
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/cc/layers/layer_impl.cc
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/cc/layers/layer_impl.h
[add] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/third_party/WebKit/LayoutTests/compositing/scaling/preferred-raster-scale-expected.txt
[add] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/third_party/WebKit/LayoutTests/compositing/scaling/preferred-raster-scale.html
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.h
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/third_party/WebKit/Source/core/paint/BoxPainter.cpp
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
[modify] https://crrev.com/cde557b63b79a0b3a22253f125af6c209aa4bce1/third_party/WebKit/public/platform/WebLayer.h

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 21 2016

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

commit 0a78cbe13de10c5a1c951d753fd13d01c8b3488e
Author: chrishtr <chrishtr@chromium.org>
Date: Fri Oct 21 00:52:42 2016

Don't apply clips to children of composited-scrolling elements for overlap testing.

However, only compare these unclipped rects with other unclipped rects. This
prevents excessive layer explosion outside of the composited-scrolling layer.

This requires storing unclipped absolute rects for every PaintLayer.

BUG= 652448 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://chromiumcodereview.appspot.com/2425873005
Cr-Commit-Position: refs/heads/master@{#426664}

[modify] https://crrev.com/0a78cbe13de10c5a1c951d753fd13d01c8b3488e/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[add] https://crrev.com/0a78cbe13de10c5a1c951d753fd13d01c8b3488e/third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test-expected.txt
[add] https://crrev.com/0a78cbe13de10c5a1c951d753fd13d01c8b3488e/third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test.html
[modify] https://crrev.com/0a78cbe13de10c5a1c951d753fd13d01c8b3488e/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
[modify] https://crrev.com/0a78cbe13de10c5a1c951d753fd13d01c8b3488e/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp
[modify] https://crrev.com/0a78cbe13de10c5a1c951d753fd13d01c8b3488e/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/0a78cbe13de10c5a1c951d753fd13d01c8b3488e/third_party/WebKit/Source/core/paint/PaintLayer.h

Project Member

Comment 4 by bugdroid1@chromium.org, Mar 14 2017

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

commit 198758e6e615bb92dedeb86be7139ee2ac644e03
Author: chrishtr <chrishtr@chromium.org>
Date: Tue Mar 14 22:45:42 2017

Delete preferred raster bounds code.

We concluded that it wasn't working out for now.

BUG= 652448 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

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

[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/cc/blink/web_layer_impl.cc
[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/cc/blink/web_layer_impl.h
[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/cc/layers/layer.cc
[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/cc/layers/layer.h
[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/cc/layers/layer_impl.cc
[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/cc/layers/layer_impl.h
[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[delete] https://crrev.com/bb410f3b8a762cc37f641494e308aec6919d0c60/third_party/WebKit/LayoutTests/compositing/scaling/preferred-raster-bounds.html
[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/third_party/WebKit/Source/core/paint/BoxPainter.cpp
[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
[modify] https://crrev.com/198758e6e615bb92dedeb86be7139ee2ac644e03/third_party/WebKit/public/platform/WebLayer.h

Status: WontFix (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 10

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

commit a33f05b0abe00497c78e11da9007895520081028
Author: Eric Willigers <ericwilligers@chromium.org>
Date: Fri Aug 10 06:00:45 2018

Retire unused flag PreferredImageRasterBounds

The code and test (but not the flag) were deleted in March 2017.
https://codereview.chromium.org/2745913003

BUG= 652448 

Change-Id: Ic5fe2c9be786dfa57bdd03546c990889df2a5475
Reviewed-on: https://chromium-review.googlesource.com/1163059
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582071}
[modify] https://crrev.com/a33f05b0abe00497c78e11da9007895520081028/third_party/blink/renderer/platform/runtime_enabled_features.json5

Sign in to add a comment