blob: 28af2bc81b3d0de4f17e7c5fc38195438a6773a3 [file]
/*
* Copyright 2025 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/capture/SkCaptureManager.h"
#include "include/core/SkCanvas.h"
#include "src/capture/SkCaptureCanvas.h"
#include <memory>
SkCaptureManager::SkCaptureManager() {}
SkCanvas* SkCaptureManager::makeCaptureCanvas(SkCanvas* canvas) {
auto newCanvas = std::make_unique<SkCaptureCanvas>(canvas, this);
auto rawCanvasPtr = newCanvas.get();
fTrackedCanvases.emplace_back(std::move(newCanvas));
return rawCanvasPtr;
}