60 bool hasUnfinishedGpuWork()
const;
78 void asyncRescaleAndReadPixelsYUV420(
const SkImage*,
88 void asyncRescaleAndReadPixelsYUV420(
const SkSurface*,
98 void asyncRescaleAndReadPixelsYUVA420(
const SkImage*,
108 void asyncRescaleAndReadPixelsYUVA420(
const SkSurface*,
121 void checkAsyncWorkCompletion();
140 void freeGpuResources();
147 void performDeferredCleanup(std::chrono::milliseconds msNotUsed);
153 size_t currentBudgetedBytes()
const;
158 size_t maxBudgetedBytes()
const;
170 bool isDeviceLost()
const;
175 int maxTextureSize()
const;
180 bool supportsProtectedContent()
const;
212 struct PixelTransferResult {
213 using ConversionFn = void(
void* dst,
const void* mappedBuffer);
224 std::function<ConversionFn> fPixelConverter;
227 SingleOwner* singleOwner()
const {
return &fSingleOwner; }
231 bool finishInitialization();
233 void checkForFinishedWork(SyncToCpu);
235 void asyncRescaleAndReadPixelsYUV420Impl(
const SkImage*,
246 void asyncReadPixels(
const TextureProxy* textureProxy,
253 void asyncReadPixelsYUV420(
Recorder*,
266 PixelTransferResult transferPixels(
const TextureProxy*,
272 std::unique_ptr<ResourceProvider> fResourceProvider;
273 std::unique_ptr<QueueManager> fQueueManager;
274 std::unique_ptr<ClientMappedBufferManager> fMappedBufferManager;
280#if defined(GRAPHITE_TEST_UTILS)
282 bool fStoreContextRefInRecorder =
false;
285 std::vector<Recorder*> fTrackedRecorders;
289 const ContextID fContextID;
bool operator!=(const ContextID &that) const
bool operator==(const ContextID &that) const
ContextID contextID() const
Context & operator=(Context &&)=delete
Context(Context &&)=delete
Context & operator=(const Context &)=delete
Context(const Context &)=delete
FlPixelBufferTexturePrivate * priv