exernalize imagefactory guard
authorreed <reed@google.com>
Fri, 15 Apr 2016 17:56:51 +0000 (10:56 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 15 Apr 2016 17:56:52 +0000 (10:56 -0700)
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

cmake/example.cpp
gyp/skia_for_android_framework_defines.gypi
include/core/SkImage.h
public.bzl

index 96bf4d3..20259b5 100644 (file)
@@ -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));
 
index 9f6b9ea..5512333 100644 (file)
@@ -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',
     ],
   },
index 6be3b6e..31985a6 100644 (file)
@@ -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
index ad5d231..aea55c6 100644 (file)
@@ -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",
 ]