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
This commit is contained in:
@@ -243,13 +243,12 @@ void RenderNodeDrawable::drawContent(SkCanvas* canvas) const {
|
|||||||
// the corresponding SkImageFilter each time.
|
// the corresponding SkImageFilter each time.
|
||||||
// See b/193145089 and b/197263715
|
// See b/193145089 and b/197263715
|
||||||
if (!Properties::enableRenderEffectCache) {
|
if (!Properties::enableRenderEffectCache) {
|
||||||
|
snapshotImage = renderNode->getLayerSurface()->makeImageSnapshot();
|
||||||
if (imageFilter) {
|
if (imageFilter) {
|
||||||
auto subset = SkIRect::MakeWH(srcBounds.width(), srcBounds.height());
|
auto subset = SkIRect::MakeWH(srcBounds.width(), srcBounds.height());
|
||||||
snapshotImage = snapshotImage->makeWithFilter(recordingContext, imageFilter,
|
snapshotImage = snapshotImage->makeWithFilter(recordingContext, imageFilter,
|
||||||
subset, clipBounds.roundOut(),
|
subset, clipBounds.roundOut(),
|
||||||
&srcBounds, &offset);
|
&srcBounds, &offset);
|
||||||
} else {
|
|
||||||
snapshotImage = renderNode->getLayerSurface()->makeImageSnapshot();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const auto snapshotResult = renderNode->updateSnapshotIfRequired(
|
const auto snapshotResult = renderNode->updateSnapshotIfRequired(
|
||||||
|
|||||||
Reference in New Issue
Block a user