diff options
author | 2016-04-15 10:56:51 -0700 | |
---|---|---|
committer | 2016-04-15 10:56:52 -0700 | |
commit | 2a04104ba0c40ea31f6bcf403bd69fda05935e5b (patch) | |
tree | 50156f4ed207593ea363eee56da50ce56352a8f5 | |
parent | 87a0c223e3685b303d6b14955d398e651f8b8c84 (diff) |
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
-rw-r--r-- | cmake/example.cpp | 2 | ||||
-rw-r--r-- | gyp/skia_for_android_framework_defines.gypi | 1 | ||||
-rw-r--r-- | include/core/SkImage.h | 2 | ||||
-rw-r--r-- | public.bzl | 1 |
4 files changed, 3 insertions, 3 deletions
diff --git a/cmake/example.cpp b/cmake/example.cpp index 96bf4d3ff8..20259b5589 100644 --- a/cmake/example.cpp +++ b/cmake/example.cpp @@ -80,7 +80,7 @@ int main(int, char**) { 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 9f6b9ea45b..55123335e3 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 6be3b6e54a..31985a6c69 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -28,8 +28,6 @@ class GrContext; 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 ad5d231d32..aea55c6722 100644 --- a/public.bzl +++ b/public.bzl @@ -554,6 +554,7 @@ DEFINES_ALL = [ "SK_SUPPORT_LEGACY_PATHEFFECT_PTR", "SK_SUPPORT_LEGACY_PICTURE_PTR", "SK_SUPPORT_LEGACY_MASKFILTER_PTR", + "SK_SUPPORT_LEGACY_IMAGEFACTORY", "SK_SUPPORT_LEGACY_XFERMODE_PTR", ] |