8#ifndef skgpu_graphite_Recorder_DEFINED
9#define skgpu_graphite_Recorder_DEFINED
27class RefCntedCallback;
43class DrawBufferManager;
47class ProxyReadCountMap;
50class RuntimeEffectDictionary;
54class TextureDataBlock;
56class UniformDataBlock;
57class UploadBufferManager;
59template<
typename T>
class PipelineDataCache;
70 static constexpr size_t kDefaultRecorderBudget = 256 * (1 << 20);
72 size_t fGpuBudgetInBytes = kDefaultRecorderBudget;
86 std::unique_ptr<Recording> snap();
104#ifdef SK_BUILD_FOR_ANDROID
107 bool isProtectedContent,
109 bool fromAndroidWindow =
false)
const;
175 void freeGpuResources();
182 void performDeferredCleanup(std::chrono::milliseconds msNotUsed);
188 size_t currentBudgetedBytes()
const;
193 size_t maxBudgetedBytes()
const;
214 SingleOwner* singleOwner()
const {
return &fSingleOwner; }
235 void deregisterDevice(
const Device*);
239 std::unique_ptr<ResourceProvider> fOwnedResourceProvider;
240 std::unique_ptr<RuntimeEffectDictionary> fRuntimeEffectDict;
243 std::unique_ptr<TaskList> fRootTaskList;
244 std::unique_ptr<UniformDataCache> fUniformDataCache;
245 std::unique_ptr<TextureDataCache> fTextureDataCache;
246 std::unique_ptr<DrawBufferManager> fDrawBufferManager;
247 std::unique_ptr<UploadBufferManager> fUploadBufferManager;
248 std::unique_ptr<ProxyReadCountMap> fProxyReadCounts;
255 int fFlushingDevicesIndex = -1;
258 uint32_t fNextRecordingID = 1;
259 std::unique_ptr<AtlasProvider> fAtlasProvider;
260 std::unique_ptr<TokenTracker> fTokenTracker;
261 std::unique_ptr<sktext::gpu::StrikeCache> fStrikeCache;
262 std::unique_ptr<sktext::gpu::TextBlobRedrawCoordinator> fTextBlobCache;
271 std::unique_ptr<SkCanvas> fTargetProxyCanvas;
272 std::unique_ptr<Recording::LazyProxyData> fTargetProxyData;
276#if defined(GRAPHITE_TEST_UTILS)
struct AHardwareBuffer AHardwareBuffer
Recorder(Recorder &&)=delete
Recorder & operator=(Recorder &&)=delete
const ImageProvider * clientImageProvider() const
ImageProvider * clientImageProvider()
Recorder(const Recorder &)=delete
Recorder & operator=(const Recorder &)=delete
FlPixelBufferTexturePrivate * priv
RecorderOptions(const RecorderOptions &)
sk_sp< ImageProvider > fImageProvider
std::shared_ptr< const fml::Mapping > data