Bug 119772 - [Windows] Windows is incorrectly using a LayerTypeTiledBackingLayer
Summary: [Windows] Windows is incorrectly using a LayerTypeTiledBackingLayer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-13 15:01 PDT by Brent Fulgham
Modified: 2013-08-14 11:53 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.73 KB, patch)
2013-08-13 15:05 PDT, Brent Fulgham
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2013-08-13 15:01:13 PDT
Windows needs to use tiled layers when rendering elements grow beyond a certain size. However, Windows only knows how to work with LayerTypeWebTiledLayer. Code changes in the CoreGraphics/CoreAnimation logic caused Windows to be given a LayerTypeTiledBackingLayer layer type, which it could not construct.  Consequently, rendering of certain large content (specifically captions in full screen mode) were not being drawn.

The fix is to protect Windows from being asked to use a LayerTypeTiledBackingLayer (or LayerTypePageTiledBackingLayer), and instead use the LayerTypeWebTiledLayer type.
Comment 1 Brent Fulgham 2013-08-13 15:05:06 PDT
Created attachment 208681 [details]
Patch
Comment 2 Simon Fraser (smfr) 2013-08-13 15:29:20 PDT
Comment on attachment 208681 [details]
Patch

r+ but it would be nice to re-enable the tests that should have caught this failure.
Comment 3 Brent Fulgham 2013-08-13 16:31:26 PDT
rfong and I have a separate task to clean up the various skipped tests on Windows. The tiling tests will get picked up as part of that.
Comment 4 Brent Fulgham 2013-08-13 16:35:50 PDT
Committed r154030: <http://trac.webkit.org/changeset/154030>
Comment 5 Darin Adler 2013-08-14 10:22:50 PDT
Comment on attachment 208681 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=208681&action=review

> Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp:119
> +        ASSERT((layerType != LayerTypeTiledBackingLayer) && (layerType != LayerTypePageTiledBackingLayer));

These should be two separate assertions. That way you can tell, if the assertion fires, which bad layer type you are dealing with.
Comment 6 Eric Carlson 2013-08-14 11:53:44 PDT
Comment on attachment 208681 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=208681&action=review

> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:2689
> +#if PLATFORM(WIN)
> +    PlatformCALayer::LayerType layerType = useTiledLayer ? PlatformCALayer::LayerTypeWebTiledLayer : PlatformCALayer::LayerTypeWebLayer;
> +#else
> +    PlatformCALayer::LayerType layerType = useTiledLayer ? PlatformCALayer::LayerTypeTiledBackingLayer : PlatformCALayer::LayerTypeWebLayer;
> +#endif
> +
> +    m_layer = PlatformCALayer::create(layerType, this);

Finding this would have been much easier if we had an ASSERT() when PlatformCALayer::create() fails (or a Log() it happens frequently).