From 94b928cd7d3d4d7168643057234dbae3cf52d9f2 Mon Sep 17 00:00:00 2001 From: Michael Ludwig Date: Tue, 3 Mar 2020 09:49:35 -0500 Subject: [PATCH] Fix GM for preAbandonGpu flag Change-Id: Ifc0ab9c5c41cf139a5b6f79e29e6c0112d563667 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274741 Commit-Queue: Michael Ludwig Reviewed-by: Michael Ludwig --- gm/imagefilters.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gm/imagefilters.cpp b/gm/imagefilters.cpp index cf2d22cbc5..116d69f00e 100644 --- a/gm/imagefilters.cpp +++ b/gm/imagefilters.cpp @@ -201,7 +201,10 @@ DEF_GM(return new SaveLayerWithBackdropGM();) DEF_SIMPLE_GM(imagefilters_effect_order, canvas, 512, 512) { sk_sp image(GetResourceAsImage("images/mandrill_256.png")); if (canvas->getGrContext()) { - image = image->makeTextureImage(canvas->getGrContext()); + sk_sp gpuImage = image->makeTextureImage(canvas->getGrContext()); + if (gpuImage) { + image = std::move(gpuImage); + } } SkISize kernelSize = SkISize::Make(3, 3);