Changeset 158889 in webkit
- Timestamp:
- Nov 7, 2013 5:42:59 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r158877 r158889 1 2013-11-07 Simon Fraser <simon.fraser@apple.com> 2 3 Lots of layers get solid color but transparent contents layers now 4 https://bugs.webkit.org/show_bug.cgi?id=123537 5 6 Reviewed by Tim Horton. 7 8 We call rendererBackgroundColor() to determine the layer's background color, 9 but on most elements this returns the transparent color (a valid color). 10 This caused us to allocate a contentsLayer, and use the transparent color as its 11 backgroundColor, which was wasteful. 12 13 Fix by only making a background-color layer if the color is not transparent (zero alpha). 14 15 Also avoid making a new contents layer on every color change, and make sure that 16 we don't do implicit animations for backgroundColor, and some other properties 17 that were omitted by mistake. 18 19 Layer tree dumps don't dump content layers, so no way to test easily. 20 21 * platform/graphics/ca/GraphicsLayerCA.cpp: 22 (WebCore::GraphicsLayerCA::setContentsToSolidColor): 23 * platform/graphics/ca/mac/PlatformCALayerMac.mm: 24 (nullActionsDictionary): 25 1 26 2013-11-07 Ryosuke Niwa <rniwa@webkit.org> 2 27 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r158859 r158889 819 819 820 820 m_contentsSolidColor = color; 821 822 if (m_contentsSolidColor.isValid()) { 823 m_contentsLayerPurpose = ContentsLayerForBackgroundColor; 824 m_contentsLayer = createPlatformCALayer(PlatformCALayer::LayerTypeLayer, this); 821 822 bool contentsLayerChanged = false; 823 824 if (m_contentsSolidColor.isValid() && m_contentsSolidColor.alpha()) { 825 if (!m_contentsLayer || m_contentsLayerPurpose != ContentsLayerForBackgroundColor) { 826 m_contentsLayerPurpose = ContentsLayerForBackgroundColor; 827 m_contentsLayer = createPlatformCALayer(PlatformCALayer::LayerTypeLayer, this); 825 828 #ifndef NDEBUG 826 m_contentsLayer->setName("Background Color Layer");829 m_contentsLayer->setName("Background Color Layer"); 827 830 #endif 831 contentsLayerChanged = true; 832 } 828 833 } else { 834 contentsLayerChanged = m_contentsLayer; 829 835 m_contentsLayerPurpose = NoContentsLayer; 830 836 m_contentsLayer = 0; 831 837 } 832 838 833 noteSublayersChanged(); 839 if (contentsLayerChanged) 840 noteSublayersChanged(); 841 834 842 noteLayerPropertyChanged(ContentsColorLayerChanged); 835 843 } -
trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
r158619 r158889 148 148 nullValue, @"anchorPoint", 149 149 nullValue, @"anchorPointZ", 150 nullValue, @"backgroundColor", 151 nullValue, @"borderColor", 152 nullValue, @"borderWidth", 150 153 nullValue, @"bounds", 151 154 nullValue, @"contents", 152 155 nullValue, @"contentsRect", 156 nullValue, @"contentsScale", 157 nullValue, @"cornerRadius", 153 158 nullValue, @"opacity", 154 159 nullValue, @"position", -
trunk/Source/WebKit2/ChangeLog
r158880 r158889 1 2013-11-07 Simon Fraser <simon.fraser@apple.com> 2 3 Lots of layers get solid color but transparent contents layers now 4 https://bugs.webkit.org/show_bug.cgi?id=123537 5 6 Reviewed by Tim Horton. 7 8 Add some properties to the list of things not to implicitly animate. 9 10 * Shared/mac/RemoteLayerTreePropertyApplier.mm: 11 (WebKit::RemoteLayerTreePropertyApplier::disableActionsForLayer): 12 1 13 2013-11-07 Anders Carlsson <andersca@apple.com> 2 14 -
trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm
r158691 r158889 162 162 @"anchorPoint" : nullValue, 163 163 @"anchorPointZ" : nullValue, 164 @"backgroundColor" : nullValue, 165 @"borderColor" : nullValue, 166 @"borderWidth" : nullValue, 164 167 @"bounds" : nullValue, 165 168 @"contents" : nullValue, 166 169 @"contentsRect" : nullValue, 170 @"contentsScale" : nullValue, 171 @"cornerRadius" : nullValue, 167 172 @"opacity" : nullValue, 168 173 @"position" : nullValue,
Note: See TracChangeset
for help on using the changeset viewer.