Diff
Modified: trunk/Source/WebCore/ChangeLog (208915 => 208916)
--- trunk/Source/WebCore/ChangeLog 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebCore/ChangeLog 2016-11-19 03:33:36 UTC (rev 208916)
@@ -1,3 +1,29 @@
+2016-11-18 Simon Fraser <[email protected]>
+
+ Remove use of std::chrono in WebPage and entrained code
+ https://bugs.webkit.org/show_bug.cgi?id=164967
+
+ Reviewed by Tim Horton.
+
+ Replace std::chrono with Seconds and Monotonic Time.
+
+ Use more C++11 initialization for WebPage data members.
+
+ * page/ChromeClient.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollPositionChanged):
+ (WebCore::FrameView::setScrollVelocity):
+ * page/FrameView.h:
+ * platform/Timer.h:
+ (WebCore::TimerBase::startRepeating):
+ (WebCore::TimerBase::startOneShot):
+ (WebCore::TimerBase::augmentFireInterval):
+ (WebCore::TimerBase::augmentRepeatInterval):
+ * platform/graphics/TiledBacking.h:
+ (WebCore::VelocityData::VelocityData):
+ * platform/graphics/ca/TileController.cpp:
+ (WebCore::TileController::adjustTileCoverageRect):
+
2016-11-18 Dean Jackson <[email protected]>
AX: "(inverted-colors)" media query only matches on page reload; should match on change
Modified: trunk/Source/WebCore/page/ChromeClient.h (208915 => 208916)
--- trunk/Source/WebCore/page/ChromeClient.h 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebCore/page/ChromeClient.h 2016-11-19 03:33:36 UTC (rev 208916)
@@ -41,6 +41,7 @@
#include "WebCoreKeyboardUIMode.h"
#include <runtime/ConsoleTypes.h>
#include <wtf/Forward.h>
+#include <wtf/Seconds.h>
#include <wtf/Vector.h>
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
@@ -232,7 +233,7 @@
virtual void didPreventDefaultForEvent() = 0;
#endif
- virtual std::chrono::milliseconds eventThrottlingDelay() { return 0ms; };
+ virtual Seconds eventThrottlingDelay() { return Seconds(0); };
#if PLATFORM(IOS)
virtual void didReceiveMobileDocType(bool) = 0;
Modified: trunk/Source/WebCore/page/FrameView.cpp (208915 => 208916)
--- trunk/Source/WebCore/page/FrameView.cpp 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebCore/page/FrameView.cpp 2016-11-19 03:33:36 UTC (rev 208916)
@@ -2438,13 +2438,13 @@
void FrameView::scrollPositionChanged(const ScrollPosition& oldPosition, const ScrollPosition& newPosition)
{
Page* page = frame().page();
- auto throttlingDelay = page ? page->chrome().client().eventThrottlingDelay() : 0ms;
+ Seconds throttlingDelay = page ? page->chrome().client().eventThrottlingDelay() : Seconds(0);
- if (throttlingDelay == 0ms) {
+ if (throttlingDelay == Seconds(0)) {
m_delayedScrollEventTimer.stop();
sendScrollEvent();
} else if (!m_delayedScrollEventTimer.isActive())
- m_delayedScrollEventTimer.startOneShot(throttlingDelay);
+ m_delayedScrollEventTimer.startOneShot(throttlingDelay.value());
if (Document* document = frame().document())
document->sendWillRevealEdgeEventsIfNeeded(oldPosition, newPosition, visibleContentRect(), contentsSize());
@@ -4985,7 +4985,7 @@
sendResizeEventIfNeeded();
}
-void FrameView::setScrollVelocity(double horizontalVelocity, double verticalVelocity, double scaleChangeRate, double timestamp)
+void FrameView::setScrollVelocity(double horizontalVelocity, double verticalVelocity, double scaleChangeRate, MonotonicTime timestamp)
{
if (TiledBacking* tiledBacking = this->tiledBacking())
tiledBacking->setVelocity(VelocityData(horizontalVelocity, verticalVelocity, scaleChangeRate, timestamp));
Modified: trunk/Source/WebCore/page/FrameView.h (208915 => 208916)
--- trunk/Source/WebCore/page/FrameView.h 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebCore/page/FrameView.h 2016-11-19 03:33:36 UTC (rev 208916)
@@ -143,7 +143,7 @@
IntSize customSizeForResizeEvent() const { return m_customSizeForResizeEvent; }
WEBCORE_EXPORT void setCustomSizeForResizeEvent(IntSize);
- WEBCORE_EXPORT void setScrollVelocity(double horizontalVelocity, double verticalVelocity, double scaleChangeRate, double timestamp);
+ WEBCORE_EXPORT void setScrollVelocity(double horizontalVelocity, double verticalVelocity, double scaleChangeRate, MonotonicTime timestamp);
#else
bool useCustomFixedPositionLayoutRect() const { return false; }
#endif
Modified: trunk/Source/WebCore/platform/Timer.h (208915 => 208916)
--- trunk/Source/WebCore/platform/Timer.h 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebCore/platform/Timer.h 2016-11-19 03:33:36 UTC (rev 208916)
@@ -30,6 +30,7 @@
#include <functional>
#include <wtf/Noncopyable.h>
#include <wtf/Optional.h>
+#include <wtf/Seconds.h>
#include <wtf/Threading.h>
#include <wtf/Vector.h>
@@ -58,8 +59,11 @@
void startRepeating(double repeatInterval) { start(repeatInterval, repeatInterval); }
void startRepeating(std::chrono::milliseconds repeatInterval) { startRepeating(msToSeconds(repeatInterval)); }
+ void startRepeating(Seconds repeatInterval) { startRepeating(repeatInterval.value()); }
+
void startOneShot(double interval) { start(interval, 0); }
void startOneShot(std::chrono::milliseconds interval) { startOneShot(msToSeconds(interval)); }
+ void startOneShot(Seconds interval) { start(interval.value(), 0); }
WEBCORE_EXPORT void stop();
bool isActive() const;
@@ -71,8 +75,11 @@
void augmentFireInterval(double delta) { setNextFireTime(m_nextFireTime + delta); }
void augmentFireInterval(std::chrono::milliseconds delta) { augmentFireInterval(msToSeconds(delta)); }
+ void augmentFireInterval(Seconds delta) { augmentFireInterval(delta.value()); }
+
void augmentRepeatInterval(double delta) { augmentFireInterval(delta); m_repeatInterval += delta; }
void augmentRepeatInterval(std::chrono::milliseconds delta) { augmentRepeatInterval(msToSeconds(delta)); }
+ void augmentRepeatInterval(Seconds delta) { augmentRepeatInterval(delta.value()); }
void didChangeAlignmentInterval();
Modified: trunk/Source/WebCore/platform/graphics/TiledBacking.h (208915 => 208916)
--- trunk/Source/WebCore/platform/graphics/TiledBacking.h 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebCore/platform/graphics/TiledBacking.h 2016-11-19 03:33:36 UTC (rev 208916)
@@ -23,9 +23,9 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef TiledBacking_h
-#define TiledBacking_h
+#pragma once
+#include <wtf/MonotonicTime.h>
#include <wtf/Optional.h>
namespace WebCore {
@@ -51,9 +51,9 @@
double horizontalVelocity;
double verticalVelocity;
double scaleChangeRate;
- double lastUpdateTime;
+ MonotonicTime lastUpdateTime;
- VelocityData(double horizontal = 0, double vertical = 0, double scaleChange = 0, double updateTime = 0)
+ VelocityData(double horizontal = 0, double vertical = 0, double scaleChange = 0, MonotonicTime updateTime = MonotonicTime())
: horizontalVelocity(horizontal)
, verticalVelocity(vertical)
, scaleChangeRate(scaleChange)
@@ -156,5 +156,3 @@
};
} // namespace WebCore
-
-#endif // TiledBacking_h
Modified: trunk/Source/WebCore/platform/graphics/ca/TileController.cpp (208915 => 208916)
--- trunk/Source/WebCore/platform/graphics/ca/TileController.cpp 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebCore/platform/graphics/ca/TileController.cpp 2016-11-19 03:33:36 UTC (rev 208916)
@@ -381,13 +381,13 @@
double horizontalMargin = kDefaultTileSize / contentsScale;
double verticalMargin = kDefaultTileSize / contentsScale;
- double currentTime = monotonicallyIncreasingTime();
- double timeDelta = currentTime - m_velocity.lastUpdateTime;
+ MonotonicTime currentTime = MonotonicTime::now();
+ Seconds timeDelta = currentTime - m_velocity.lastUpdateTime;
FloatRect futureRect = visibleRect;
futureRect.setLocation(FloatPoint(
- futureRect.location().x() + timeDelta * m_velocity.horizontalVelocity,
- futureRect.location().y() + timeDelta * m_velocity.verticalVelocity));
+ futureRect.location().x() + timeDelta.value() * m_velocity.horizontalVelocity,
+ futureRect.location().y() + timeDelta.value() * m_velocity.verticalVelocity));
if (m_velocity.horizontalVelocity) {
futureRect.setWidth(futureRect.width() + horizontalMargin);
Modified: trunk/Source/WebKit2/ChangeLog (208915 => 208916)
--- trunk/Source/WebKit2/ChangeLog 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/ChangeLog 2016-11-19 03:33:36 UTC (rev 208916)
@@ -1,3 +1,46 @@
+2016-11-18 Simon Fraser <[email protected]>
+
+ Remove use of std::chrono in WebPage and entrained code
+ https://bugs.webkit.org/show_bug.cgi?id=164967
+
+ Reviewed by Tim Horton.
+
+ Replace std::chrono with Seconds and Monotonic Time.
+
+ Use more C++11 initialization for WebPage data members.
+
+ * Shared/VisibleContentRectUpdateInfo.cpp:
+ (WebKit::operator<<):
+ * Shared/VisibleContentRectUpdateInfo.h:
+ (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+ (WebKit::VisibleContentRectUpdateInfo::timestamp):
+ * Shared/WebCoreArgumentCoders.cpp:
+ (IPC::ArgumentCoder<MonotonicTime>::encode):
+ (IPC::ArgumentCoder<MonotonicTime>::decode):
+ (IPC::ArgumentCoder<Seconds>::encode):
+ (IPC::ArgumentCoder<Seconds>::decode):
+ * Shared/WebCoreArgumentCoders.h:
+ * UIProcess/ios/WKContentView.mm:
+ (WebKit::HistoricalVelocityData::HistoricalVelocityData):
+ (WebKit::HistoricalVelocityData::velocityForNewData):
+ (WebKit::HistoricalVelocityData::append):
+ (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+ * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
+ (WebKit::WebChromeClient::eventThrottlingDelay):
+ * WebProcess/WebPage/ViewUpdateDispatcher.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ (WebKit::m_userActivityHysteresis):
+ (WebKit::WebPage::didFlushLayerTreeAtTime):
+ (WebKit::WebPage::didCommitLoad):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::eventThrottlingDelay):
+ (WebKit::WebPage::updateVisibleContentRects):
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+ (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+
2016-11-18 Dean Jackson <[email protected]>
AX: "(inverted-colors)" media query only matches on page reload; should match on change
Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp (208915 => 208916)
--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp 2016-11-19 03:33:36 UTC (rev 208916)
@@ -116,7 +116,7 @@
if (info.enclosedInScrollableAncestorView())
ts.dumpProperty("enclosedInScrollableAncestorView", info.enclosedInScrollableAncestorView());
- ts.dumpProperty("timestamp", info.timestamp());
+ ts.dumpProperty("timestamp", info.timestamp().secondsSinceEpoch().value());
if (info.horizontalVelocity())
ts.dumpProperty("horizontalVelocity", info.horizontalVelocity());
if (info.verticalVelocity())
Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h (208915 => 208916)
--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h 2016-11-19 03:33:36 UTC (rev 208916)
@@ -27,6 +27,7 @@
#define VisibleContentRectUpdateInfo_h
#include <WebCore/FloatRect.h>
+#include <wtf/MonotonicTime.h>
#include <wtf/text/WTFString.h>
namespace IPC {
@@ -47,7 +48,7 @@
VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedContentRect, const WebCore::FloatRect& unobscuredContentRect,
const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect,
const WebCore::FloatSize& obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, bool enclosedInScrollableAncestorView,
- double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate, uint64_t lastLayerTreeTransactionId)
+ MonotonicTime timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate, uint64_t lastLayerTreeTransactionId)
: m_exposedContentRect(exposedContentRect)
, m_unobscuredContentRect(unobscuredContentRect)
, m_unobscuredRectInScrollViewCoordinates(unobscuredRectInScrollViewCoordinates)
@@ -78,7 +79,7 @@
bool allowShrinkToFit() const { return m_allowShrinkToFit; }
bool enclosedInScrollableAncestorView() const { return m_enclosedInScrollableAncestorView; }
- double timestamp() const { return m_timestamp; }
+ MonotonicTime timestamp() const { return m_timestamp; }
double horizontalVelocity() const { return m_horizontalVelocity; }
double verticalVelocity() const { return m_verticalVelocity; }
double scaleChangeRate() const { return m_scaleChangeRate; }
@@ -98,7 +99,7 @@
WebCore::FloatSize m_obscuredInset;
uint64_t m_lastLayerTreeTransactionID { 0 };
double m_scale { -1 };
- double m_timestamp { 0 };
+ MonotonicTime m_timestamp;
double m_horizontalVelocity { 0 };
double m_verticalVelocity { 0 };
double m_scaleChangeRate { 0 };
Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (208915 => 208916)
--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp 2016-11-19 03:33:36 UTC (rev 208916)
@@ -70,6 +70,8 @@
#include <WebCore/UserStyleSheet.h>
#include <WebCore/ViewportArguments.h>
#include <WebCore/WindowFeatures.h>
+#include <wtf/MonotonicTime.h>
+#include <wtf/Seconds.h>
#include <wtf/text/CString.h>
#include <wtf/text/StringHash.h>
@@ -104,6 +106,36 @@
namespace IPC {
+void ArgumentCoder<MonotonicTime>::encode(Encoder& encoder, const MonotonicTime& time)
+{
+ encoder << time.secondsSinceEpoch().value();
+}
+
+bool ArgumentCoder<MonotonicTime>::decode(Decoder& decoder, MonotonicTime& time)
+{
+ double value;
+ if (!decoder.decode(value))
+ return false;
+
+ time = MonotonicTime::fromRawSeconds(value);
+ return true;
+}
+
+void ArgumentCoder<Seconds>::encode(Encoder& encoder, const Seconds& seconds)
+{
+ encoder << seconds.value();
+}
+
+bool ArgumentCoder<Seconds>::decode(Decoder& decoder, Seconds& seconds)
+{
+ double value;
+ if (!decoder.decode(value))
+ return false;
+
+ seconds = Seconds(value);
+ return true;
+}
+
void ArgumentCoder<AffineTransform>::encode(Encoder& encoder, const AffineTransform& affineTransform)
{
SimpleArgumentCoder<AffineTransform>::encode(encoder, affineTransform);
Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h (208915 => 208916)
--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h 2016-11-19 03:33:36 UTC (rev 208916)
@@ -31,6 +31,11 @@
#include <WebCore/IndexedDB.h>
#include <WebCore/PaymentHeaders.h>
+namespace WTF {
+class MonotonicTime;
+class Seconds;
+}
+
namespace WebCore {
class AffineTransform;
class AuthenticationChallenge;
@@ -147,6 +152,16 @@
namespace IPC {
+template<> struct ArgumentCoder<WTF::MonotonicTime> {
+ static void encode(Encoder&, const WTF::MonotonicTime&);
+ static bool decode(Decoder&, WTF::MonotonicTime&);
+};
+
+template<> struct ArgumentCoder<WTF::Seconds> {
+ static void encode(Encoder&, const WTF::Seconds&);
+ static bool decode(Decoder&, WTF::Seconds&);
+};
+
template<> struct ArgumentCoder<WebCore::AffineTransform> {
static void encode(Encoder&, const WebCore::AffineTransform&);
static bool decode(Decoder&, WebCore::AffineTransform&);
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (208915 => 208916)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm 2016-11-19 03:33:36 UTC (rev 208916)
@@ -92,15 +92,14 @@
HistoricalVelocityData()
: m_historySize(0)
, m_latestDataIndex(0)
- , m_lastAppendTimestamp(0)
{
}
- VelocityData velocityForNewData(CGPoint newPosition, double scale, double timestamp)
+ VelocityData velocityForNewData(CGPoint newPosition, double scale, MonotonicTime timestamp)
{
// Due to all the source of rect update, the input is very noisy. To smooth the output, we accumulate all changes
// within 1 frame as a single update. No speed computation is ever done on data within the same frame.
- const double filteringThreshold = 1 / 60.;
+ const Seconds filteringThreshold(1.0 / 60);
VelocityData velocityData;
if (m_historySize > 0) {
@@ -111,14 +110,14 @@
else
oldestDataIndex = m_historySize - (distanceToLastHistoricalData - m_latestDataIndex);
- double timeDelta = timestamp - m_history[oldestDataIndex].timestamp;
+ Seconds timeDelta = timestamp - m_history[oldestDataIndex].timestamp;
if (timeDelta > filteringThreshold) {
Data& oldestData = m_history[oldestDataIndex];
- velocityData = VelocityData((newPosition.x - oldestData.position.x) / timeDelta, (newPosition.y - oldestData.position.y) / timeDelta, (scale - oldestData.scale) / timeDelta);
+ velocityData = VelocityData((newPosition.x - oldestData.position.x) / timeDelta.seconds(), (newPosition.y - oldestData.position.y) / timeDelta.seconds(), (scale - oldestData.scale) / timeDelta.seconds());
}
}
- double timeSinceLastAppend = timestamp - m_lastAppendTimestamp;
+ Seconds timeSinceLastAppend = timestamp - m_lastAppendTimestamp;
if (timeSinceLastAppend > filteringThreshold)
append(newPosition, scale, timestamp);
else
@@ -129,7 +128,7 @@
void clear() { m_historySize = 0; }
private:
- void append(CGPoint newPosition, double scale, double timestamp)
+ void append(CGPoint newPosition, double scale, MonotonicTime timestamp)
{
m_latestDataIndex = (m_latestDataIndex + 1) % maxHistoryDepth;
m_history[m_latestDataIndex] = { timestamp, newPosition, scale };
@@ -146,10 +145,10 @@
unsigned m_historySize;
unsigned m_latestDataIndex;
- double m_lastAppendTimestamp;
+ MonotonicTime m_lastAppendTimestamp;
struct Data {
- double timestamp;
+ MonotonicTime timestamp;
CGPoint position;
double scale;
} m_history[maxHistoryDepth];
@@ -370,7 +369,7 @@
if (!drawingArea)
return;
- double timestamp = monotonicallyIncreasingTime();
+ MonotonicTime timestamp = MonotonicTime::now();
HistoricalVelocityData::VelocityData velocityData;
if (!isStableState)
velocityData = _historicalKinematicData.velocityForNewData(visibleRect.origin, zoomScale, timestamp);
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (208915 => 208916)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h 2016-11-19 03:33:36 UTC (rev 208916)
@@ -174,7 +174,7 @@
void webAppOrientationsUpdated() override;
void showPlaybackTargetPicker(bool hasVideo) override;
- std::chrono::milliseconds eventThrottlingDelay() override;
+ Seconds eventThrottlingDelay() override;
#endif
#if ENABLE(ORIENTATION_EVENTS)
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm (208915 => 208916)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm 2016-11-19 03:33:36 UTC (rev 208916)
@@ -131,7 +131,7 @@
m_page->send(Messages::WebPageProxy::ShowPlaybackTargetPicker(hasVideo, m_page->rectForElementAtInteractionLocation()));
}
-std::chrono::milliseconds WebChromeClient::eventThrottlingDelay()
+Seconds WebChromeClient::eventThrottlingDelay()
{
return m_page->eventThrottlingDelay();
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.h (208915 => 208916)
--- trunk/Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.h 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.h 2016-11-19 03:33:36 UTC (rev 208916)
@@ -53,7 +53,7 @@
struct UpdateData {
VisibleContentRectUpdateInfo visibleContentRectUpdateInfo;
- double oldestTimestamp;
+ MonotonicTime oldestTimestamp;
};
Ref<WorkQueue> m_queue;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (208915 => 208916)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-11-19 03:33:36 UTC (rev 208916)
@@ -291,27 +291,11 @@
WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
: m_pageID(pageID)
, m_viewSize(parameters.viewSize)
- , m_hasSeenPlugin(false)
- , m_useFixedLayout(false)
- , m_drawsBackground(true)
- , m_isInRedo(false)
- , m_isClosed(false)
- , m_tabToLinks(false)
- , m_asynchronousPluginInitializationEnabled(false)
- , m_asynchronousPluginInitializationEnabledForAllPlugins(false)
- , m_artificialPluginInitializationDelayEnabled(false)
- , m_scrollingPerformanceLoggingEnabled(false)
- , m_mainFrameIsScrollable(true)
#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
- , m_readyToFindPrimarySnapshottedPlugin(false)
- , m_didFindPrimarySnapshottedPlugin(false)
- , m_numberOfPrimarySnapshotDetectionAttempts(0)
, m_determinePrimarySnapshottedPlugInTimer(RunLoop::main(), this, &WebPage::determinePrimarySnapshottedPlugInTimerFired)
#endif
, m_layerHostingMode(parameters.layerHostingMode)
#if PLATFORM(COCOA)
- , m_pdfPluginEnabled(false)
- , m_hasCachedWindowFrame(false)
, m_viewGestureGeometryCollector(*this)
#elif HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
, m_accessibilityObject(nullptr)
@@ -323,9 +307,6 @@
, m_formClient(std::make_unique<API::InjectedBundle::FormClient>())
, m_uiClient(std::make_unique<API::InjectedBundle::PageUIClient>())
, m_findController(this)
-#if ENABLE(INPUT_TYPE_COLOR)
- , m_activeColorChooser(0)
-#endif
, m_userContentController(WebUserContentController::getOrCreate(parameters.userContentControllerID))
#if ENABLE(GEOLOCATION)
, m_geolocationPermissionRequestManager(this)
@@ -336,53 +317,15 @@
, m_pageScrolledHysteresis([this](HysteresisState state) { if (state == HysteresisState::Stopped) pageStoppedScrolling(); }, pageScrollHysteresisSeconds)
, m_canRunBeforeUnloadConfirmPanel(parameters.canRunBeforeUnloadConfirmPanel)
, m_canRunModal(parameters.canRunModal)
- , m_isRunningModal(false)
-#if ENABLE(DRAG_SUPPORT)
- , m_isStartingDrag(false)
-#endif
- , m_cachedMainFrameIsPinnedToLeftSide(true)
- , m_cachedMainFrameIsPinnedToRightSide(true)
- , m_cachedMainFrameIsPinnedToTopSide(true)
- , m_cachedMainFrameIsPinnedToBottomSide(true)
- , m_canShortCircuitHorizontalWheelEvents(false)
- , m_hasWheelEventHandlers(false)
- , m_cachedPageCount(0)
- , m_autoSizingShouldExpandToViewHeight(false)
- , m_userIsInteracting(false)
-#if ENABLE(CONTEXT_MENUS)
- , m_isShowingContextMenu(false)
-#endif
- , m_hasPendingBlurNotification(false)
#if PLATFORM(IOS)
- , m_selectionAnchor(Start)
- , m_hasReceivedVisibleContentRectsAfterDidCommitLoad(false)
- , m_scaleWasSetByUIProcess(false)
- , m_userHasChangedPageScaleFactor(false)
- , m_hasStablePageScaleFactor(true)
- , m_useTestingViewportConfiguration(false)
- , m_isInStableState(true)
, m_forceAlwaysUserScalable(parameters.ignoresViewportScaleLimits)
- , m_oldestNonStableUpdateVisibleContentRectsTimestamp(std::chrono::milliseconds::zero())
- , m_estimatedLatency(std::chrono::milliseconds::zero())
, m_screenSize(parameters.screenSize)
, m_availableScreenSize(parameters.availableScreenSize)
- , m_deviceOrientation(0)
- , m_inDynamicSizeUpdate(false)
#endif
, m_layerVolatilityTimer(*this, &WebPage::layerVolatilityTimerFired)
- , m_backgroundColor(Color::white)
- , m_maximumRenderingSuppressionToken(0)
- , m_scrollPinningBehavior(DoNotPin)
- , m_useAsyncScrolling(false)
, m_activityState(parameters.activityState)
, m_userActivity("Process suppression disabled for page.")
, m_userActivityHysteresis([this](HysteresisState) { updateUserActivity(); })
- , m_pendingNavigationID(0)
-#if ENABLE(WEBGL)
- , m_systemWebGLPolicy(WebGLAllowCreation)
-#endif
- , m_mainFrameProgressCompleted(false)
- , m_shouldDispatchFakeMouseMoveEvents(true)
, m_userInterfaceLayoutDirection(parameters.userInterfaceLayoutDirection)
{
ASSERT(m_pageID);
@@ -3299,14 +3242,14 @@
#endif
}
-void WebPage::didFlushLayerTreeAtTime(std::chrono::milliseconds timestamp)
+void WebPage::didFlushLayerTreeAtTime(MonotonicTime timestamp)
{
#if PLATFORM(IOS)
- if (m_oldestNonStableUpdateVisibleContentRectsTimestamp != std::chrono::milliseconds::zero()) {
- std::chrono::milliseconds elapsed = timestamp - m_oldestNonStableUpdateVisibleContentRectsTimestamp;
- m_oldestNonStableUpdateVisibleContentRectsTimestamp = std::chrono::milliseconds::zero();
+ if (m_oldestNonStableUpdateVisibleContentRectsTimestamp != MonotonicTime()) {
+ Seconds elapsed = timestamp - m_oldestNonStableUpdateVisibleContentRectsTimestamp;
+ m_oldestNonStableUpdateVisibleContentRectsTimestamp = MonotonicTime();
- m_estimatedLatency = std::chrono::milliseconds(static_cast<std::chrono::milliseconds::rep>(m_estimatedLatency.count() * 0.80 + elapsed.count() * 0.20));
+ m_estimatedLatency = m_estimatedLatency * 0.80 + elapsed * 0.20;
}
#else
UNUSED_PARAM(timestamp);
@@ -5171,7 +5114,7 @@
m_hasReceivedVisibleContentRectsAfterDidCommitLoad = false;
m_scaleWasSetByUIProcess = false;
m_userHasChangedPageScaleFactor = false;
- m_estimatedLatency = std::chrono::milliseconds(1000 / 60);
+ m_estimatedLatency = Seconds(1.0 / 60);
#if ENABLE(IOS_TOUCH_EVENTS)
WebProcess::singleton().eventDispatcher().clearQueuedTouchEventsForPage(*this);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (208915 => 208916)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2016-11-19 03:33:36 UTC (rev 208916)
@@ -73,9 +73,11 @@
#include <WebCore/WebCoreKeyboardUIMode.h>
#include <memory>
#include <wtf/HashMap.h>
+#include <wtf/MonotonicTime.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/RunLoop.h>
+#include <wtf/Seconds.h>
#include <wtf/text/WTFString.h>
#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
@@ -247,7 +249,7 @@
#if PLATFORM(COCOA)
void willCommitLayerTree(RemoteLayerTreeTransaction&);
- void didFlushLayerTreeAtTime(std::chrono::milliseconds);
+ void didFlushLayerTreeAtTime(MonotonicTime);
#endif
enum class LazyCreationPolicy { UseExistingOnly, CreateIfNeeded };
@@ -579,7 +581,7 @@
void contentSizeCategoryDidChange(const String&);
void executeEditCommandWithCallback(const String&, uint64_t callbackID);
- std::chrono::milliseconds eventThrottlingDelay() const;
+ Seconds eventThrottlingDelay() const;
void showInspectorHighlight(const WebCore::Highlight&);
void hideInspectorHighlight();
@@ -827,7 +829,7 @@
void setDeviceOrientation(int32_t);
void dynamicViewportSizeUpdate(const WebCore::FloatSize& minimumLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, double scale, int32_t deviceOrientation, uint64_t dynamicViewportSizeUpdateID);
void synchronizeDynamicViewportUpdate(double& newTargetScale, WebCore::FloatPoint& newScrollPosition, uint64_t& nextValidLayerTreeTransactionID);
- void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, double oldestTimestamp);
+ void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, MonotonicTime oldestTimestamp);
bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
void willStartUserTriggeredZooming();
void applicationWillResignActive();
@@ -1256,37 +1258,33 @@
std::unique_ptr<DrawingArea> m_drawingArea;
HashSet<PluginView*> m_pluginViews;
- bool m_hasSeenPlugin;
+ bool m_hasSeenPlugin { false };
HashMap<uint64_t, RefPtr<WebCore::TextCheckingRequest>> m_pendingTextCheckingRequestMap;
- bool m_useFixedLayout;
+ bool m_useFixedLayout { false };
+ bool m_drawsBackground { true };
- bool m_drawsBackground;
-
WebCore::Color m_underlayColor;
- bool m_isInRedo;
- bool m_isClosed;
-
- bool m_tabToLinks;
+ bool m_isInRedo { false };
+ bool m_isClosed { false };
+ bool m_tabToLinks { false };
- bool m_asynchronousPluginInitializationEnabled;
- bool m_asynchronousPluginInitializationEnabledForAllPlugins;
- bool m_artificialPluginInitializationDelayEnabled;
+ bool m_asynchronousPluginInitializationEnabled { false };
+ bool m_asynchronousPluginInitializationEnabledForAllPlugins { false };
+ bool m_artificialPluginInitializationDelayEnabled { false };
+ bool m_scrollingPerformanceLoggingEnabled { false };
+ bool m_mainFrameIsScrollable { true };
- bool m_scrollingPerformanceLoggingEnabled;
-
- bool m_mainFrameIsScrollable;
-
#if PLATFORM(IOS)
bool m_ignoreViewportScalingConstraints { false };
#endif
#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
- bool m_readyToFindPrimarySnapshottedPlugin;
- bool m_didFindPrimarySnapshottedPlugin;
- unsigned m_numberOfPrimarySnapshotDetectionAttempts;
+ bool m_readyToFindPrimarySnapshottedPlugin { false };
+ bool m_didFindPrimarySnapshottedPlugin { false };
+ unsigned m_numberOfPrimarySnapshotDetectionAttempts { 0 };
String m_primaryPlugInPageOrigin;
String m_primaryPlugInOrigin;
String m_primaryPlugInMimeType;
@@ -1297,10 +1295,9 @@
LayerHostingMode m_layerHostingMode;
#if PLATFORM(COCOA)
- bool m_pdfPluginEnabled;
+ bool m_pdfPluginEnabled { false };
+ bool m_hasCachedWindowFrame { false };
- bool m_hasCachedWindowFrame;
-
// The frame of the containing window in screen coordinates.
WebCore::FloatRect m_windowFrameInScreenCoordinates;
@@ -1325,7 +1322,7 @@
#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
// Our view's window in the UI process.
- uint64_t m_nativeWindowHandle;
+ uint64_t m_nativeWindowHandle { 0 };
#endif
#if !PLATFORM(IOS)
@@ -1334,7 +1331,7 @@
#endif // !PLATFORM(IOS)
RunLoop::Timer<WebPage> m_setCanStartMediaTimer;
- bool m_mayStartMediaWhenInWindow;
+ bool m_mayStartMediaWhenInWindow { false };
HashMap<uint64_t, RefPtr<WebUndoStep>> m_undoStepMap;
@@ -1373,7 +1370,7 @@
RefPtr<WebContextMenu> m_contextMenu;
#endif
#if ENABLE(INPUT_TYPE_COLOR)
- WebColorChooser* m_activeColorChooser;
+ WebColorChooser* m_activeColorChooser { nullptr };
#endif
RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager;
@@ -1400,30 +1397,30 @@
WebCore::HysteresisActivity m_pageScrolledHysteresis;
- bool m_canRunBeforeUnloadConfirmPanel;
+ bool m_canRunBeforeUnloadConfirmPanel { false };
- bool m_canRunModal;
- bool m_isRunningModal;
+ bool m_canRunModal { false };
+ bool m_isRunningModal { false };
#if ENABLE(DRAG_SUPPORT)
- bool m_isStartingDrag;
+ bool m_isStartingDrag { false };
#endif
- bool m_cachedMainFrameIsPinnedToLeftSide;
- bool m_cachedMainFrameIsPinnedToRightSide;
- bool m_cachedMainFrameIsPinnedToTopSide;
- bool m_cachedMainFrameIsPinnedToBottomSide;
- bool m_canShortCircuitHorizontalWheelEvents;
- bool m_hasWheelEventHandlers;
+ bool m_cachedMainFrameIsPinnedToLeftSide { true };
+ bool m_cachedMainFrameIsPinnedToRightSide { true };
+ bool m_cachedMainFrameIsPinnedToTopSide { true };
+ bool m_cachedMainFrameIsPinnedToBottomSide { true };
+ bool m_canShortCircuitHorizontalWheelEvents { false };
+ bool m_hasWheelEventHandlers { false };
- unsigned m_cachedPageCount;
+ unsigned m_cachedPageCount { 0 };
HashSet<unsigned long> m_trackedNetworkResourceRequestIdentifiers;
WebCore::IntSize m_minimumLayoutSize;
- bool m_autoSizingShouldExpandToViewHeight;
+ bool m_autoSizingShouldExpandToViewHeight { false };
- bool m_userIsInteracting;
+ bool m_userIsInteracting { false };
bool m_isAssistingNodeDueToUserInteraction { false };
bool m_hasEverFocusedElementDueToUserInteractionSincePageTransition { false };
bool m_needsHiddenContentEditableQuirk { false };
@@ -1430,11 +1427,11 @@
bool m_needsPlainTextQuirk { false };
#if ENABLE(CONTEXT_MENUS)
- bool m_isShowingContextMenu;
+ bool m_isShowingContextMenu { false };
#endif
RefPtr<WebCore::Node> m_assistedNode;
- bool m_hasPendingBlurNotification;
+ bool m_hasPendingBlurNotification { false };
#if PLATFORM(IOS)
RefPtr<WebCore::Range> m_currentWordRange;
@@ -1445,21 +1442,21 @@
Start,
End
};
- SelectionAnchor m_selectionAnchor;
+ SelectionAnchor m_selectionAnchor { Start };
RefPtr<WebCore::Node> m_potentialTapNode;
WebCore::FloatPoint m_potentialTapLocation;
WebCore::ViewportConfiguration m_viewportConfiguration;
- bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad;
- bool m_scaleWasSetByUIProcess;
- bool m_userHasChangedPageScaleFactor;
- bool m_hasStablePageScaleFactor;
- bool m_useTestingViewportConfiguration;
- bool m_isInStableState;
- bool m_forceAlwaysUserScalable;
- std::chrono::milliseconds m_oldestNonStableUpdateVisibleContentRectsTimestamp;
- std::chrono::milliseconds m_estimatedLatency;
+ bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad { false };
+ bool m_scaleWasSetByUIProcess { false };
+ bool m_userHasChangedPageScaleFactor { false };
+ bool m_hasStablePageScaleFactor { true };
+ bool m_useTestingViewportConfiguration { false };
+ bool m_isInStableState { true };
+ bool m_forceAlwaysUserScalable { false };
+ MonotonicTime m_oldestNonStableUpdateVisibleContentRectsTimestamp;
+ Seconds m_estimatedLatency { 0 };
WebCore::FloatSize m_screenSize;
WebCore::FloatSize m_availableScreenSize;
RefPtr<WebCore::Range> m_currentBlockSelection;
@@ -1468,8 +1465,8 @@
RefPtr<WebCore::Range> m_initialSelection;
WebCore::IntSize m_blockSelectionDesiredSize;
WebCore::FloatSize m_maximumUnobscuredSize;
- int32_t m_deviceOrientation;
- bool m_inDynamicSizeUpdate;
+ int32_t m_deviceOrientation { 0 };
+ bool m_inDynamicSizeUpdate { false };
HashMap<std::pair<WebCore::IntSize, double>, WebCore::IntPoint> m_dynamicSizeUpdateHistory;
RefPtr<WebCore::Node> m_pendingSyntheticClickNode;
WebCore::FloatPoint m_pendingSyntheticClickLocation;
@@ -1481,15 +1478,15 @@
bool m_isSuspendedUnderLock { false };
HashSet<String, ASCIICaseInsensitiveHash> m_mimeTypesWithCustomContentProviders;
- WebCore::Color m_backgroundColor;
+ WebCore::Color m_backgroundColor { WebCore::Color::white };
HashSet<unsigned> m_activeRenderingSuppressionTokens;
- unsigned m_maximumRenderingSuppressionToken;
+ unsigned m_maximumRenderingSuppressionToken { 0 };
- WebCore::ScrollPinningBehavior m_scrollPinningBehavior;
+ WebCore::ScrollPinningBehavior m_scrollPinningBehavior { WebCore::DoNotPin };
WTF::Optional<WebCore::ScrollbarOverlayStyle> m_scrollbarOverlayStyle;
- bool m_useAsyncScrolling;
+ bool m_useAsyncScrolling { false };
WebCore::ActivityState::Flags m_activityState;
@@ -1496,14 +1493,14 @@
UserActivity m_userActivity;
WebCore::HysteresisActivity m_userActivityHysteresis;
- uint64_t m_pendingNavigationID;
+ uint64_t m_pendingNavigationID { 0 };
#if ENABLE(WEBGL)
- WebCore::WebGLLoadPolicy m_systemWebGLPolicy;
+ WebCore::WebGLLoadPolicy m_systemWebGLPolicy { WebCore::WebGLAllowCreation };
#endif
- bool m_mainFrameProgressCompleted;
- bool m_shouldDispatchFakeMouseMoveEvents;
+ bool m_mainFrameProgressCompleted { false };
+ bool m_shouldDispatchFakeMouseMoveEvents { true };
bool m_isEditorStateMissingPostLayoutData { false };
bool m_isSelectingTextWhileInsertingAsynchronously { false };
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (208915 => 208916)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-11-19 03:33:36 UTC (rev 208916)
@@ -2122,12 +2122,12 @@
send(Messages::WebPageProxy::VoidCallback(callbackID));
}
-std::chrono::milliseconds WebPage::eventThrottlingDelay() const
+Seconds WebPage::eventThrottlingDelay() const
{
- if (m_isInStableState || m_estimatedLatency <= std::chrono::milliseconds(1000 / 60))
- return std::chrono::milliseconds::zero();
+ if (m_isInStableState || m_estimatedLatency <= Seconds(1.0 / 60))
+ return Seconds(0);
- return std::chrono::milliseconds(std::min<std::chrono::milliseconds::rep>(m_estimatedLatency.count() * 2, 1000));
+ return Seconds(std::min<double>(m_estimatedLatency.value() * 2, 1));
}
void WebPage::syncApplyAutocorrection(const String& correction, const String& originalText, bool& correctionApplied)
@@ -2832,7 +2832,7 @@
newExposedContentRect.moveBy(adjustmentDelta);
}
- frameView.setScrollVelocity(0, 0, 0, monotonicallyIncreasingTime());
+ frameView.setScrollVelocity(0, 0, 0, MonotonicTime::now());
IntPoint roundedUnobscuredContentRectPosition = roundedIntPoint(newUnobscuredContentRect.location());
frameView.setUnobscuredContentSize(newUnobscuredContentRect.size());
@@ -2904,7 +2904,7 @@
minimumLayoutSizeInScrollViewCoordinates.scale(1 / scale);
IntSize minimumLayoutSizeInDocumentCoordinates = roundedIntSize(minimumLayoutSizeInScrollViewCoordinates);
frameView.setUnobscuredContentSize(minimumLayoutSizeInDocumentCoordinates);
- frameView.setScrollVelocity(0, 0, 0, monotonicallyIncreasingTime());
+ frameView.setScrollVelocity(0, 0, 0, MonotonicTime::now());
// FIXME: We could send down the obscured margins to find a better exposed rect and unobscured rect.
// It is not a big deal at the moment because the tile coverage will always extend past the obscured bottom inset.
@@ -2982,7 +2982,7 @@
return adjustExposedRectForNewScale(exposedRect, exposedRectScale, newScale);
}
-void WebPage::updateVisibleContentRects(const VisibleContentRectUpdateInfo& visibleContentRectUpdateInfo, double oldestTimestamp)
+void WebPage::updateVisibleContentRects(const VisibleContentRectUpdateInfo& visibleContentRectUpdateInfo, MonotonicTime oldestTimestamp)
{
// Skip any VisibleContentRectUpdate that have been queued before DidCommitLoad suppresses the updates in the UIProcess.
if (visibleContentRectUpdateInfo.lastLayerTreeTransactionID() < m_mainFrame->firstLayerTreeTransactionIDAfterDidCommitLoad())
@@ -3010,8 +3010,8 @@
if (m_isInStableState)
m_hasStablePageScaleFactor = true;
else {
- if (m_oldestNonStableUpdateVisibleContentRectsTimestamp == std::chrono::milliseconds::zero())
- m_oldestNonStableUpdateVisibleContentRectsTimestamp = std::chrono::milliseconds(static_cast<std::chrono::milliseconds::rep>(oldestTimestamp * 1000));
+ if (!m_oldestNonStableUpdateVisibleContentRectsTimestamp)
+ m_oldestNonStableUpdateVisibleContentRectsTimestamp = oldestTimestamp;
}
FloatRect exposedContentRect = visibleContentRectUpdateInfo.exposedContentRect();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (208915 => 208916)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm 2016-11-19 02:51:15 UTC (rev 208915)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm 2016-11-19 03:33:36 UTC (rev 208916)
@@ -427,7 +427,7 @@
dispatch_async(m_commitQueue, [backingStoreFlusher, pageID] {
backingStoreFlusher->flush();
- std::chrono::milliseconds timestamp = std::chrono::milliseconds(static_cast<std::chrono::milliseconds::rep>(monotonicallyIncreasingTime() * 1000));
+ MonotonicTime timestamp = MonotonicTime::now();
dispatch_async(dispatch_get_main_queue(), [pageID, timestamp] {
if (WebPage* webPage = WebProcess::singleton().webPage(pageID))
webPage->didFlushLayerTreeAtTime(timestamp);