WebKit Bugzilla
Attachment 347066 Details for
Bug 188547
: RemoteLayerTreeTransaction should use OptionSet for change flags
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
optionset-layertreetransaction.patch (text/plain), 7.62 KB, created by
Antti Koivisto
on 2018-08-14 03:48:46 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2018-08-14 03:48:46 PDT
Size:
7.62 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 234842) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,27 @@ >+2018-08-14 Antti Koivisto <antti@apple.com> >+ >+ RemoteLayerTreeTransaction should use OptionSet for change flags >+ https://bugs.webkit.org/show_bug.cgi?id=188547 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm: >+ (WebKit::RemoteLayerTreePropertyApplier::applyProperties): >+ * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h: >+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged): >+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::resetChangedProperties): >+ >+ Also remove unused everChangedProperties. >+ >+ * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: >+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): >+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode const): >+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): >+ * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp: >+ (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): >+ * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: >+ (WebKit::RemoteLayerTreeDrawingArea::flushLayers): >+ > 2018-08-13 Wenson Hsieh <wenson_hsieh@apple.com> > > [WK2] [macOS] Implement a mechanism to test drag and drop >Index: Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm >=================================================================== >--- Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm (revision 234841) >+++ Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm (working copy) >@@ -332,7 +332,7 @@ void RemoteLayerTreePropertyApplier::app > } > } > >- if (properties.changedProperties & (RemoteLayerTreeTransaction::ContentsHiddenChanged | RemoteLayerTreeTransaction::UserInteractionEnabledChanged)) >+ if (properties.changedProperties.containsAny({ RemoteLayerTreeTransaction::ContentsHiddenChanged, RemoteLayerTreeTransaction::UserInteractionEnabledChanged })) > view.userInteractionEnabled = !properties.contentsHidden && properties.userInteractionEnabled; > > END_BLOCK_OBJC_EXCEPTIONS; >Index: Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h >=================================================================== >--- Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h (revision 234841) >+++ Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h (working copy) >@@ -54,8 +54,7 @@ class PlatformCALayerRemote; > > class RemoteLayerTreeTransaction { > public: >- enum LayerChanges { >- NoChange = 0, >+ enum LayerChange { > NameChanged = 1LLU << 1, > ChildrenChanged = 1LLU << 2, > PositionChanged = 1LLU << 3, >@@ -94,7 +93,6 @@ public: > CustomAppearanceChanged = 1LLU << 36, > UserInteractionEnabledChanged = 1LLU << 37, > }; >- typedef uint64_t LayerChange; > > struct LayerCreationProperties { > LayerCreationProperties(); >@@ -116,19 +114,17 @@ public: > void encode(IPC::Encoder&) const; > static bool decode(IPC::Decoder&, LayerProperties&); > >- void notePropertiesChanged(LayerChange changeFlags) >+ void notePropertiesChanged(OptionSet<LayerChange> changeFlags) > { > changedProperties |= changeFlags; >- everChangedProperties |= changeFlags; > } > > void resetChangedProperties() > { >- changedProperties = RemoteLayerTreeTransaction::NoChange; >+ changedProperties = { }; > } > >- LayerChange changedProperties; >- LayerChange everChangedProperties; >+ OptionSet<LayerChange> changedProperties; > > String name; > std::unique_ptr<WebCore::TransformationMatrix> transform; >Index: Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm >=================================================================== >--- Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm (revision 234841) >+++ Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm (working copy) >@@ -75,9 +75,7 @@ auto RemoteLayerTreeTransaction::LayerCr > } > > RemoteLayerTreeTransaction::LayerProperties::LayerProperties() >- : changedProperties(NoChange) >- , everChangedProperties(NoChange) >- , anchorPoint(0.5, 0.5, 0) >+ : anchorPoint(0.5, 0.5, 0) > , contentsRect(FloatPoint(), FloatSize(1, 1)) > , maskLayerID(0) > , clonedLayerID(0) >@@ -108,7 +106,6 @@ RemoteLayerTreeTransaction::LayerPropert > > RemoteLayerTreeTransaction::LayerProperties::LayerProperties(const LayerProperties& other) > : changedProperties(other.changedProperties) >- , everChangedProperties(other.everChangedProperties) > , name(other.name) > , children(other.children) > , addedAnimations(other.addedAnimations) >@@ -158,7 +155,7 @@ RemoteLayerTreeTransaction::LayerPropert > > void RemoteLayerTreeTransaction::LayerProperties::encode(IPC::Encoder& encoder) const > { >- encoder.encodeEnum(changedProperties); >+ encoder.encode(changedProperties); > > if (changedProperties & NameChanged) > encoder << name; >@@ -280,7 +277,7 @@ void RemoteLayerTreeTransaction::LayerPr > > bool RemoteLayerTreeTransaction::LayerProperties::decode(IPC::Decoder& decoder, LayerProperties& result) > { >- if (!decoder.decodeEnum(result.changedProperties)) >+ if (!decoder.decode(result.changedProperties)) > return false; > > if (result.changedProperties & NameChanged) { >Index: Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp (revision 234841) >+++ Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp (working copy) >@@ -154,7 +154,7 @@ void PlatformCALayerRemote::recursiveBui > if (m_properties.backingStore && m_properties.backingStoreAttached && m_properties.backingStore->display()) > m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged); > >- if (m_properties.changedProperties != RemoteLayerTreeTransaction::NoChange) { >+ if (m_properties.changedProperties) { > if (m_properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) { > m_properties.children.resize(m_children.size()); > for (size_t i = 0; i < m_children.size(); ++i) >Index: Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm >=================================================================== >--- Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm (revision 234841) >+++ Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm (working copy) >@@ -397,7 +397,7 @@ void RemoteLayerTreeDrawingArea::flushLa > bool hadAnyChangedBackingStore = false; > Vector<RetainPtr<CGContextRef>> contextsToFlush; > for (auto& layer : layerTransaction.changedLayers()) { >- if (layer->properties().changedProperties & RemoteLayerTreeTransaction::LayerChanges::BackingStoreChanged) { >+ if (layer->properties().changedProperties & RemoteLayerTreeTransaction::BackingStoreChanged) { > hadAnyChangedBackingStore = true; > if (layer->properties().backingStore) { > if (auto contextPendingFlush = layer->properties().backingStore->takeFrontContextPendingFlush())
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 188547
: 347066