From 3e90a3f5dbdf89b65a1ea9b67087436d08720ef1 Mon Sep 17 00:00:00 2001 From: Gregory Pappas Date: Mon, 29 May 2023 18:37:27 +0000 Subject: [PATCH] Bug 1754851 - Remove Compositor::RecordFrame r=mstange Differential Revision: https://phabricator.services.mozilla.com/D179304 --- gfx/layers/Compositor.cpp | 17 ----------------- gfx/layers/Compositor.h | 8 -------- 2 files changed, 25 deletions(-) diff --git a/gfx/layers/Compositor.cpp b/gfx/layers/Compositor.cpp index 4788933cb7ed..e7c84918adcb 100644 --- a/gfx/layers/Compositor.cpp +++ b/gfx/layers/Compositor.cpp @@ -233,23 +233,6 @@ size_t DecomposeIntoNoRepeatRects(const gfx::Rect& aRect, return 4; } -already_AddRefed Compositor::RecordFrame( - const TimeStamp& aTimeStamp) { - RefPtr renderTarget = GetWindowRenderTarget(); - if (!renderTarget) { - return nullptr; - } - - RefPtr buffer = - CreateAsyncReadbackBuffer(renderTarget->GetSize()); - - if (!ReadbackRenderTarget(renderTarget, buffer)) { - return nullptr; - } - - return MakeAndAddRef(aTimeStamp, std::move(buffer)); -} - bool Compositor::ShouldRecordFrames() const { return profiler_feature_active(ProfilerFeature::Screenshots) || mRecordFrames; } diff --git a/gfx/layers/Compositor.h b/gfx/layers/Compositor.h index a5393a55328f..b4e05674a861 100644 --- a/gfx/layers/Compositor.h +++ b/gfx/layers/Compositor.h @@ -327,14 +327,6 @@ class Compositor : public TextureSourceProvider { mRecordFrames = aWillRecord; } - /** - * Record the current frame for readback by the |CompositionRecorder|. - * - * If this compositor does not support this feature, a null pointer is - * returned instead. - */ - already_AddRefed RecordFrame(const TimeStamp& aTimeStamp); - protected: /** * Whether or not the compositor should be prepared to record frames. While