diff options
author | Nader Jawad <njawad@google.com> | 2021-09-27 17:48:15 -0700 |
---|---|---|
committer | Nader Jawad <njawad@google.com> | 2021-09-28 02:30:40 +0000 |
commit | 74eaabead96664fadc25e19d6d165cc58790ac9c (patch) | |
tree | 8d1453beba6ea27126541f0cd88be225c2160e67 /libs/hwui/pipeline/skia/RenderNodeDrawable.cpp | |
parent | 16517d739ddd7b9cf4d9be9a916265f2795d62fb (diff) |
Fix initialization of snapshot SkImage instance
Fix issue where the initial snapshot used to create a
resultant SkImage instance with an SkImageFilter applied
was not initialized.
Fixes: 201312688
Test: Re-ran CTS tests
Change-Id: I2440a161c70076850479c562c7c9e6dc8d756236
Diffstat (limited to 'libs/hwui/pipeline/skia/RenderNodeDrawable.cpp')
-rw-r--r-- | libs/hwui/pipeline/skia/RenderNodeDrawable.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp index 2c81c971f7a6..48145d2331ee 100644 --- a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp +++ b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp @@ -243,13 +243,12 @@ void RenderNodeDrawable::drawContent(SkCanvas* canvas) const { // the corresponding SkImageFilter each time. // See b/193145089 and b/197263715 if (!Properties::enableRenderEffectCache) { + snapshotImage = renderNode->getLayerSurface()->makeImageSnapshot(); if (imageFilter) { auto subset = SkIRect::MakeWH(srcBounds.width(), srcBounds.height()); snapshotImage = snapshotImage->makeWithFilter(recordingContext, imageFilter, subset, clipBounds.roundOut(), &srcBounds, &offset); - } else { - snapshotImage = renderNode->getLayerSurface()->makeImageSnapshot(); } } else { const auto snapshotResult = renderNode->updateSnapshotIfRequired( |