Merge "Fix initialization of snapshot SkImage instance" into sc-qpr1-dev am: be0bdf6178 am: 201db897ea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15926060 Change-Id: I4e1cde89cc83a6cf4e06131691aea0aaa54dae82
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