WebKit Bugzilla
Attachment 357048 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-20181211163442.patch (text/plain), 14.37 KB, created by
Karl Leplat
on 2018-12-11 07:34:47 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Karl Leplat
Created:
2018-12-11 07:34:47 PST
Size:
14.37 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..2da9d848a7351f73bc0fb16170e5e59dc8e1e14e >GIT binary patch >literal 6852 >zcmeHMYg7~0zTaRKdwkFyd*lEDx{9FHiV)r*P>Tg49AXQVry?2xDiSr}6(DG7;dl|0 >zAYu$8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iS=VDW|?YPO|6^9@`zW*PeVyknP|`w >zG=%fSPmV~hnSi4~zZzyx`#%K!?Efs*52rEXf5KL;1_kc$->Am?N`Ypj>0eZ@Rwid< >wa{jrZxq^umOsrtyx9a^X?D+q|4uemjYtuLG;d>O&A0~kOB4~fr=f}SJZ^jo!Z2$lO > >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..37166199987504fb7ac9edd66d66ae336aa3964b >--- /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 51x17 >+ text run at (0,0) width 51: "TEST 1" >+layer at (48,32) size 600x25 >+ RenderListItem {LI} at (40,24) size 600x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 51x17 >+ text run at (0,0) width 51: "TEST 2" >+layer at (48,57) size 600x24 >+ RenderListItem {LI} at (40,48) size 600x26 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 51x17 >+ text run at (0,0) width 51: "TEST 3" >+layer at (48,81) size 600x24 >+ RenderListItem {LI} at (40,73) size 600x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 51x17 >+ text run at (0,0) width 51: "TEST 3" >+layer at (48,105) size 600x25 >+ RenderListItem {LI} at (40,97) size 600x25 [bgcolor=#FFA500] >+ RenderText {#text} at (0,0) size 51x17 >+ text run at (0,0) width 51: "TEST 3" >+layer at (48,130) size 600x24 >+ RenderListItem {LI} at (40,121) size 600x26 [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..9e4481ccf5e03200863c7884f4839345a0602cf8 >--- /dev/null >+++ b/LayoutTests/compositing/repaint-element-on-subpixel-position.html >@@ -0,0 +1,41 @@ >+<html> >+<head> >+<style> >+ul { >+ width: 600px; >+ 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:0;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