WebKit Bugzilla
Attachment 357566 Details for
Bug 192554
: Rendering artifact on subpixel positions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192554-20181218153414.patch (text/plain), 10.80 KB, created by
Karl Leplat
on 2018-12-18 06:34:57 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Karl Leplat
Created:
2018-12-18 06:34:57 PST
Size:
10.80 KB
patch
obsolete
>Subversion Revision: 239026 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 202893917e53d9aaa0af273fc573667ad8a8ea56..bd1042186dc4a7526f47201feaaf6bd7e1942308 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,87 @@ >+2018-12-10 Karl Leplat <karl.leplat_ext@softathome.com> >+ >+ [GTK][WPE] Rendering artifact on subpixel positions >+ https://bugs.webkit.org/show_bug.cgi?id=192554 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In compositing mode, rendering artifacts have been detected on the repaint of elements on subpixel position. >+ We suspect a problem on rounding computing sequences, this bug is reproducible on WebKit GTK and WPE. >+ This bug is not reproducible with compositing mode disabled. >+ >+ AncestorGraphicsLayer 1st frame DirtyRect 2nd frame >+ --------------- 24px --------------- 24px -------------- >+ - 24.359375px - - 24px - - no painted >+ --------------- 48.359375px --------------- 48px (Force compositing mode) ------------- 48px -------------- 48px >+ - 24.359375px - - 25px - --> Need display this rect - 24px - --> - 25px - >+ --------------- 72.7187 --------------- 73px ------------- -------------- BUG: one pixels line no repainted >+ - 24.359375px - - 24px - - no painted - >+ --------------- --------------- -------------- >+ >+ Source files for logs: >+ <WebCore/platform/graphics/LayoutRect.h::snapRectToDevicePixels()> >+ <WebCore/rendering/RenderLayerBacking.cpp::setContentsNeedDisplayInRect()> >+ <WebCore/platform/graphics/nicosia/NicosiaPaintingEngineBasic.cpp::paint()> >+ <WebCore/platform/graphics/cairo/CairoOperations.cpp::fillRectWithColor()> >+ >+ Dump logs with the previous HTML test: >+ >+ ***************************** 1st frame processing ************************************ >+ ************** Update tiles in backingStore for GraphicsLayer ****************** >+ setContentsNeedDisplayInRect LayoutRect before: x(48.000000) y(24.000000) w(59.000000) h(24.359375) >+ snapRectToDevicePixels result after: x(48.000000) y(24.000000) width(59.000000) height(24.000000) >+ outlineBoundsForRepaint container before: x(0.000000) y(0.000000) w(59.000000) h(24.359375) >+ snapRectToDevicePixels result after: x(0.000000) y(0.000000) w(59.000000) h(24.000000) >+ >+ setContentsNeedDisplayInRect LayoutRect before: x(48.000000) y(48.359375) w(59.000000) h(24.359375) >+ snapRectToDevicePixels result after: x(48.000000) y(48.000000) width(59.000000) height(25.000000) >+ outlineBoundsForRepaint container before: x(0.000000) y(0.000000) w(59.000000) h(24.359375) >+ snapRectToDevicePixels result after: x(0.000000) y(0.000000) w(59.000000) h(24) ?????? >+ >+ setContentsNeedDisplayInRect LayoutRecti before: x(48.000000) y(72.718750) w(59.000000) h(24.359375) >+ snapRectToDevicePixels result after: x(48.000000) y(73.000000) width(59.000000) height(24.000000) >+ outlineBoundsForRepaint container before: x(0.000000) y(0.000000) w(59.000000) h(24.359375) >+ snapRectToDevicePixels result after: x(0.000000) y(0.000000) w(59.000000) h(24.000000) >+ ******************************************************************************** >+ ************ Paint Web contents ****************************************** >+ ********* paint() --> fillRectWithColor() ************** >+ cairo paint fill (Color::transparent) x(0.000000) y(0.000000) width(59.000000) height(25.000000) >+ cairo paint fill contents x(0.000000) y(0.000000) width(58.000000) height(24.000000) >+ >+ ********* paint() --> fillRectWithColor() ************** >+ new targetRect with size : width(59px) height(25px) >+ cairo paint fill (Color::transparent) x(0.000000) y(0.000000) width(59.000000) height(25.000000) >+ ------------> TO BE NOTED: this rect that should be updated in the second frame is filled with 25px of height <------------ >+ cairo paint fill contents x(0.000000) y(0.000000) width(58.000000) height(25.000000) >+ >+ ********* paint() --> fillRectWithColor() ************** >+ cairo paint fill (Color::transparent) x(0.000000) y(0.000000) width(59.000000) height(26.000000) >+ cairo paint fill contents x(0.000000) y(1.000000) width(58.000000) height(24.000000) >+ ************************************* end of frame ******************************************** >+ >+ ********************* 2nd frame processing in compositing mode ******************* >+ ************** Update tile in backingStore for GraphicsLayer ****************** >+ setContentsNeedDisplayInRect LayoutRect x(0.000000) y(0.000000) w(59.000000) h(24.359375) >+ snapRectToDevicePixels result: x(0.000000) y(0.000000) width(59.000000) height(24.000000) ????? >+ >+ The layout position (0.0 , 0.0) is not the same with the previous frame(48.0 , 48.359375) >+ Results with the two origins and a layout height of 24.359375px : >+ for position(0.0 , 0.0) we get 0.0 + 24.359375 = int(24)px of height >+ for position(48.0 , 48.359375) we get 48.359375 ==> 0.359375 + 24.359375 = 24,71875 = int(25)px of height >+ We can see that for the same dirtyRect we get differents height. >+ The calculation is done before moving by subpixels offset, perhaps we should take this for the rounding ? >+ ******************************************************************************* >+ ************ Paint Web contents ****************************************** >+ ********* paint() --> fillRectWithColor() ************** >+ cairo paint fill (Color::transparent) x(0.000000) y(0.000000) width(59.000000) height(24.000000) ????? >+ -------> TO BE NOTED: this rect is now filled with only 24px of height why ?? >+ cairo paint fill contents x(0.000000) y(0.000000) width(58.000000) height(25.000000) >+ ********************* end of frame ****************************************************** >+ >+ * compositing/repaint-element-on-subpixel-position-expected.png: Added. >+ * compositing/repaint-element-on-subpixel-position-expected.txt: Added. >+ * compositing/repaint-element-on-subpixel-position.html: Added. >+ > 2018-12-09 Commit Queue <commit-queue@webkit.org> > > Unreviewed, rolling out r239010. >diff --git a/LayoutTests/compositing/repaint-element-on-subpixel-position-expected.png b/LayoutTests/compositing/repaint-element-on-subpixel-position-expected.png >new file mode 100644 >index 0000000000000000000000000000000000000000..5e54d410b20be043bdccd92f4f4e170cab016013 >GIT binary patch >literal 3560 >zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i1B%QlYbpRznkB9gCCM47$=SuFxeVrM >zmWif`sb-dmMwW)Di76>*smX>($!6w8DHbM{7AA|;9&i9Pu_bxCyD<C*!3BGlPX-#F >z?CIhdQZeW4&5diF+(le3W^*eBw$5H4xF~+H^a8%90$zKDi8mN|6%^kdw^={cr%LV4 >zuKGVfU=1{_(SExekor^4A;7?(pzOfF(9pxc$iQI4#KORE0wH)N@in9T@8|E=iZd|0 >zIUR2wt)Fl_2B&ItBQ|$4{H)E{3$&=>_$S7q`g1Y)>wyOS$ZKEAUh}GC&dxdMeW(8e >zZTy!1llw%^51=bT-zb5MH$^xB-B8?)B~|5ajtTdVU*iT^SFR(k@csFjuivT|85-V~ >z-KaXS-0%3z)0NM5{PAaCNccZ(f5Vv$eg=k!qk5nKifG0bR-{^w7Svd^pV4D_@_pl1 >zCI*HFvZvWk{Ix9JyEhKV*)6+G?!(H<h0luSS?c{4W?;Cn|Ea!$@grsihOmv@AlF?} >zAUc}J4^d!b)yYTe10(p}#+rsZ^Np|He$C3ju<tf7+03_+P1k!q^YJHpV3_`m{>Nmb >zYzGWW(cPe^P2eTQ_gI63c)>v)c;F;X=PUxr&#%)#v2<WI@j03NBtnmjOoy~Ye5xB& >zIT{`KE7j2yGMYk0QwXjm=V<O2%^iazcbutzVQMK86s%AMY~eC^y85}Sb4qAZcJ+7T >F0sw3gV^9D9 > >literal 0 >HcmV?d00001 > >diff --git a/LayoutTests/compositing/repaint-element-on-subpixel-position-expected.txt b/LayoutTests/compositing/repaint-element-on-subpixel-position-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..b8084cf1f87336bd57b1bd61d74a3ab0c75399c1 >--- /dev/null >+++ b/LayoutTests/compositing/repaint-element-on-subpixel-position-expected.txt >@@ -0,0 +1,32 @@ >+layer at (0,0) size 800x600 >+ RenderView at (0,0) size 800x600 >+layer at (0,0) size 800x600 >+ RenderBlock {HTML} at (0,0) size 800x600 >+ RenderBody {BODY} at (8,8) size 784x576 >+ RenderBlock {UL} at (0,0) size 640x147 >+layer at (0,0) size 800x600 >+ RenderBlock (positioned) {DIV} at (0,0) size 800x600 >+layer at (48,8) size 600x24 >+ RenderListItem {LI} at (40,0) size 600x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 3x14 >+ text run at (0,0) width 3: "." >+layer at (48,32) size 600x25 >+ RenderListItem {LI} at (40,24) size 600x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 3x14 >+ text run at (0,0) width 3: "." >+layer at (48,57) size 600x24 >+ RenderListItem {LI} at (40,48) size 600x26 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 3x14 >+ text run at (0,0) width 3: "." >+layer at (48,81) size 600x24 >+ RenderListItem {LI} at (40,73) size 600x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 3x14 >+ text run at (0,0) width 3: "." >+layer at (48,105) size 600x25 >+ RenderListItem {LI} at (40,97) size 600x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 3x14 >+ text run at (0,0) width 3: "." >+layer at (48,130) size 600x24 >+ RenderListItem {LI} at (40,121) size 600x26 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 3x14 >+ text run at (0,0) width 3: "." >diff --git a/LayoutTests/compositing/repaint-element-on-subpixel-position.html b/LayoutTests/compositing/repaint-element-on-subpixel-position.html >new file mode 100644 >index 0000000000000000000000000000000000000000..88add9dbb1e324198d7286f2b22b971b460e29bc >--- /dev/null >+++ b/LayoutTests/compositing/repaint-element-on-subpixel-position.html >@@ -0,0 +1,42 @@ >+<html> >+<head> >+<style> >+ul { >+ width: 600px; >+ list-style: none; >+} >+ >+li { >+ position: relative; >+ height: 24.36px; >+ font-size: 12px; >+ background-color: white; >+} >+ >+li.selected { >+ background-color: orange; >+} >+</style> >+<script src="../fast/repaint/resources/repaint.js"></script> >+<script> >+ function repaintTest() { >+ document.getElementById("opt2").className = "selected"; >+ document.getElementById("opt3").className = "selected"; >+ document.getElementById("opt4").className = "selected"; >+ document.getElementById("opt5").className = "selected"; >+ } >+</script> >+</head> >+ >+<body onload="runRepaintTest()"> >+<div id="forceAcceleratedCompositing" style="position:absolute;left:0;right:0;top:0;bottom:0;-webkit-transform: translate3d(0, 0, 0);"></div> >+<ul> >+ <li class="selected">.</li> >+ <li class="" id="opt2">.</li> >+ <li class="" id="opt3">.</li> >+ <li class="" id="opt4">.</li> >+ <li class="" id="opt5">.</li> >+ <li class="selected">.</li> >+</ul> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192554
:
356955
|
356956
|
356957
|
356958
|
356959
|
357048
|
357050
|
357051
|
357056
|
357057
|
357121
|
357124
|
357127
|
357132
|
357134
|
357138
|
357180
|
357566
|
358887
|
358888
|
358914
|
358918
|
358947
|
359367
|
359370
|
359371
|
359372
|
359373
|
359377
|
359378
|
359456
|
359458
|
359488
|
359552
|
363081