diff options
Diffstat (limited to 'libs/hwui/RenderNode.h')
-rw-r--r-- | libs/hwui/RenderNode.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h index 6a0b1aafd7c7..8595b6e5f78a 100644 --- a/libs/hwui/RenderNode.h +++ b/libs/hwui/RenderNode.h @@ -345,6 +345,16 @@ public: return mSkiaLayer.get() ? mSkiaLayer->layerSurface.get() : nullptr; } + struct SnapshotResult { + sk_sp<SkImage> snapshot; + SkIRect outSubset; + SkIPoint outOffset; + }; + + std::optional<SnapshotResult> updateSnapshotIfRequired(GrRecordingContext* context, + const SkImageFilter* imageFilter, + const SkIRect& clipBounds); + skiapipeline::SkiaLayer* getSkiaLayer() const { return mSkiaLayer.get(); } /** @@ -375,6 +385,22 @@ private: */ std::unique_ptr<skiapipeline::SkiaLayer> mSkiaLayer; + /** + * SkImageFilter used to create the mSnapshotResult + */ + sk_sp<SkImageFilter> mTargetImageFilter; + + /** + * Clip bounds used to create the mSnapshotResult + */ + SkIRect mImageFilterClipBounds; + + /** + * Result of the most recent snapshot with additional metadata used to + * determine how to draw the contents + */ + SnapshotResult mSnapshotResult; + struct ClippedOutlineCache { // keys uint32_t outlineID = 0; |