exernalize imagefactory guard
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1897453002
TBR=
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review URL: https://codereview.chromium.org/1897453002
diff --git a/cmake/example.cpp b/cmake/example.cpp
index 96bf4d3..20259b5 100644
--- a/cmake/example.cpp
+++ b/cmake/example.cpp
@@ -80,7 +80,7 @@
canvas->drawText(msg, strlen(msg), 90,120, paint);
// Grab a snapshot of the surface as an immutable SkImage.
- std::shared_ptr<SkImage> image = adopt(surface->newImageSnapshot());
+ sk_sp<SkImage> image = surface->makeImageSnapshot();
// Encode that image as a .png into a blob in memory.
std::shared_ptr<SkData> png = adopt(image->encode(SkImageEncoder::kPNG_Type, 100));
diff --git a/gyp/skia_for_android_framework_defines.gypi b/gyp/skia_for_android_framework_defines.gypi
index 9f6b9ea..5512333 100644
--- a/gyp/skia_for_android_framework_defines.gypi
+++ b/gyp/skia_for_android_framework_defines.gypi
@@ -26,6 +26,7 @@
'SK_SUPPORT_LEGACY_NEW_SURFACE_API',
'SK_SUPPORT_LEGACY_PICTURE_PTR',
'SK_SUPPORT_LEGACY_MASKFILTER_PTR',
+ 'SK_SUPPORT_LEGACY_IMAGEFACTORY',
'SK_SUPPORT_LEGACY_XFERMODE_PTR',
],
},
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 6be3b6e..31985a6 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -28,8 +28,6 @@
class GrContextThreadSafeProxy;
class GrTexture;
-#define SK_SUPPORT_LEGACY_IMAGEFACTORY
-
/**
* SkImage is an abstraction for drawing a rectagle of pixels, though the
* particular type of image could be actually storing its data on the GPU, or
diff --git a/public.bzl b/public.bzl
index ad5d231..aea55c6 100644
--- a/public.bzl
+++ b/public.bzl
@@ -554,6 +554,7 @@
"SK_SUPPORT_LEGACY_PATHEFFECT_PTR",
"SK_SUPPORT_LEGACY_PICTURE_PTR",
"SK_SUPPORT_LEGACY_MASKFILTER_PTR",
+ "SK_SUPPORT_LEGACY_IMAGEFACTORY",
"SK_SUPPORT_LEGACY_XFERMODE_PTR",
]