WebKit Bugzilla
Attachment 356955 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-20181210142449.patch (text/plain), 13.79 KB, created by
Karl Leplat
on 2018-12-10 05:24:54 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Karl Leplat
Created:
2018-12-10 05:24:54 PST
Size:
13.79 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..360c84412cac655e5a7a6a23f5ced687de291b52 >GIT binary patch >literal 6893 >zcmeI1X;f3!7RL`_!RG+AS}C&?l(rzqJSVnlAc9bbRs<v{5N3i*fe?twv%D5@02u;= >z6hSDJNk%aw0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3#EL)6FGqDRqrUo|&xa<GgNfaFPfxlqYznJ$U@d!YhMj04)7+DX<%i >zBPNQx4uqJw-yTX)%(L%nZ!N&uq(8c5U?--lD1yAOf6Mo&Z^%@biNza*%&j0V;&;*; >z*w?ZbUZEJ}{tnDOZQn?}W$l?+F7`;yXhpwxi3B&HX7jVseNjduq#<S?dBO9%^i6bI >zPe~14mhiqFLd*AG>XUY`92!ZP?79&CG%l=|WSVt|G2s#i#sk#OS9r$t1rPH3{h#M~ >z8x1kLYsiaHu)T8N;Ivkc)_QB`lcZ>k)S}h-T(7Ml{5$f&W!Vu;t@0lp)(rENQz-*T >z+yyPLpT=bNB7zlnfbX-Lw}4L$RRQqb-weRj%QACr4sHI4O-*dN!X^|pS-2S${%d?R >zA6u05dt9#e_VyN12bF%C`u)kn<#%hglv!I^E*B2~5dMQ~VN3GgbyZbWtyfaGf4x;B >ag;r*E7IYlBPn5Ny0Q`i@@rp0Jum1wA-LKmK > >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..3409fc793a4999bd8672800a78d547b8ddaae316 >--- /dev/null >+++ b/LayoutTests/compositing/repaint-element-on-subpixel-position-expected.txt >@@ -0,0 +1,33 @@ >+layer at (0,0) size 833x609 >+ RenderView at (0,0) size 785x585 >+layer at (0,0) size 785x585 >+ RenderBlock {HTML} at (0,0) size 785x585 >+ RenderBody {BODY} at (8,8) size 769x569 >+layer at (0,439) size 785x146 >+ RenderBlock (positioned) {DIV} at (0,438) size 785x147 >+layer at (8,24) size 825x585 >+ RenderBlock (positioned) {UL} at (8,24) size 825x585 >+layer at (48,24) size 785x24 >+ RenderListItem {LI} at (40,0) size 785x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 51x17 >+ text run at (0,0) width 51: "TEST 1" >+layer at (48,48) size 785x25 >+ RenderListItem {LI} at (40,24) size 785x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 51x17 >+ text run at (0,0) width 51: "TEST 2" >+layer at (48,73) size 785x24 >+ RenderListItem {LI} at (40,48) size 785x26 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 51x17 >+ text run at (0,0) width 51: "TEST 3" >+layer at (48,97) size 785x24 >+ RenderListItem {LI} at (40,73) size 785x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 51x17 >+ text run at (0,0) width 51: "TEST 3" >+layer at (48,121) size 785x25 >+ RenderListItem {LI} at (40,97) size 785x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 51x17 >+ text run at (0,0) width 51: "TEST 3" >+layer at (48,146) size 785x24 >+ RenderListItem {LI} at (40,121) size 785x26 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 51x17 >+ text run at (0,0) width 51: "TEST 1" >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..30575b58a25396d1a275dede2fd048e8ec16b8f9 >--- /dev/null >+++ b/LayoutTests/compositing/repaint-element-on-subpixel-position.html >@@ -0,0 +1,43 @@ >+<html> >+<head> >+<style> >+ul { >+ height: 100%; >+ width: 100%; >+ position: absolute; >+ list-style: none; >+} >+ >+li { >+ position: relative; >+ height: 24.36px; >+ 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:75%;bottom:0;-webkit-transform: translate3d(0, 0, 0);"></div> >+<ul> >+ <li class="selected">TEST 1</li> >+ <li class="" id="opt2">TEST 2</li> >+ <li class="" id="opt3">TEST 3</li> >+ <li class="" id="opt4">TEST 3</li> >+ <li class="" id="opt5">TEST 3</li> >+ <li class="selected">TEST 1</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