Changeset 183354 in webkit
- Timestamp:
- Apr 26, 2015, 10:24:40 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 49 edited
- 1 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/compositing/contents-scale/animating-expected.txt (modified) (1 diff)
-
LayoutTests/compositing/contents-scale/rounded-contents-scale-expected.txt (modified) (6 diffs)
-
LayoutTests/compositing/contents-scale/scaled-ancestor-expected.txt (modified) (2 diffs)
-
LayoutTests/compositing/contents-scale/simple-scale-expected.txt (modified) (1 diff)
-
LayoutTests/compositing/tiling/transform-origin-tiled-expected.txt (copied) (copied from trunk/LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt ) (1 diff)
-
LayoutTests/compositing/tiling/transform-origin-tiled.html (added)
-
LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt (modified) (5 diffs)
-
LayoutTests/platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac/compositing/visible-rect/2d-transformed-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac/compositing/visible-rect/3d-transformed-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac/compositing/visible-rect/clipped-by-viewport-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac/compositing/visible-rect/clipped-visible-rect-expected.txt (modified) (3 diffs)
-
LayoutTests/platform/mac/compositing/visible-rect/iframe-and-layers-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac/compositing/visible-rect/scrolled-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/graphics/TiledBacking.h (modified) (2 diffs)
-
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (modified) (18 diffs)
-
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (modified) (6 diffs)
-
Source/WebCore/platform/graphics/ca/TileController.cpp (modified) (7 diffs)
-
Source/WebCore/platform/graphics/ca/TileController.h (modified) (5 diffs)
-
Source/WebCore/platform/graphics/ca/TileCoverageMap.cpp (modified) (5 diffs)
-
Source/WebCore/platform/graphics/ca/TileCoverageMap.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/ca/TileGrid.cpp (modified) (4 diffs)
-
Source/WebCore/platform/graphics/ca/TileGrid.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/transforms/TransformState.cpp (modified) (4 diffs)
-
Source/WebCore/platform/graphics/transforms/TransformState.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r183351 r183354 1 2015-04-25 Simon Fraser <simon.fraser@apple.com> 2 3 Expand compositing coverage rect when scrolling and animating 4 https://bugs.webkit.org/show_bug.cgi?id=144214 5 rdar://problem/20695926 6 7 Reviewed by Darin Adler. 8 9 New baselines for tests dumping layer output, with coverage rect being affected 10 by this changeset. One new test for tiling a layer inside overflow:hidden with transform-origin. 11 12 * compositing/contents-scale/animating-expected.txt: 13 * compositing/contents-scale/rounded-contents-scale-expected.txt: 14 * compositing/contents-scale/scaled-ancestor-expected.txt: 15 * compositing/contents-scale/simple-scale-expected.txt: 16 * compositing/tiling/transform-origin-tiled.html: Added. 17 * platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: 18 * platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: 19 * platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt: 20 * platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt: 21 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt: 22 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt: 23 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt: 24 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: 25 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt: 26 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt: 27 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt: 28 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt: 29 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: 30 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: 31 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt: 32 * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: 33 * platform/mac-wk2/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt: 34 * platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles-expected.txt: 35 * platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt: 36 * platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt: 37 * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt: 38 * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt: 39 * platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt: 40 * platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: 41 * platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt: 42 * platform/mac/compositing/visible-rect/2d-transformed-expected.txt: 43 * platform/mac/compositing/visible-rect/3d-transformed-expected.txt: 44 * platform/mac/compositing/visible-rect/clipped-by-viewport-expected.txt: 45 * platform/mac/compositing/visible-rect/clipped-visible-rect-expected.txt: 46 * platform/mac/compositing/visible-rect/iframe-and-layers-expected.txt: 47 * platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt: 48 * platform/mac/compositing/visible-rect/scrolled-expected.txt: 49 1 50 2015-04-25 Alexey Proskuryakov <ap@apple.com> 2 51 -
trunk/LayoutTests/compositing/contents-scale/animating-expected.txt
r183300 r183354 24 24 (transform [1.50 0.00 0.00 0.00] [0.00 1.50 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 25 25 (visible rect 0.00, 0.00 100.00 x 100.00) 26 (coverage rect 0.00, 0.00 800.00 x 600.00)26 (coverage rect -12.00, -6.67 533.33 x 400.00) 27 27 (intersects coverage rect 1) 28 28 (contentsScale 1.00) -
trunk/LayoutTests/compositing/contents-scale/rounded-contents-scale-expected.txt
r183300 r183354 30 30 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 -200.00 1.00]) 31 31 (visible rect 0.00, 0.00 102.00 x 102.00) 32 (coverage rect - 8.00, -8.00 800.00 x 600.00)32 (coverage rect -11.20, -11.20 1120.00 x 840.00) 33 33 (intersects coverage rect 1) 34 34 (contentsScale 1.00) … … 41 41 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 -100.00 1.00]) 42 42 (visible rect 0.00, 0.00 102.00 x 102.00) 43 (coverage rect - 8.00, -8.00 800.00 x 600.00)43 (coverage rect -9.60, -91.60 960.00 x 720.00) 44 44 (intersects coverage rect 1) 45 45 (contentsScale 1.00) … … 51 51 (drawsContent 1) 52 52 (visible rect 0.00, 0.00 102.00 x 102.00) 53 (coverage rect -8.00, - 8.00 800.00 x 600.00)53 (coverage rect -8.00, -172.00 800.00 x 600.00) 54 54 (intersects coverage rect 1) 55 55 (contentsScale 1.00) … … 62 62 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 50.00 1.00]) 63 63 (visible rect 0.00, 0.00 102.00 x 102.00) 64 (coverage rect - 8.00, -8.00 800.00 x 600.00)64 (coverage rect -7.20, -253.20 720.00 x 540.00) 65 65 (intersects coverage rect 1) 66 66 (contentsScale 1.00) … … 73 73 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 100.00 1.00]) 74 74 (visible rect 0.00, 0.00 102.00 x 102.00) 75 (coverage rect - 8.00, -8.00 800.00 x 600.00)75 (coverage rect -6.40, -334.40 640.00 x 480.00) 76 76 (intersects coverage rect 1) 77 77 (contentsScale 1.00) … … 84 84 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 150.00 1.00]) 85 85 (visible rect 0.00, 0.00 102.00 x 4.40) 86 (coverage rect - 8.00, -8.00 800.00 x 600.00)86 (coverage rect -5.60, -415.60 560.00 x 420.00) 87 87 (intersects coverage rect 1) 88 88 (contentsScale 1.00) -
trunk/LayoutTests/compositing/contents-scale/scaled-ancestor-expected.txt
r183300 r183354 23 23 (transform [2.00 0.00 0.00 0.00] [0.00 2.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 24 24 (visible rect 0.00, 0.00 102.00 x 102.00) 25 (coverage rect 0.00, 0.00 800.00 x 600.00)25 (coverage rect -4.00, -4.00 400.00 x 300.00) 26 26 (intersects coverage rect 1) 27 27 (contentsScale 1.00) … … 33 33 (drawsContent 1) 34 34 (visible rect 0.00, 0.00 100.00 x 100.00) 35 (coverage rect -1 1.00, -11.00 800.00 x 600.00)35 (coverage rect -15.00, -15.00 400.00 x 300.00) 36 36 (intersects coverage rect 1) 37 37 (contentsScale 1.00) -
trunk/LayoutTests/compositing/contents-scale/simple-scale-expected.txt
r183300 r183354 24 24 (transform [2.00 0.00 0.00 0.00] [0.00 2.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 25 25 (visible rect 0.00, 0.00 100.00 x 100.00) 26 (coverage rect 0.00, 0.00 800.00 x 600.00)26 (coverage rect -9.00, -5.00 400.00 x 300.00) 27 27 (intersects coverage rect 1) 28 28 (contentsScale 1.00) -
trunk/LayoutTests/compositing/tiling/transform-origin-tiled-expected.txt
r183353 r183354 42 42 (contentsOpaque 1) 43 43 (drawsContent 1) 44 (transform [0.17 0.00 -0.98 0.00] [0.00 1.00 0.00 0.00] [0.98 0.00 0.17 0.00] [0.00 0.00 0.00 1.00]) 45 (visible rect 0.00, 0.00 2800.00 x 300.00) 46 (coverage rect 0.00, 0.00 500.00 x 300.00) 44 (visible rect 1250.00, 0.00 500.00 x 300.00) 45 (coverage rect 1250.00, 0.00 500.00 x 300.00) 47 46 (intersects coverage rect 1) 48 47 (contentsScale 1.00) 49 (tile cache coverage 0, 0 2800x 300)48 (tile cache coverage 1024, 0 1024 x 300) 50 49 (tile size 512 x 512) 51 (top left tile 0, 0 tiles grid 6x 1)50 (top left tile 2, 0 tiles grid 2 x 1) 52 51 ) 53 52 ) -
trunk/LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt
r183300 r183354 44 44 (transform [0.17 0.00 -0.98 0.00] [0.00 1.00 0.00 0.00] [0.98 0.00 0.17 0.00] [0.00 0.00 0.00 1.00]) 45 45 (visible rect 0.00, 0.00 2800.00 x 300.00) 46 (coverage rect 0.00, 0.00 500.00 x 300.00)46 (coverage rect 0.00, 0.00 2800.00 x 300.00) 47 47 (intersects coverage rect 1) 48 48 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt
r183300 r183354 51 51 (transform [0.17 0.00 -0.98 0.00] [0.00 1.00 0.00 0.00] [0.98 0.00 0.17 0.00] [0.00 0.00 0.00 1.00]) 52 52 (visible rect 0.00, 0.00 2800.00 x 300.00) 53 (coverage rect -1562500.00, -1562500.00 1563571.88 x 1562694.63)53 (coverage rect 0.00, 0.00 2800.00 x 300.00) 54 54 (intersects coverage rect 1) 55 55 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt
r183300 r183354 13 13 (transform [1.60 0.00 0.00 0.00] [0.00 1.60 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 14 14 (visible rect 0.00, 0.00 490.63 x 365.63) 15 (coverage rect 0.00, 0.00 785.00 x 585.00)15 (coverage rect 0.00, 0.00 490.63 x 365.63) 16 16 (intersects coverage rect 1) 17 17 (contentsScale 1.60) … … 26 26 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 27 27 (visible rect 0.00, 0.00 482.63 x 357.63) 28 (coverage rect 0.00, 0.00 785.00 x 585.00)28 (coverage rect -8.00, -8.00 490.63 x 365.63) 29 29 (intersects coverage rect 1) 30 30 (contentsScale 1.60) -
trunk/LayoutTests/platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt
r183300 r183354 23 23 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 24 24 (visible rect 2.00, 92.00 98.00 x 135.00) 25 (coverage rect 10.00, 100.00 285.00 x 135.00)25 (coverage rect 2.00, 92.00 285.00 x 135.00) 26 26 (intersects coverage rect 1) 27 27 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt
r183301 r183354 70 70 (contentsOpaque 1) 71 71 (visible rect 0.00, 0.00 785.00 x 585.00) 72 (coverage rect 0.00, 0.00 785.00 x 585.00)72 (coverage rect 0.00, 0.00 1570.00 x 1755.00) 73 73 (intersects coverage rect 1) 74 74 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt
r183301 r183354 71 71 (contentsOpaque 1) 72 72 (visible rect 0.00, 0.00 785.00 x 585.00) 73 (coverage rect 0.00, 0.00 785.00 x 585.00)73 (coverage rect 0.00, 0.00 1570.00 x 1755.00) 74 74 (intersects coverage rect 1) 75 75 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt
r183301 r183354 69 69 (contentsOpaque 1) 70 70 (visible rect 0.00, 70.00 785.00 x 585.00) 71 (coverage rect 0.00, 70.00 785.00 x 585.00)71 (coverage rect 0.00, 0.00 1570.00 x 1755.00) 72 72 (intersects coverage rect 1) 73 73 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt
r183301 r183354 70 70 (contentsOpaque 1) 71 71 (visible rect 0.00, 70.00 785.00 x 585.00) 72 (coverage rect 0.00, 70.00 785.00 x 585.00)72 (coverage rect 0.00, 0.00 1570.00 x 1755.00) 73 73 (intersects coverage rect 1) 74 74 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt
r183301 r183354 26 26 (contentsOpaque 1) 27 27 (visible rect 0.00, 0.00 785.00 x 600.00) 28 (coverage rect 0.00, 0.00 785.00 x 600.00)28 (coverage rect 0.00, 0.00 1570.00 x 1800.00) 29 29 (intersects coverage rect 1) 30 30 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt
r183301 r183354 27 27 (contentsOpaque 1) 28 28 (visible rect 0.00, 0.00 785.00 x 600.00) 29 (coverage rect 0.00, 0.00 785.00 x 600.00)29 (coverage rect 0.00, 0.00 1570.00 x 1800.00) 30 30 (intersects coverage rect 1) 31 31 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt
r183301 r183354 25 25 (contentsOpaque 1) 26 26 (visible rect 0.00, 70.00 785.00 x 600.00) 27 (coverage rect 0.00, 70.00 785.00 x 600.00)27 (coverage rect 0.00, 0.00 1570.00 x 1800.00) 28 28 (intersects coverage rect 1) 29 29 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt
r183301 r183354 26 26 (contentsOpaque 1) 27 27 (visible rect 0.00, 70.00 785.00 x 600.00) 28 (coverage rect 0.00, 70.00 785.00 x 600.00)28 (coverage rect 0.00, 0.00 1570.00 x 1800.00) 29 29 (intersects coverage rect 1) 30 30 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt
r183301 r183354 27 27 (contentsOpaque 1) 28 28 (visible rect 0.00, 70.00 785.00 x 585.00) 29 (coverage rect 0.00, 70.00 785.00 x 585.00)29 (coverage rect 0.00, 0.00 1570.00 x 1755.00) 30 30 (intersects coverage rect 1) 31 31 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt
r183301 r183354 28 28 (contentsOpaque 1) 29 29 (visible rect 0.00, 70.00 785.00 x 585.00) 30 (coverage rect 0.00, 70.00 785.00 x 585.00)30 (coverage rect 0.00, 0.00 1570.00 x 1755.00) 31 31 (intersects coverage rect 1) 32 32 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt
r183301 r183354 28 28 (contentsOpaque 1) 29 29 (visible rect 0.00, 0.00 785.00 x 585.00) 30 (coverage rect 0.00, 0.00 785.00 x 585.00)30 (coverage rect 0.00, 0.00 1570.00 x 1755.00) 31 31 (intersects coverage rect 1) 32 32 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt
r183301 r183354 29 29 (contentsOpaque 1) 30 30 (visible rect 0.00, 0.00 785.00 x 585.00) 31 (coverage rect 0.00, 0.00 785.00 x 585.00)31 (coverage rect 0.00, 0.00 1570.00 x 1755.00) 32 32 (intersects coverage rect 1) 33 33 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt
r183301 r183354 41 41 (transform [2.30 0.00 0.00 0.00] [0.00 2.30 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 42 42 (visible rect 0.00, 0.00 341.30 x 254.35) 43 (coverage rect 0.00, 0.00 785.00 x 585.00)43 (coverage rect 0.00, 0.00 341.30 x 254.35) 44 44 (intersects coverage rect 1) 45 45 (contentsScale 2.30) … … 53 53 (drawsContent 1) 54 54 (visible rect 4.00, 4.00 341.30 x 78.00) 55 (coverage rect 4.00, 4.00 785.00 x 585.00)55 (coverage rect 4.00, 4.00 341.30 x 254.35) 56 56 (intersects coverage rect 1) 57 57 (contentsScale 2.30) … … 62 62 (drawsContent 1) 63 63 (visible rect 0.00, 0.00 182.00 x 58.35) 64 (coverage rect -6.00, -196.00 785.00 x 585.00)64 (coverage rect -6.00, -196.00 341.30 x 254.35) 65 65 (intersects coverage rect 1) 66 66 (contentsScale 2.30) … … 71 71 (drawsContent 1) 72 72 (visible rect 0.00, 0.00 0.00 x 0.00) 73 (coverage rect -597.00, -196.00 785.00 x 585.00)74 (intersects coverage rect 1)73 (coverage rect -597.00, -196.00 341.30 x 254.35) 74 (intersects coverage rect 0) 75 75 (contentsScale 2.30) 76 76 ) … … 80 80 (drawsContent 1) 81 81 (visible rect 0.00, 0.00 0.00 x 0.00) 82 (coverage rect 4.00, -497.00 785.00 x 585.00)83 (intersects coverage rect 1)82 (coverage rect 4.00, -497.00 341.30 x 254.35) 83 (intersects coverage rect 0) 84 84 (contentsScale 2.30) 85 85 ) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles-expected.txt
r183301 r183354 11 11 (contentsOpaque 1) 12 12 (visible rect 0.00, 0.00 785.00 x 585.00) 13 (coverage rect 0.00, 0.00 785.00 x 585.00)13 (coverage rect -512.00, -512.00 1809.00 x 1609.00) 14 14 (intersects coverage rect 1) 15 15 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt
r183301 r183354 13 13 (transform [1.70 0.00 0.00 0.00] [0.00 1.70 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 14 14 (visible rect 0.00, 0.00 461.76 x 344.12) 15 (coverage rect 0.00, 0.00 785.00 x 585.00)15 (coverage rect 0.00, 0.00 461.76 x 344.12) 16 16 (intersects coverage rect 1) 17 17 (contentsScale 1.70) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt
r183301 r183354 13 13 (contentsOpaque 1) 14 14 (visible rect 1000.00, 1000.00 785.00 x 585.00) 15 (coverage rect 1000.00, 1000.00 785.00 x 585.00)15 (coverage rect 607.50, 415.00 1570.00 x 1755.00) 16 16 (intersects coverage rect 1) 17 17 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt
r183301 r183354 13 13 (transform [2.30 0.00 0.00 0.00] [0.00 2.30 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 14 14 (visible rect 0.00, 0.00 341.30 x 254.35) 15 (coverage rect 0.00, 0.00 785.00 x 585.00)15 (coverage rect 0.00, 0.00 341.30 x 254.35) 16 16 (intersects coverage rect 1) 17 17 (contentsScale 2.30) -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt
r183301 r183354 13 13 (transform [2.30 0.00 0.00 0.00] [0.00 2.30 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 14 14 (visible rect 800.00, 1000.00 341.30 x 254.35) 15 (coverage rect 1840.00, 2300.00 785.00 x 585.00)16 (intersects coverage rect 0)15 (coverage rect 800.00, 1000.00 341.30 x 254.35) 16 (intersects coverage rect 1) 17 17 (contentsScale 2.30) 18 18 (tile cache coverage 667, 890 540 x 445) -
trunk/LayoutTests/platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt
r183300 r183354 41 41 (transform [0.17 0.00 -0.98 0.00] [0.00 1.00 0.00 0.00] [0.98 0.00 0.17 0.00] [0.00 0.00 0.00 1.00]) 42 42 (visible rect 0.00, 0.00 2800.00 x 300.00) 43 (coverage rect 0.00, 0.00 500.00 x 300.00)43 (coverage rect 0.00, 0.00 2800.00 x 300.00) 44 44 (intersects coverage rect 1) 45 45 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt
r183300 r183354 48 48 (transform [0.17 0.00 -0.98 0.00] [0.00 1.00 0.00 0.00] [0.98 0.00 0.17 0.00] [0.00 0.00 0.00 1.00]) 49 49 (visible rect 0.00, 0.00 2800.00 x 300.00) 50 (coverage rect -1562500.00, -1562500.00 1563571.88 x 1562694.63)50 (coverage rect 0.00, 0.00 2800.00 x 300.00) 51 51 (intersects coverage rect 1) 52 52 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt
r183300 r183354 13 13 (transform [1.60 0.00 0.00 0.00] [0.00 1.60 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00]) 14 14 (visible rect 0.00, 0.00 490.63 x 365.63) 15 (coverage rect 0.00, 0.00 785.00 x 585.00)15 (coverage rect 0.00, 0.00 490.63 x 365.63) 16 16 (intersects coverage rect 1) 17 17 (contentsScale 1.60) … … 23 23 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 24 24 (visible rect 0.00, 0.00 482.63 x 357.63) 25 (coverage rect 0.00, 0.00 785.00 x 585.00)25 (coverage rect -8.00, -8.00 490.63 x 365.63) 26 26 (intersects coverage rect 1) 27 27 (contentsScale 1.60) -
trunk/LayoutTests/platform/mac/compositing/visible-rect/2d-transformed-expected.txt
r183300 r183354 45 45 (transform [0.71 0.71 0.00 0.00] [-0.71 0.71 0.00 0.00] [0.00 0.00 1.00 0.00] [150.00 0.00 0.00 1.00]) 46 46 (visible rect 0.00, 0.00 200.00 x 200.00) 47 (coverage rect 0.00, 0.00 500.00 x 200.00)47 (coverage rect -147.49, -147.49 494.97 x 494.97) 48 48 (intersects coverage rect 1) 49 49 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac/compositing/visible-rect/3d-transformed-expected.txt
r183300 r183354 38 38 (transform [1.00 0.00 0.00 0.00] [0.00 0.71 0.71 0.00] [0.00 -0.71 0.71 0.00] [0.00 0.00 0.00 1.00]) 39 39 (visible rect 0.00, 0.00 220.62 x 218.46) 40 (coverage rect 0.00, 0.00 200.00 x 200.00)40 (coverage rect -6.51, -51.46 227.13 x 269.92) 41 41 (intersects coverage rect 1) 42 42 (contentsScale 1.00) … … 69 69 (transform [0.71 0.00 0.71 0.00] [0.00 1.00 0.00 0.00] [-0.71 0.00 0.71 0.00] [0.00 0.00 0.00 1.00]) 70 70 (visible rect 0.00, 0.00 218.46 x 220.62) 71 (coverage rect 0.00, 0.00 200.00 x 200.00)71 (coverage rect -51.46, -6.51 269.92 x 227.13) 72 72 (intersects coverage rect 1) 73 73 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac/compositing/visible-rect/clipped-by-viewport-expected.txt
r183300 r183354 21 21 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 22 22 (visible rect 100.00, 120.00 100.00 x 80.00) 23 (coverage rect 0.00,0.00 800.00 x 600.00)23 (coverage rect 100.00, 120.00 800.00 x 600.00) 24 24 (intersects coverage rect 1) 25 25 (contentsScale 1.00) … … 31 31 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 32 32 (visible rect 100.00, 0.00 100.00 x 200.00) 33 (coverage rect 0.00,0.00 800.00 x 600.00)33 (coverage rect 100.00, -200.00 800.00 x 600.00) 34 34 (intersects coverage rect 1) 35 35 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac/compositing/visible-rect/clipped-visible-rect-expected.txt
r183300 r183354 37 37 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 38 38 (visible rect 100.00, 0.00 100.00 x 200.00) 39 (coverage rect 0.00, 0.00 500.00 x 200.00)39 (coverage rect 100.00, 0.00 500.00 x 200.00) 40 40 (intersects coverage rect 1) 41 41 (contentsScale 1.00) … … 47 47 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 48 48 (visible rect 0.00, 0.00 200.00 x 200.00) 49 (coverage rect 0.00, 0.00 500.00 x 200.00)49 (coverage rect -150.00, 0.00 500.00 x 200.00) 50 50 (intersects coverage rect 1) 51 51 (contentsScale 1.00) … … 57 57 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 58 58 (visible rect 0.00, 0.00 100.00 x 200.00) 59 (coverage rect 0.00, 0.00 500.00 x 200.00)59 (coverage rect -400.00, 0.00 500.00 x 200.00) 60 60 (intersects coverage rect 1) 61 61 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac/compositing/visible-rect/iframe-and-layers-expected.txt
r183300 r183354 69 69 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 70 70 (visible rect 0.00, 0.00 100.00 x 127.00) 71 (coverage rect 0.00, 0.00 285.00 x 135.00)71 (coverage rect -8.00, -8.00 285.00 x 135.00) 72 72 (intersects coverage rect 1) 73 73 (contentsScale 1.00) … … 91 91 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 92 92 (visible rect 0.00, 0.00 200.00 x 200.00) 93 (coverage rect 0.00, 0.00 785.00 x 585.00)93 (coverage rect -8.00, -226.00 785.00 x 585.00) 94 94 (intersects coverage rect 1) 95 95 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt
r183300 r183354 22 22 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 23 23 (visible rect 2.00, 92.00 98.00 x 135.00) 24 (coverage rect 10.00, 100.00 285.00 x 135.00)24 (coverage rect 2.00, 92.00 285.00 x 135.00) 25 25 (intersects coverage rect 1) 26 26 (contentsScale 1.00) -
trunk/LayoutTests/platform/mac/compositing/visible-rect/scrolled-expected.txt
r183300 r183354 21 21 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00]) 22 22 (visible rect 17.00, 200.00 183.00 x 300.00) 23 (coverage rect 25.00, 200.00 785.00 x 585.00)23 (coverage rect 17.00, 200.00 785.00 x 585.00) 24 24 (intersects coverage rect 1) 25 25 (contentsScale 1.00) -
trunk/Source/WebCore/ChangeLog
r183350 r183354 1 2015-04-25 Simon Fraser <simon.fraser@apple.com> 2 3 Expand compositing coverage rect when scrolling and animating 4 https://bugs.webkit.org/show_bug.cgi?id=144214 5 rdar://problem/20695926 6 7 Reviewed by Darin Adler. 8 9 r183300 added a secondary rect that gets mapped through graphics layers during 10 layer flushing, which represents a rect, in layer coordinates, that represents 11 the portion of this layer that's visible in the viewport. 12 13 This patch extends that rect based on scrolling and animating, with the extended 14 coverage rect being mapped into descendants (where it's used to determine whether 15 they should detach their backing store). This required moving the responsibility for 16 extending the coverage rect from TileController (where it was used to compute 17 tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept 18 of coverage rect, and pushes it onto TileControllers. 19 20 Test: compositing/tiling/transform-origin-tiled.html 21 22 * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto 23 TiledBacking from outside; new functions reflect that. 24 * platform/graphics/ca/GraphicsLayerCA.cpp: 25 (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass 26 old visible rect to commitLayerChangesBeforeSublayers. 27 (WebCore::accumulatesTransform): 28 (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(), 29 then adjustCoverageRect() which adjusts for scrolling and animations. 30 (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the 31 TransformState, but we can only use this if mapping it through various transforms didn't clamp 32 it (which can happen with severe rotations in perspective). 33 (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing, 34 ask the TileController to do coverage adjustment (code which should move into here eventually). 35 For other tiled layers, do motion-based adjustment. This should really be done for all layers 36 (an animating non-tiled layer may contain a tiled layer). 37 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed 38 any more; layers only react to changed in coverage rect now. 39 (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the 40 coverage rect, here we push the new rect back into the TransformState so it will affect 41 descendants. 42 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): 43 (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go 44 hand-in-hand now. 45 (WebCore::GraphicsLayerCA::changeLayerTypeTo): 46 (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted. 47 (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted. 48 (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted. 49 * platform/graphics/ca/GraphicsLayerCA.h: 50 * platform/graphics/ca/TileController.cpp: 51 (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance 52 logging now. 53 (WebCore::TileController::setCoverageRect): 54 (WebCore::TileController::tilesWouldChangeForCoverageRect): 55 (WebCore::TileController::revalidateTiles): 56 (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect() 57 is called at the top of committing the owning layer, we haven't yet pushed a new size to the 58 underlying platform layer (which TileController::bounds() consults). 59 (WebCore::TileController::bounds): 60 (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the 61 underlying layer hasn't been updated yet. 62 (WebCore::TileController::didRevalidateTiles): 63 (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted. 64 * platform/graphics/ca/TileController.h: 65 * platform/graphics/ca/TileCoverageMap.cpp: 66 (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows 67 a dark blue outline for the coverage rect. 68 (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top 69 content inset is non-zero. 70 * platform/graphics/ca/TileCoverageMap.h: 71 * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now. 72 (WebCore::TileGrid::tilesWouldChangeForCoverageRect): 73 (WebCore::TileGrid::revalidateTiles): 74 (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted. 75 * platform/graphics/ca/TileGrid.h: 76 * platform/graphics/transforms/TransformState.cpp: 77 (WebCore::TransformState::operator=): 78 (WebCore::TransformState::mappedQuad): Pass direction into mapQuad(). 79 (WebCore::TransformState::mappedSecondaryQuad): Ditto. 80 (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller 81 to pass in a secondary quad, and get it mapped into the coordinate space of the last 82 "flattening" state (since the TransformState may have in-flight XY offset, or transform). 83 This mapping is achieved by re-using mapQuad(), but in the inverse direction. 84 (WebCore::TransformState::mapQuad): Make direction a parameter. 85 (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary 86 quad. Failure was detected by tests. 87 * platform/graphics/transforms/TransformState.h: 88 (WebCore::TransformState::isMappingSecondaryQuad): 89 (WebCore::TransformState::direction): 90 (WebCore::TransformState::inverseDirection): 91 (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted. 92 1 93 2015-04-25 Dan Bernstein <mitz@apple.com> 2 94 -
trunk/Source/WebCore/platform/graphics/TiledBacking.h
r183224 r183354 67 67 virtual void setVisibleRect(const FloatRect&) = 0; 68 68 virtual FloatRect visibleRect() const = 0; 69 virtual bool tilesWouldChangeForVisibleRect(const FloatRect&) const = 0; 69 70 virtual void setCoverageRect(const FloatRect&) = 0; 71 virtual FloatRect coverageRect() const = 0; 72 virtual bool tilesWouldChangeForCoverageRect(const FloatRect&) const = 0; 70 73 71 74 virtual void setTiledScrollingIndicatorPosition(const FloatPoint&) = 0; … … 88 91 virtual void setTileCoverage(TileCoverage) = 0; 89 92 virtual TileCoverage tileCoverage() const = 0; 93 94 virtual FloatRect computeTileCoverageRect(const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect) const = 0; 90 95 91 96 virtual IntSize tileSize() const = 0; -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r183302 r183354 1089 1089 1090 1090 FloatPoint offset = computePositionRelativeToBase(pageScaleFactor); 1091 commitLayerChangesBeforeSublayers(commitState, pageScaleFactor, offset , m_visibleRect);1091 commitLayerChangesBeforeSublayers(commitState, pageScaleFactor, offset); 1092 1092 commitLayerChangesAfterSublayers(commitState); 1093 1093 … … 1096 1096 } 1097 1097 1098 static inline bool accumulatesTransform(const GraphicsLayerCA& layer) 1099 { 1100 return layer.preserves3D() || (layer.parent() && layer.parent()->preserves3D()); 1101 } 1102 1098 1103 bool GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush(const TransformState& state) const 1099 1104 { … … 1102 1107 // This may be called at times when layout has not been updated, so we want to avoid calling out to the client 1103 1108 // for animating transforms. 1104 FloatRect newVisibleRect = computeVisibleRect(localState, 0); 1105 if (m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer) 1106 newVisibleRect = adjustTiledLayerVisibleRect(tiledBacking(), m_visibleRect, newVisibleRect, m_sizeAtLastVisibleRectUpdate, m_size); 1107 1108 if (newVisibleRect != m_visibleRect) { 1109 VisibleAndCoverageRects rects = computeVisibleAndCoverageRect(localState, accumulatesTransform(*this), 0); 1110 adjustCoverageRect(rects, m_visibleRect); 1111 1112 if (rects.coverageRect != m_coverageRect) { 1109 1113 if (TiledBacking* tiledBacking = this->tiledBacking()) { 1110 if (tiledBacking->tilesWouldChangeFor VisibleRect(newVisibleRect))1114 if (tiledBacking->tilesWouldChangeForCoverageRect(rects.coverageRect)) 1111 1115 return true; 1112 1116 } … … 1175 1179 } 1176 1180 1177 FloatRect GraphicsLayerCA::computeVisibleRect(TransformState& state, ComputeVisibleRectFlags flags) const 1178 { 1179 bool preserve3D = preserves3D() || (parent() ? parent()->preserves3D() : false); 1180 TransformState::TransformAccumulation accumulation = preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform; 1181 1181 GraphicsLayerCA::VisibleAndCoverageRects GraphicsLayerCA::computeVisibleAndCoverageRect(TransformState& state, bool preserves3D, ComputeVisibleRectFlags flags) const 1182 { 1182 1183 FloatPoint position = m_position; 1183 1184 client().customPositionForVisibleRectComputation(this, position); … … 1191 1192 1192 1193 bool applyWasClamped; 1194 TransformState::TransformAccumulation accumulation = preserves3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform; 1193 1195 state.applyTransform(layerTransform, accumulation, &applyWasClamped); 1194 1196 … … 1212 1214 state.flatten(); 1213 1215 state.setQuad(clipRectForSelf); 1214 if (state. lastPlanarSecondaryQuad()) {1216 if (state.isMappingSecondaryQuad()) { 1215 1217 FloatQuad secondaryQuad(clipRectForSelf); 1216 1218 state.setSecondaryQuad(&secondaryQuad); … … 1218 1220 } 1219 1221 1220 return clipRectForSelf; 1221 } 1222 1223 void GraphicsLayerCA::setVisibleAndCoverageRects(const FloatRect& visibleRect, const FloatRect& coverageRect) 1224 { 1225 bool visibleRectChanged = visibleRect != m_visibleRect; 1226 bool coverageRectChanged = coverageRect != m_coverageRect; 1222 FloatRect coverageRect = clipRectForSelf; 1223 std::unique_ptr<FloatQuad> quad = state.mappedSecondaryQuad(&mapWasClamped); 1224 if (quad && !mapWasClamped && !applyWasClamped) 1225 coverageRect = quad->boundingBox(); 1226 1227 return VisibleAndCoverageRects(clipRectForSelf, coverageRect); 1228 } 1229 1230 bool GraphicsLayerCA::adjustCoverageRect(VisibleAndCoverageRects& rects, const FloatRect& oldVisibleRect) const 1231 { 1232 FloatRect coverageRect = rects.coverageRect; 1233 1234 // FIXME: TileController's computeTileCoverageRect() code should move here, and we should unify these different 1235 // ways of computing coverage. 1236 switch (type()) { 1237 case Type::PageTiledBacking: 1238 coverageRect = tiledBacking()->computeTileCoverageRect(size(), oldVisibleRect, rects.visibleRect); 1239 break; 1240 case Type::Normal: 1241 if (m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer) 1242 coverageRect.unite(adjustTiledLayerVisibleRect(tiledBacking(), oldVisibleRect, rects.visibleRect, m_sizeAtLastCoverageRectUpdate, m_size)); 1243 break; 1244 default: 1245 break; 1246 } 1247 1248 if (rects.coverageRect == coverageRect) 1249 return false; 1250 1251 rects.coverageRect = coverageRect; 1252 return true; 1253 } 1254 1255 void GraphicsLayerCA::setVisibleAndCoverageRects(const VisibleAndCoverageRects& rects) 1256 { 1257 bool visibleRectChanged = rects.visibleRect != m_visibleRect; 1258 bool coverageRectChanged = rects.coverageRect != m_coverageRect; 1227 1259 if (!visibleRectChanged && !coverageRectChanged) 1228 1260 return; 1229 1261 1230 1262 if (visibleRectChanged) { 1231 m_uncommittedChanges |= VisibleRectChanged;1232 m_visibleRect = visibleRect;1263 m_uncommittedChanges |= CoverageRectChanged; 1264 m_visibleRect = rects.visibleRect; 1233 1265 1234 1266 if (GraphicsLayerCA* maskLayer = downcast<GraphicsLayerCA>(m_maskLayer)) { 1235 1267 // FIXME: this assumes that the mask layer has the same geometry as this layer (which is currently always true). 1236 maskLayer->m_uncommittedChanges |= VisibleRectChanged;1237 maskLayer->m_visibleRect = visibleRect;1268 maskLayer->m_uncommittedChanges |= CoverageRectChanged; 1269 maskLayer->m_visibleRect = rects.visibleRect; 1238 1270 } 1239 1271 } … … 1241 1273 if (coverageRectChanged) { 1242 1274 m_uncommittedChanges |= CoverageRectChanged; 1243 m_coverageRect = coverageRect;1275 m_coverageRect = rects.coverageRect; 1244 1276 1245 1277 // FIXME: we need to take reflections into account when determining whether this layer intersects the coverage rect. … … 1248 1280 if (GraphicsLayerCA* maskLayer = downcast<GraphicsLayerCA>(m_maskLayer)) { 1249 1281 maskLayer->m_uncommittedChanges |= CoverageRectChanged; 1250 maskLayer->m_coverageRect = coverageRect;1282 maskLayer->m_coverageRect = rects.coverageRect; 1251 1283 } 1252 1284 } … … 1260 1292 CommitState childCommitState = commitState; 1261 1293 bool affectedByTransformAnimation = commitState.ancestorHasTransformAnimation; 1262 1263 FloatRect visibleRect = computeVisibleRect(localState); 1264 FloatRect coverageRect = visibleRect; 1265 if (std::unique_ptr<FloatQuad> quad = localState.mappedSecondaryQuad()) 1266 coverageRect = quad->boundingBox(); 1267 1268 FloatRect oldVisibleRect = m_visibleRect; 1269 setVisibleAndCoverageRects(visibleRect, coverageRect); 1294 1295 bool accumulateTransform = accumulatesTransform(*this); 1296 VisibleAndCoverageRects rects = computeVisibleAndCoverageRect(localState, accumulateTransform); 1297 if (adjustCoverageRect(rects, m_visibleRect)) { 1298 if (state.isMappingSecondaryQuad()) { 1299 FloatQuad secondaryQuad(rects.coverageRect); 1300 localState.setLastPlanarSecondaryQuad(&secondaryQuad); 1301 } 1302 } 1303 setVisibleAndCoverageRects(rects); 1270 1304 1271 1305 #ifdef VISIBLE_TILE_WASH … … 1304 1338 baseRelativePosition += m_position; 1305 1339 1306 commitLayerChangesBeforeSublayers(childCommitState, pageScaleFactor, baseRelativePosition , oldVisibleRect);1340 commitLayerChangesBeforeSublayers(childCommitState, pageScaleFactor, baseRelativePosition); 1307 1341 1308 1342 if (isRunningTransformAnimation()) { … … 1312 1346 1313 1347 if (GraphicsLayerCA* maskLayer = downcast<GraphicsLayerCA>(m_maskLayer)) 1314 maskLayer->commitLayerChangesBeforeSublayers(childCommitState, pageScaleFactor, baseRelativePosition , oldVisibleRect);1348 maskLayer->commitLayerChangesBeforeSublayers(childCommitState, pageScaleFactor, baseRelativePosition); 1315 1349 1316 1350 const Vector<GraphicsLayer*>& childLayers = children(); … … 1387 1421 } 1388 1422 1389 void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState, float pageScaleFactor, const FloatPoint& positionRelativeToBase , const FloatRect& oldVisibleRect)1423 void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState, float pageScaleFactor, const FloatPoint& positionRelativeToBase) 1390 1424 { 1391 1425 TemporaryChange<bool> committingChangesChange(m_isCommittingChanges, true); … … 1487 1521 updateContentsScale(pageScaleFactor); 1488 1522 1489 if (m_uncommittedChanges & VisibleRectChanged)1490 updateVisibleRect(oldVisibleRect);1491 1492 1523 if (m_uncommittedChanges & CoverageRectChanged) 1493 update BackingStoreAttachment();1494 1495 if (m_uncommittedChanges & TilingAreaChanged) // Needs to happen after VisibleRectChanged, ContentsScaleChanged1524 updateCoverage(); 1525 1526 if (m_uncommittedChanges & TilingAreaChanged) // Needs to happen after CoverageRectChanged, ContentsScaleChanged 1496 1527 updateTiles(); 1497 1528 … … 1966 1997 } 1967 1998 1968 void GraphicsLayerCA::updateBackingStoreAttachment() 1969 { 1999 void GraphicsLayerCA::updateCoverage() 2000 { 2001 // FIXME: Need to set coverage on clone layers too. 2002 if (TiledBacking* backing = tiledBacking()) { 2003 backing->setVisibleRect(m_visibleRect); 2004 backing->setCoverageRect(m_coverageRect); 2005 } 2006 1970 2007 m_layer->setBackingStoreAttached(m_intersectsCoverageRect); 1971 2008 if (m_layerClones) { … … 1974 2011 it->value->setBackingStoreAttached(m_intersectsCoverageRect); 1975 2012 } 2013 2014 m_sizeAtLastCoverageRectUpdate = m_size; 1976 2015 } 1977 2016 … … 2089 2128 expandedRect.intersect(tiledBacking->boundsWithoutMargin()); 2090 2129 return expandedRect; 2091 }2092 2093 void GraphicsLayerCA::updateVisibleRect(const FloatRect& oldVisibleRect)2094 {2095 if (!m_layer->usesTiledBackingLayer())2096 return;2097 2098 FloatRect tileArea = m_visibleRect;2099 if (m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer)2100 tileArea = adjustTiledLayerVisibleRect(tiledBacking(), oldVisibleRect, tileArea, m_sizeAtLastVisibleRectUpdate, m_size);2101 2102 tiledBacking()->setVisibleRect(tileArea);2103 2104 m_sizeAtLastVisibleRectUpdate = m_size;2105 2130 } 2106 2131 … … 3313 3338 3314 3339 if (m_usingTiledBacking) 3315 m_uncommittedChanges |= VisibleRectChanged;3340 m_uncommittedChanges |= CoverageRectChanged; 3316 3341 3317 3342 #ifndef NDEBUG -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r183300 r183354 247 247 } 248 248 249 void commitLayerChangesBeforeSublayers(CommitState&, float pageScaleFactor, const FloatPoint& positionRelativeToBase , const FloatRect& oldVisibleRect);249 void commitLayerChangesBeforeSublayers(CommitState&, float pageScaleFactor, const FloatPoint& positionRelativeToBase); 250 250 void commitLayerChangesAfterSublayers(CommitState&); 251 251 … … 276 276 enum ComputeVisibleRectFlag { RespectAnimatingTransforms = 1 << 0 }; 277 277 typedef unsigned ComputeVisibleRectFlags; 278 FloatRect computeVisibleRect(TransformState&, ComputeVisibleRectFlags = RespectAnimatingTransforms) const; 278 279 struct VisibleAndCoverageRects { 280 FloatRect visibleRect; 281 FloatRect coverageRect; 282 283 VisibleAndCoverageRects(const FloatRect& visRect, const FloatRect& covRect) 284 : visibleRect(visRect) 285 , coverageRect(covRect) 286 { 287 } 288 }; 289 290 VisibleAndCoverageRects computeVisibleAndCoverageRect(TransformState&, bool accumulateTransform, ComputeVisibleRectFlags = RespectAnimatingTransforms) const; 291 bool adjustCoverageRect(VisibleAndCoverageRects&, const FloatRect& oldVisibleRect) const; 279 292 280 293 const FloatRect& visibleRect() const { return m_visibleRect; } 281 294 const FloatRect& coverageRect() const { return m_coverageRect; } 282 295 283 void setVisibleAndCoverageRects(const FloatRect& visibleRect, const FloatRect& coverageRect);296 void setVisibleAndCoverageRects(const VisibleAndCoverageRects&); 284 297 285 298 static FloatRect adjustTiledLayerVisibleRect(TiledBacking*, const FloatRect& oldVisibleRect, const FloatRect& newVisibleRect, const FloatSize& oldSize, const FloatSize& newSize); … … 364 377 void updateStructuralLayer(); 365 378 void updateDrawsContent(); 366 void update BackingStoreAttachment();379 void updateCoverage(); 367 380 void updateBackgroundColor(); 368 381 … … 379 392 void updateAcceleratesDrawing(); 380 393 void updateDebugBorder(); 381 void updateVisibleRect(const FloatRect& oldVisibleRect);382 394 void updateTiles(); 383 395 void updateContentsScale(float pageScaleFactor); … … 451 463 ContentsScaleChanged = 1LLU << 24, 452 464 ContentsVisibilityChanged = 1LLU << 25, 453 VisibleRectChanged = 1LLU << 26, 454 CoverageRectChanged = 1LLU << 27, 455 FiltersChanged = 1LLU << 28, 456 BackdropFiltersChanged = 1LLU << 29, 457 TilingAreaChanged = 1LLU << 30, 458 TilesAdded = 1LLU << 31, 459 DebugIndicatorsChanged = 1LLU << 32, 460 CustomAppearanceChanged = 1LLU << 33, 461 BlendModeChanged = 1LLU << 34, 462 ShapeChanged = 1LLU << 35, 463 WindRuleChanged = 1LLU << 36, 465 CoverageRectChanged = 1LLU << 26, 466 FiltersChanged = 1LLU << 27, 467 BackdropFiltersChanged = 1LLU << 28, 468 TilingAreaChanged = 1LLU << 29, 469 TilesAdded = 1LLU << 30, 470 DebugIndicatorsChanged = 1LLU << 31, 471 CustomAppearanceChanged = 1LLU << 32, 472 BlendModeChanged = 1LLU << 33, 473 ShapeChanged = 1LLU << 34, 474 WindRuleChanged = 1LLU << 35, 464 475 }; 465 476 typedef uint64_t LayerChangeFlags; … … 493 504 #endif 494 505 FloatRect m_visibleRect; 495 FloatSize m_sizeAtLast VisibleRectUpdate;506 FloatSize m_sizeAtLastCoverageRectUpdate; 496 507 497 508 FloatRect m_coverageRect; // Area for which we should maintain backing store, in the coordinate space of this layer. -
trunk/Source/WebCore/platform/graphics/ca/TileController.cpp
r183224 r183354 183 183 } 184 184 185 void TileController::setVisibleRect(const FloatRect& visibleRect) 185 void TileController::setVisibleRect(const FloatRect& rect) 186 { 187 m_visibleRect = rect; 188 } 189 190 void TileController::setCoverageRect(const FloatRect& rect) 186 191 { 187 192 ASSERT(owningGraphicsLayer()->isCommittingChanges()); 188 if (m_ visibleRect == visibleRect)189 return; 190 191 m_ visibleRect = visibleRect;193 if (m_coverageRect == rect) 194 return; 195 196 m_coverageRect = rect; 192 197 setNeedsRevalidateTiles(); 193 198 } 194 199 195 bool TileController::tilesWouldChangeFor VisibleRect(const FloatRect& newVisibleRect) const200 bool TileController::tilesWouldChangeForCoverageRect(const FloatRect& rect) const 196 201 { 197 202 if (bounds().isEmpty()) 198 203 return false; 199 return tileGrid().tilesWouldChangeForVisibleRect(newVisibleRect, m_visibleRect); 204 205 return tileGrid().tilesWouldChangeForCoverageRect(rect); 200 206 } 201 207 … … 257 263 ASSERT(owningGraphicsLayer()->isCommittingChanges()); 258 264 tileGrid().revalidateTiles(0); 259 m_visibleRectAtLastRevalidate = m_visibleRect;260 265 } 261 266 … … 283 288 } 284 289 290 IntRect TileController::boundsForSize(const FloatSize& size) const 291 { 292 IntPoint boundsOriginIncludingMargin(-leftMarginWidth(), -topMarginHeight()); 293 IntSize boundsSizeIncludingMargin = expandedIntSize(size); 294 boundsSizeIncludingMargin.expand(leftMarginWidth() + rightMarginWidth(), topMarginHeight() + bottomMarginHeight()); 295 296 return IntRect(boundsOriginIncludingMargin, boundsSizeIncludingMargin); 297 } 298 285 299 IntRect TileController::bounds() const 286 300 { 287 IntPoint boundsOriginIncludingMargin(-leftMarginWidth(), -topMarginHeight()); 288 IntSize boundsSizeIncludingMargin = expandedIntSize(m_tileCacheLayer->bounds().size()); 289 boundsSizeIncludingMargin.expand(leftMarginWidth() + rightMarginWidth(), topMarginHeight() + bottomMarginHeight()); 290 291 return IntRect(boundsOriginIncludingMargin, boundsSizeIncludingMargin); 301 return boundsForSize(m_tileCacheLayer->bounds().size()); 292 302 } 293 303 … … 304 314 } 305 315 306 FloatRect TileController::computeTileCoverageRect(const Float Rect& previousVisibleRect, const FloatRect& visibleRect) const316 FloatRect TileController::computeTileCoverageRect(const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect) const 307 317 { 308 318 // If the page is not in a window (for example if it's in a background tab), we limit the tile coverage rect to the visible rect. … … 347 357 } 348 358 349 IntSize contentSize = bounds().size(); 359 // Can't use m_tileCacheLayer->bounds() here, because the size of the underlying platform layer 360 // hasn't been updated for the current commit. 361 IntSize contentSize = expandedIntSize(newSize); 350 362 if (futureRect.maxX() > contentSize.width()) 351 363 futureRect.setX(contentSize.width() - futureRect.width()); … … 378 390 coverageHorizontalSize += leftMarginWidth() + rightMarginWidth(); 379 391 380 FloatRect coverageBounds = bounds(); 392 // Can't use m_tileCacheLayer->bounds() here, because the size of the underlying platform layer 393 // hasn't been updated for the current commit. 394 FloatRect coverageBounds = boundsForSize(newSize); 381 395 float coverageLeft = visibleRect.x() - (coverageHorizontalSize - visibleRect.width()) / 2; 382 396 coverageLeft = std::min(coverageLeft, coverageBounds.maxX() - coverageHorizontalSize); … … 428 442 void TileController::didRevalidateTiles() 429 443 { 430 m_visibleRectAtLastRevalidate = visibleRect();431 444 m_boundsAtLastRevalidate = bounds(); 432 445 -
trunk/Source/WebCore/platform/graphics/ca/TileController.h
r183173 r183354 80 80 81 81 virtual FloatRect visibleRect() const override { return m_visibleRect; } 82 virtual FloatRect coverageRect() const override { return m_coverageRect; } 82 83 83 84 unsigned blankPixelCount() const; … … 106 107 virtual int rightMarginWidth() const override; 107 108 virtual TileCoverage tileCoverage() const override { return m_tileCoverage; } 109 virtual FloatRect computeTileCoverageRect(const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect) const override; 108 110 virtual bool unparentsOffscreenTiles() const override { return m_unparentsOffscreenTiles; } 109 111 virtual bool scrollingPerformanceLoggingEnabled() const override { return m_scrollingPerformanceLoggingEnabled; } 110 112 111 FloatRect computeTileCoverageRect(const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect) const;112 113 113 IntRect boundsAtLastRevalidate() const { return m_boundsAtLastRevalidate; } 114 114 IntRect boundsAtLastRevalidateWithoutMargin() const; 115 FloatRect visibleRectAtLastRevalidate() const { return m_visibleRectAtLastRevalidate; }116 115 void didRevalidateTiles(); 117 116 … … 137 136 // TiledBacking member functions. 138 137 virtual void setVisibleRect(const FloatRect&) override; 139 virtual bool tilesWouldChangeForVisibleRect(const FloatRect&) const override; 138 virtual void setCoverageRect(const FloatRect&) override; 139 virtual bool tilesWouldChangeForCoverageRect(const FloatRect&) const override; 140 140 virtual void setTiledScrollingIndicatorPosition(const FloatPoint&) override; 141 141 virtual void setTopContentInset(float) override; … … 159 159 virtual float zoomedOutContentsScale() const override; 160 160 161 162 161 void tileRevalidationTimerFired(); 163 164 162 void setNeedsRevalidateTiles(); 163 164 IntRect boundsForSize(const FloatSize&) const; 165 165 166 166 PlatformCALayerClient* owningGraphicsLayer() const { return m_tileCacheLayer->owner(); } … … 174 174 175 175 IntSize m_tileSize; 176 FloatRect m_visibleRect; 177 FloatRect m_ visibleRectAtLastRevalidate;176 FloatRect m_visibleRect; // Only used for scroll performance logging. 177 FloatRect m_coverageRect; 178 178 IntRect m_boundsAtLastRevalidate; 179 179 -
trunk/Source/WebCore/platform/graphics/ca/TileCoverageMap.cpp
r175583 r183354 37 37 , m_layer(*controller.rootLayer().createCompatibleLayer(PlatformCALayer::LayerTypeSimpleLayer, this)) 38 38 , m_visibleRectIndicatorLayer(*controller.rootLayer().createCompatibleLayer(PlatformCALayer::LayerTypeLayer, nullptr)) 39 , m_coverageRectIndicatorLayer(*controller.rootLayer().createCompatibleLayer(PlatformCALayer::LayerTypeLayer, nullptr)) 39 40 , m_position(FloatPoint(0, controller.topContentInset())) 40 41 { … … 45 46 m_layer.get().setPosition(FloatPoint(2, 2)); 46 47 m_layer.get().setContentsScale(m_controller.deviceScaleFactor()); 48 47 49 m_visibleRectIndicatorLayer.get().setBorderWidth(2); 48 50 m_visibleRectIndicatorLayer.get().setAnchorPoint(FloatPoint3D()); 49 51 m_visibleRectIndicatorLayer.get().setBorderColor(Color(255, 0, 0)); 52 53 m_coverageRectIndicatorLayer.get().setBorderWidth(2); 54 m_coverageRectIndicatorLayer.get().setAnchorPoint(FloatPoint3D()); 55 m_coverageRectIndicatorLayer.get().setBorderColor(Color(0, 0, 128)); 50 56 57 m_layer.get().appendSublayer(m_coverageRectIndicatorLayer); 51 58 m_layer.get().appendSublayer(m_visibleRectIndicatorLayer); 52 59 … … 63 70 FloatRect containerBounds = m_controller.bounds(); 64 71 FloatRect visibleRect = m_controller.visibleRect(); 72 FloatRect coverageRect = m_controller.coverageRect(); 65 73 visibleRect.contract(4, 4); // Layer is positioned 2px from top and left edges. 66 74 … … 69 77 if (!containerBounds.isEmpty()) { 70 78 widthScale = std::min<float>(visibleRect.width() / containerBounds.width(), 0.1); 71 scale = std::min(widthScale, visibleRect.height() / containerBounds.height()); 79 float visibleHeight = visibleRect.height() - std::min(m_controller.topContentInset(), visibleRect.y()); 80 scale = std::min(widthScale, visibleHeight / containerBounds.height()); 72 81 } 73 82 74 83 float indicatorScale = scale * m_controller.tileGrid().scale(); 84 75 85 FloatRect mapBounds = containerBounds; 76 86 mapBounds.scale(indicatorScale, indicatorScale); … … 84 94 m_visibleRectIndicatorLayer->setPosition(visibleRect.location()); 85 95 m_visibleRectIndicatorLayer->setBounds(FloatRect(FloatPoint(), visibleRect.size())); 96 97 coverageRect.scale(indicatorScale, indicatorScale); 98 coverageRect.expand(2, 2); 99 m_coverageRectIndicatorLayer->setPosition(coverageRect.location()); 100 m_coverageRectIndicatorLayer->setBounds(FloatRect(FloatPoint(), coverageRect.size())); 86 101 87 102 Color visibleRectIndicatorColor; -
trunk/Source/WebCore/platform/graphics/ca/TileCoverageMap.h
r177786 r183354 66 66 Ref<PlatformCALayer> m_layer; 67 67 Ref<PlatformCALayer> m_visibleRectIndicatorLayer; 68 Ref<PlatformCALayer> m_coverageRectIndicatorLayer; 68 69 69 70 FloatPoint m_position; -
trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp
r183175 r183354 186 186 } 187 187 188 bool TileGrid::tilesWouldChangeForVisibleRect(const FloatRect& newVisibleRect, const FloatRect& oldVisibleRect) const 189 { 190 FloatRect visibleRect = newVisibleRect; 191 192 if (visibleRect.isEmpty()) 188 bool TileGrid::tilesWouldChangeForCoverageRect(const FloatRect& coverageRect) const 189 { 190 if (coverageRect.isEmpty()) 193 191 return false; 194 195 FloatRect currentTileCoverageRect = m_controller.computeTileCoverageRect(oldVisibleRect, newVisibleRect); 196 FloatRect scaledRect(currentTileCoverageRect); 192 193 FloatRect scaledRect(coverageRect); 197 194 scaledRect.scale(m_scale); 198 195 IntRect currentCoverageRectInTileCoords(enclosingIntRect(scaledRect)); … … 202 199 getTileIndexRangeForRect(currentCoverageRectInTileCoords, topLeft, bottomRight); 203 200 204 IntRect coverageRect = rectForTileIndex(topLeft);205 coverageRect.unite(rectForTileIndex(bottomRight));206 return coverageRect != m_primaryTileCoverageRect;201 IntRect tileCoverageRect = rectForTileIndex(topLeft); 202 tileCoverageRect.unite(rectForTileIndex(bottomRight)); 203 return tileCoverageRect != m_primaryTileCoverageRect; 207 204 } 208 205 … … 307 304 void TileGrid::revalidateTiles(TileValidationPolicy validationPolicy) 308 305 { 309 FloatRect visibleRect = m_controller.visibleRect();306 FloatRect coverageRect = m_controller.coverageRect(); 310 307 IntRect bounds = m_controller.bounds(); 311 308 312 if ( visibleRect.isEmpty() || bounds.isEmpty())309 if (coverageRect.isEmpty() || bounds.isEmpty()) 313 310 return; 314 311 315 FloatRect tileCoverageRect = m_controller.computeTileCoverageRect(m_controller.visibleRectAtLastRevalidate(), visibleRect); 316 FloatRect scaledRect(tileCoverageRect); 312 FloatRect scaledRect(coverageRect); 317 313 scaledRect.scale(m_scale); 318 314 IntRect coverageRectInTileCoords(enclosingIntRect(scaledRect)); … … 379 375 380 376 // Ensure primary tile coverage tiles. 381 m_primaryTileCoverageRect = ensureTilesForRect( tileCoverageRect, CoverageType::PrimaryTiles);377 m_primaryTileCoverageRect = ensureTilesForRect(coverageRect, CoverageType::PrimaryTiles); 382 378 383 379 if (validationPolicy & PruneSecondaryTiles) { -
trunk/Source/WebCore/platform/graphics/ca/TileGrid.h
r183175 r183354 74 74 void revalidateTiles(TileValidationPolicy); 75 75 76 bool tilesWouldChangeFor VisibleRect(const FloatRect& newVisibleRect, const FloatRect& oldVisibleRect) const;76 bool tilesWouldChangeForCoverageRect(const FloatRect&) const; 77 77 78 78 IntRect tileCoverageRect() const; -
trunk/Source/WebCore/platform/graphics/transforms/TransformState.cpp
r183274 r183354 42 42 else 43 43 m_lastPlanarSecondaryQuad = nullptr; 44 45 44 } 46 45 m_accumulatingTransform = other.m_accumulatingTransform; … … 181 180 182 181 FloatQuad quad = m_lastPlanarQuad; 183 mapQuad(quad, wasClamped);182 mapQuad(quad, m_direction, wasClamped); 184 183 return quad; 185 184 } … … 194 193 195 194 FloatQuad quad = *m_lastPlanarSecondaryQuad; 196 mapQuad(quad, wasClamped);195 mapQuad(quad, m_direction, wasClamped); 197 196 return std::make_unique<FloatQuad>(quad); 198 197 } 199 198 200 void TransformState::mapQuad(FloatQuad& quad, bool* wasClamped) const 201 { 202 quad.move((m_direction == ApplyTransformDirection) ? m_accumulatedOffset : -m_accumulatedOffset); 199 void TransformState::setLastPlanarSecondaryQuad(const FloatQuad* quad) 200 { 201 if (!quad) { 202 m_lastPlanarSecondaryQuad = nullptr; 203 return; 204 } 205 206 // Map the quad back through any transform or offset back into the last flattening coordinate space. 207 FloatQuad backMappedQuad(*quad); 208 mapQuad(backMappedQuad, inverseDirection()); 209 m_lastPlanarSecondaryQuad = std::make_unique<FloatQuad>(backMappedQuad); 210 } 211 212 void TransformState::mapQuad(FloatQuad& quad, TransformDirection direction, bool* wasClamped) const 213 { 214 quad.move((direction == ApplyTransformDirection) ? m_accumulatedOffset : -m_accumulatedOffset); 203 215 if (!m_accumulatedTransform) 204 216 return; 205 217 206 if ( m_direction == ApplyTransformDirection)218 if (direction == ApplyTransformDirection) 207 219 quad = m_accumulatedTransform->mapQuad(quad); 208 220 … … 215 227 if (m_mapPoint) 216 228 m_lastPlanarPoint = t.mapPoint(m_lastPlanarPoint); 217 if (m_mapQuad) 229 if (m_mapQuad) { 218 230 m_lastPlanarQuad = t.mapQuad(m_lastPlanarQuad); 231 if (m_lastPlanarSecondaryQuad) 232 *m_lastPlanarSecondaryQuad = t.mapQuad(*m_lastPlanarSecondaryQuad); 233 } 234 219 235 } else { 220 236 TransformationMatrix inverseTransform = t.inverse(); 221 237 if (m_mapPoint) 222 238 m_lastPlanarPoint = inverseTransform.projectPoint(m_lastPlanarPoint); 223 if (m_mapQuad) 239 if (m_mapQuad) { 224 240 m_lastPlanarQuad = inverseTransform.projectQuad(m_lastPlanarQuad, wasClamped); 241 if (m_lastPlanarSecondaryQuad) 242 *m_lastPlanarSecondaryQuad = inverseTransform.projectQuad(*m_lastPlanarSecondaryQuad, wasClamped); 243 } 225 244 } 226 245 -
trunk/Source/WebCore/platform/graphics/transforms/TransformState.h
r183274 r183354 80 80 } 81 81 82 // FIXME: webkit.org/b/144226 use Optional<FloatQuad>. 82 83 void setSecondaryQuad(const FloatQuad* quad) 83 84 { … … 89 90 m_lastPlanarSecondaryQuad = nullptr; 90 91 } 92 93 // FIXME: webkit.org/b/144226 use Optional<FloatQuad>. 94 void setLastPlanarSecondaryQuad(const FloatQuad*); 91 95 92 96 void move(LayoutUnit x, LayoutUnit y, TransformAccumulation accumulate = FlattenTransform) … … 104 108 FloatQuad lastPlanarQuad() const { return m_lastPlanarQuad; } 105 109 FloatQuad* lastPlanarSecondaryQuad() const { return m_lastPlanarSecondaryQuad.get(); } 110 bool isMappingSecondaryQuad() const { return m_lastPlanarSecondaryQuad.get(); } 106 111 107 112 // Return the point or quad mapped through the current transform … … 116 121 void applyAccumulatedOffset(); 117 122 118 void mapQuad(FloatQuad&, bool* clamped) const; 123 TransformDirection direction() const { return m_direction; } 124 TransformDirection inverseDirection() const; 125 126 void mapQuad(FloatQuad&, TransformDirection, bool* clamped = nullptr) const; 119 127 120 128 FloatPoint m_lastPlanarPoint; … … 131 139 }; 132 140 141 inline TransformState::TransformDirection TransformState::inverseDirection() const 142 { 143 return m_direction == ApplyTransformDirection ? UnapplyInverseTransformDirection : ApplyTransformDirection; 144 } 145 133 146 } // namespace WebCore 134 147
Note:
See TracChangeset
for help on using the changeset viewer.