Changeset 234849 in webkit
- Timestamp:
- Aug 14, 2018 9:48:45 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r234816 r234849 1 2018-08-14 Antti Koivisto <antti@apple.com> 2 3 RemoteLayerTreeTransaction should use OptionSet for change flags 4 https://bugs.webkit.org/show_bug.cgi?id=188547 5 6 Reviewed by Simon Fraser. 7 8 * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm: 9 (WebKit::RemoteLayerTreePropertyApplier::applyProperties): 10 * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h: 11 (WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged): 12 (WebKit::RemoteLayerTreeTransaction::LayerProperties::resetChangedProperties): 13 14 Also remove unused everChangedProperties. 15 16 * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: 17 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): 18 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode const): 19 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): 20 * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp: 21 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): 22 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: 23 (WebKit::RemoteLayerTreeDrawingArea::flushLayers): 24 1 25 2018-08-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 26 -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm
r234393 r234849 333 333 } 334 334 335 if (properties.changedProperties & (RemoteLayerTreeTransaction::ContentsHiddenChanged | RemoteLayerTreeTransaction::UserInteractionEnabledChanged))335 if (properties.changedProperties.containsAny({ RemoteLayerTreeTransaction::ContentsHiddenChanged, RemoteLayerTreeTransaction::UserInteractionEnabledChanged })) 336 336 view.userInteractionEnabled = !properties.contentsHidden && properties.userInteractionEnabled; 337 337 -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h
r233781 r234849 55 55 class RemoteLayerTreeTransaction { 56 56 public: 57 enum LayerChanges { 58 NoChange = 0, 57 enum LayerChange { 59 58 NameChanged = 1LLU << 1, 60 59 ChildrenChanged = 1LLU << 2, … … 95 94 UserInteractionEnabledChanged = 1LLU << 37, 96 95 }; 97 typedef uint64_t LayerChange;98 96 99 97 struct LayerCreationProperties { … … 117 115 static bool decode(IPC::Decoder&, LayerProperties&); 118 116 119 void notePropertiesChanged( LayerChangechangeFlags)117 void notePropertiesChanged(OptionSet<LayerChange> changeFlags) 120 118 { 121 119 changedProperties |= changeFlags; 122 everChangedProperties |= changeFlags;123 120 } 124 121 125 122 void resetChangedProperties() 126 123 { 127 changedProperties = RemoteLayerTreeTransaction::NoChange;124 changedProperties = { }; 128 125 } 129 126 130 LayerChange changedProperties; 131 LayerChange everChangedProperties; 127 OptionSet<LayerChange> changedProperties; 132 128 133 129 String name; -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm
r234610 r234849 76 76 77 77 RemoteLayerTreeTransaction::LayerProperties::LayerProperties() 78 : changedProperties(NoChange) 79 , everChangedProperties(NoChange) 80 , anchorPoint(0.5, 0.5, 0) 78 : anchorPoint(0.5, 0.5, 0) 81 79 , contentsRect(FloatPoint(), FloatSize(1, 1)) 82 80 , maskLayerID(0) … … 109 107 RemoteLayerTreeTransaction::LayerProperties::LayerProperties(const LayerProperties& other) 110 108 : changedProperties(other.changedProperties) 111 , everChangedProperties(other.everChangedProperties)112 109 , name(other.name) 113 110 , children(other.children) … … 159 156 void RemoteLayerTreeTransaction::LayerProperties::encode(IPC::Encoder& encoder) const 160 157 { 161 encoder.encode Enum(changedProperties);158 encoder.encode(changedProperties); 162 159 163 160 if (changedProperties & NameChanged) … … 281 278 bool RemoteLayerTreeTransaction::LayerProperties::decode(IPC::Decoder& decoder, LayerProperties& result) 282 279 { 283 if (!decoder.decode Enum(result.changedProperties))280 if (!decoder.decode(result.changedProperties)) 284 281 return false; 285 282 -
trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp
r234393 r234849 155 155 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged); 156 156 157 if (m_properties.changedProperties != RemoteLayerTreeTransaction::NoChange) {157 if (m_properties.changedProperties) { 158 158 if (m_properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) { 159 159 m_properties.children.resize(m_children.size()); -
trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
r233872 r234849 398 398 Vector<RetainPtr<CGContextRef>> contextsToFlush; 399 399 for (auto& layer : layerTransaction.changedLayers()) { 400 if (layer->properties().changedProperties & RemoteLayerTreeTransaction:: LayerChanges::BackingStoreChanged) {400 if (layer->properties().changedProperties & RemoteLayerTreeTransaction::BackingStoreChanged) { 401 401 hadAnyChangedBackingStore = true; 402 402 if (layer->properties().backingStore) {
Note: See TracChangeset
for help on using the changeset viewer.