Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(819)

Issue 20723003: Fix pixel snapping issues when layers become composited (Closed)

Created:
7 years, 5 months ago by leviw_travelin_and_unemployed
Modified:
6 years, 11 months ago
CC:
blink-reviews, eae+blinkwatch, apavlov+blink_chromium.org, aandrey+blink_chromium.org, jamesr, caseq+blink_chromium.org, yurys+blink_chromium.org, danakj, dglazkov+blink, Rik, jchaffraix+rendering, devtools-reviews_chromium.org, pdr., loislo+blink_chromium.org, lushnikov+blink_chromium.org, eustas+blink_chromium.org, paulirish+reviews_chromium.org, alph+blink_chromium.org, leviw+renderwatch, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, Stephen Chennney, jeez, Ian Vollick
Visibility:
Public.

Description

Fix pixel snapping issues when layers become composited Within the render tree, locations and sizes are stored in LayoutUnits and determining the final destination for an element involves walking the render tree and accumulating the offset. When a layer becomes composited, we start mid-way in the render tree, and don't accumulate our offsets. This change has us using LayoutUnits in RenderLayerBacking to store our sub-pixel offset so our painting when composited pixel snaps the same as when we aren't composited. This patch is based on work Allan Sandfeld Jensen started on https://bugs.webkit.org/show_bug.cgi?id=115304. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164561

Patch Set 1 #

Total comments: 8

Patch Set 2 : Updating with eae's suggestions. #

Patch Set 3 : Fix niggling bug. #

Patch Set 4 : Updating tot #

Patch Set 5 : Update and mark one test as failing #

Patch Set 6 : Adding another failing test expectation #

Total comments: 8

Patch Set 7 : Fixing as per eae's suggestions #

Patch Set 8 : Verify sub-pixel values are really sub-pixel on Windows. #

Patch Set 9 : Changing to a Release Assert #

Patch Set 10 : Bring up to ToT again... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -63 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -1 line 0 comments Download
A LayoutTests/fast/sub-pixel/sub-pixel-composited-layers.html View 1 2 3 4 5 6 7 1 chunk +66 lines, -0 lines 0 comments Download
A LayoutTests/fast/sub-pixel/sub-pixel-composited-layers-expected.html View 1 2 3 4 5 6 1 chunk +63 lines, -0 lines 0 comments Download
M LayoutTests/platform/linux/virtual/softwarecompositing/direct-image-compositing-expected.png View 1 2 3 4 Binary file 0 comments Download
M Source/core/rendering/CompositedLayerMapping.h View 1 2 3 4 5 6 7 8 9 6 chunks +10 lines, -6 lines 0 comments Download
M Source/core/rendering/CompositedLayerMapping.cpp View 1 2 3 4 5 6 7 8 9 14 chunks +52 lines, -30 lines 0 comments Download
M Source/core/rendering/FilterEffectRenderer.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderLayer.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderLayer.cpp View 1 2 3 4 5 6 7 8 9 17 chunks +31 lines, -19 lines 0 comments Download
M Source/core/rendering/RenderLayerClipper.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/rendering/RenderLayerCompositor.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderLayerCompositor.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M Source/platform/geometry/LayoutSize.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
leviw_travelin_and_unemployed
7 years, 5 months ago (2013-07-26 19:19:39 UTC) #1
eae
Yay! Got a couple of questions and suggestions for you though. https://codereview.chromium.org/20723003/diff/1/Source/core/rendering/RenderLayerBacking.cpp File Source/core/rendering/RenderLayerBacking.cpp (right): ...
7 years, 5 months ago (2013-07-26 20:30:50 UTC) #2
leviw_travelin_and_unemployed
https://codereview.chromium.org/20723003/diff/1/Source/core/rendering/RenderLayerBacking.cpp File Source/core/rendering/RenderLayerBacking.cpp (right): https://codereview.chromium.org/20723003/diff/1/Source/core/rendering/RenderLayerBacking.cpp#newcode536 Source/core/rendering/RenderLayerBacking.cpp:536: m_subpixelAccumulation = toLayoutSize(rawDelta.fraction()); On 2013/07/26 20:30:51, eae wrote: > ...
7 years, 5 months ago (2013-07-26 20:36:21 UTC) #3
leviw_travelin_and_unemployed
ptal
7 years, 5 months ago (2013-07-26 21:47:50 UTC) #4
eae
LGTM!
7 years, 5 months ago (2013-07-26 21:53:16 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/20723003/9001
7 years, 5 months ago (2013-07-26 21:58:37 UTC) #6
commit-bot: I haz the power
Retried try job too often on win_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_layout_rel&number=14984
7 years, 5 months ago (2013-07-27 02:25:41 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/20723003/9001
7 years, 4 months ago (2013-07-29 17:14:47 UTC) #8
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 4 months ago (2013-07-29 17:14:53 UTC) #9
leviw_travelin_and_unemployed
I've updated this patch. It's a pretty nasty issue and I think the one failure ...
7 years, 1 month ago (2013-11-13 00:16:27 UTC) #10
eae
https://codereview.chromium.org/20723003/diff/105001/LayoutTests/TestExpectations File LayoutTests/TestExpectations (right): https://codereview.chromium.org/20723003/diff/105001/LayoutTests/TestExpectations#newcode162 LayoutTests/TestExpectations:162: #crbug.com/310679 [ Mac ] virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style.html [ ImageOnlyFailure Pass ] ...
7 years, 1 month ago (2013-11-13 00:29:00 UTC) #11
leviw_travelin_and_unemployed
https://codereview.chromium.org/20723003/diff/105001/LayoutTests/fast/sub-pixel/sub-pixel-composited-layers.html File LayoutTests/fast/sub-pixel/sub-pixel-composited-layers.html (right): https://codereview.chromium.org/20723003/diff/105001/LayoutTests/fast/sub-pixel/sub-pixel-composited-layers.html#newcode32 LayoutTests/fast/sub-pixel/sub-pixel-composited-layers.html:32: function setupGrid10x10(leftOffset, topOffset, leftFraction, topFraction) On 2013/11/13 00:29:01, eae ...
7 years, 1 month ago (2013-11-13 00:31:50 UTC) #12
leviw_travelin_and_unemployed
Adding some other folks to - validate the approach of this patch - help me ...
7 years, 1 month ago (2013-11-13 21:01:26 UTC) #13
leviw_travelin_and_unemployed
I added an assert that doesn't modify any values, and the tests passed on the ...
7 years, 1 month ago (2013-11-18 21:41:20 UTC) #14
leviw_travelin_and_unemployed
On 2013/11/18 21:41:20, Levi wrote: > I added an assert that doesn't modify any values, ...
7 years, 1 month ago (2013-11-18 21:49:43 UTC) #15
eae
AWESOME! LGTM
6 years, 11 months ago (2014-01-07 01:49:51 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/20723003/455001
6 years, 11 months ago (2014-01-07 09:50:41 UTC) #17
commit-bot: I haz the power
6 years, 11 months ago (2014-01-07 10:14:51 UTC) #18
Message was sent while issue was closed.
Change committed as 164561

Powered by Google App Engine
This is Rietveld 408576698