diff options
Diffstat (limited to 'dom/base/nsDOMWindowUtils.cpp')
-rw-r--r-- | dom/base/nsDOMWindowUtils.cpp | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index e8f5f0f54f..18204efdc1 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -2367,75 +2367,6 @@ nsDOMWindowUtils::GetCurrentAudioBackend(nsAString& aBackend) return NS_OK; } -NS_IMETHODIMP -nsDOMWindowUtils::StartFrameTimeRecording(uint32_t *startIndex) -{ - NS_ENSURE_ARG_POINTER(startIndex); - - nsCOMPtr<nsIWidget> widget = GetWidget(); - if (!widget) - return NS_ERROR_FAILURE; - - LayerManager *mgr = widget->GetLayerManager(); - if (!mgr) - return NS_ERROR_FAILURE; - - const uint32_t kRecordingMinSize = 60 * 10; // 10 seconds @60 fps. - const uint32_t kRecordingMaxSize = 60 * 60 * 60; // One hour - uint32_t bufferSize = Preferences::GetUint("toolkit.framesRecording.bufferSize", uint32_t(0)); - bufferSize = std::min(bufferSize, kRecordingMaxSize); - bufferSize = std::max(bufferSize, kRecordingMinSize); - *startIndex = mgr->StartFrameTimeRecording(bufferSize); - - return NS_OK; -} - -NS_IMETHODIMP -nsDOMWindowUtils::StopFrameTimeRecording(uint32_t startIndex, - uint32_t *frameCount, - float **frameIntervals) -{ - NS_ENSURE_ARG_POINTER(frameCount); - NS_ENSURE_ARG_POINTER(frameIntervals); - - nsCOMPtr<nsIWidget> widget = GetWidget(); - if (!widget) - return NS_ERROR_FAILURE; - - LayerManager *mgr = widget->GetLayerManager(); - if (!mgr) - return NS_ERROR_FAILURE; - - nsTArray<float> tmpFrameIntervals; - mgr->StopFrameTimeRecording(startIndex, tmpFrameIntervals); - *frameCount = tmpFrameIntervals.Length(); - - *frameIntervals = (float*)moz_xmalloc(*frameCount * sizeof(float)); - - /* copy over the frame intervals and paint times into the arrays we just allocated */ - for (uint32_t i = 0; i < *frameCount; i++) { - (*frameIntervals)[i] = tmpFrameIntervals[i]; - } - - return NS_OK; -} - -NS_IMETHODIMP -nsDOMWindowUtils::BeginTabSwitch() -{ - nsCOMPtr<nsIWidget> widget = GetWidget(); - if (!widget) - return NS_ERROR_FAILURE; - - LayerManager *mgr = widget->GetLayerManager(); - if (!mgr) - return NS_ERROR_FAILURE; - - mgr->BeginTabSwitch(); - - return NS_OK; -} - static bool ComputeAnimationValue(nsCSSPropertyID aProperty, Element* aElement, |