Update gms to use new image filter factories
Bug: skia:9280
Change-Id: Ic7ca3a9c86025128bc45b89ea90aa4553287b8c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230879
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/gm/simple_magnification.cpp b/gm/simple_magnification.cpp
index 3c0a636..45f9b57 100644
--- a/gm/simple_magnification.cpp
+++ b/gm/simple_magnification.cpp
@@ -21,8 +21,7 @@
#include "include/core/SkString.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTypes.h"
-#include "include/effects/SkImageSource.h"
-#include "include/effects/SkMagnifierImageFilter.h"
+#include "include/effects/SkImageFilters.h"
#include "include/gpu/GrTypes.h"
#include <utility>
@@ -98,10 +97,10 @@
}
void draw(SkCanvas* canvas, sk_sp<SkImage> image, const SkIPoint& offset, int inset) {
- sk_sp<SkImageFilter> imgSrc(SkImageSource::Make(std::move(image)));
+ sk_sp<SkImageFilter> imgSrc(SkImageFilters::Image(std::move(image)));
SkRect srcRect = SkRect::MakeXYWH(1.0f, 1.0f, 2.0f, 2.0f);
- sk_sp<SkImageFilter> magFilter(SkMagnifierImageFilter::Make(srcRect, inset, imgSrc));
+ sk_sp<SkImageFilter> magFilter(SkImageFilters::Magnifier(srcRect, inset, imgSrc));
SkPaint paint;
paint.setImageFilter(std::move(magFilter));