Changeset 276154 in webkit
- Timestamp:
- Apr 16, 2021, 12:22:56 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/HashTable.h (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/inspector/agents/InspectorAnimationAgent.cpp (modified) (2 diffs)
-
WebCore/inspector/agents/InspectorAnimationAgent.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r276152 r276154 1 2021-04-16 Alex Christensen <achristensen@webkit.org> 2 3 Reduce maximum HashTable entry size to 128 bytes 4 https://bugs.webkit.org/show_bug.cgi?id=224381 5 6 Reviewed by Yusuke Suzuki. 7 8 * wtf/HashTable.h: 9 (WTF::KeyTraits>::inlineLookup): 10 1 11 2021-04-16 Tyler Wilcock <twilco.o@protonmail.com> 2 12 -
trunk/Source/WTF/wtf/HashTable.h
r275954 r276154 666 666 ALWAYS_INLINE auto HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::inlineLookup(const T& key) -> ValueType* 667 667 { 668 static_assert(sizeof(Value) <= 250, "Your HashTable types are too big to efficiently move when rehashing. Consider using UniqueRef instead");668 static_assert(sizeof(Value) <= 128, "Your HashTable types are too big to efficiently move when rehashing. Consider using UniqueRef instead"); 669 669 checkKey<HashTranslator>(key); 670 670 -
trunk/Source/WebCore/ChangeLog
r276152 r276154 1 2021-04-16 Alex Christensen <achristensen@webkit.org> 2 3 Reduce maximum HashTable entry size to 128 bytes 4 https://bugs.webkit.org/show_bug.cgi?id=224381 5 6 Reviewed by Yusuke Suzuki. 7 8 * inspector/agents/InspectorAnimationAgent.cpp: 9 (WebCore::InspectorAnimationAgent::willApplyKeyframeEffect): 10 (WebCore::InspectorAnimationAgent::stopTrackingDeclarativeAnimation): 11 * inspector/agents/InspectorAnimationAgent.h: 12 1 13 2021-04-16 Tyler Wilcock <twilco.o@protonmail.com> 2 14 -
trunk/Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp
r268700 r276154 379 379 return; 380 380 381 auto ensureResult = m_trackedDeclarativeAnimationData.ensure(downcast<DeclarativeAnimation>(animation), [&] () -> TrackedDeclarativeAnimationData{382 return { makeString("animation:"_s, IdentifiersFactory::createIdentifier()), computedTiming };381 auto ensureResult = m_trackedDeclarativeAnimationData.ensure(downcast<DeclarativeAnimation>(animation), [&] () -> UniqueRef<TrackedDeclarativeAnimationData> { 382 return makeUniqueRef<TrackedDeclarativeAnimationData>(TrackedDeclarativeAnimationData { makeString("animation:"_s, IdentifiersFactory::createIdentifier()), computedTiming }); 383 383 }); 384 auto& trackingData = ensureResult.iterator->value ;384 auto& trackingData = ensureResult.iterator->value.get(); 385 385 386 386 Optional<Protocol::Animation::AnimationState> animationAnimationState; … … 601 601 void InspectorAnimationAgent::stopTrackingDeclarativeAnimation(DeclarativeAnimation& animation) 602 602 { 603 auto it = m_trackedDeclarativeAnimationData.find(&animation);604 if ( it == m_trackedDeclarativeAnimationData.end())605 return; 606 607 if ( it->value.lastComputedTiming.phase != AnimationEffectPhase::After && it->value.lastComputedTiming.phase != AnimationEffectPhase::Idle) {603 auto data = m_trackedDeclarativeAnimationData.take(&animation); 604 if (!data) 605 return; 606 607 if (data->lastComputedTiming.phase != AnimationEffectPhase::After && data->lastComputedTiming.phase != AnimationEffectPhase::Idle) { 608 608 auto event = Protocol::Animation::TrackingUpdate::create() 609 .setTrackingAnimationId( it->value.trackingAnimationId)609 .setTrackingAnimationId(data->trackingAnimationId) 610 610 .setAnimationState(Protocol::Animation::AnimationState::Canceled) 611 611 .release(); 612 612 m_frontendDispatcher->trackingUpdate(m_environment.executionStopwatch().elapsedTime().seconds(), WTFMove(event)); 613 613 } 614 615 m_trackedDeclarativeAnimationData.remove(it);616 614 } 617 615 -
trunk/Source/WebCore/inspector/agents/InspectorAnimationAgent.h
r266885 r276154 95 95 96 96 struct TrackedDeclarativeAnimationData { 97 WTF_MAKE_STRUCT_FAST_ALLOCATED; 97 98 String trackingAnimationId; 98 99 ComputedEffectTiming lastComputedTiming; 99 100 }; 100 HashMap<DeclarativeAnimation*, TrackedDeclarativeAnimationData> m_trackedDeclarativeAnimationData;101 HashMap<DeclarativeAnimation*, UniqueRef<TrackedDeclarativeAnimationData>> m_trackedDeclarativeAnimationData; 101 102 }; 102 103
Note:
See TracChangeset
for help on using the changeset viewer.