remove SK_SUPPORT_LEGACY_REFENCODEDDATA_NOCTX flag
authorMike Reed <reed@google.com>
Thu, 8 Dec 2016 18:41:10 +0000 (13:41 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Thu, 8 Dec 2016 19:25:49 +0000 (19:25 +0000)
BUG=skia:

Change-Id: I51b7778db8b596b2633b6be9488af984cee2af70
Reviewed-on: https://skia-review.googlesource.com/5713
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
include/core/SkImageGenerator.h
src/codec/SkCodecImageGenerator.cpp
src/codec/SkCodecImageGenerator.h
src/core/SkImageGenerator.cpp
src/ports/SkImageGeneratorCG.cpp
src/ports/SkImageGeneratorCG.h
src/ports/SkImageGeneratorWIC.cpp
src/ports/SkImageGeneratorWIC.h

index e775d9e02c51f0b2e508057864418876abd70ce0..7bb4669017ec7d11606fc89e8f1c72eb808efd02 100644 (file)
@@ -25,12 +25,6 @@ class SkMatrix;
 class SkPaint;
 class SkPicture;
 
-#ifdef SK_SUPPORT_LEGACY_REFENCODEDDATA_NOCTX
-    #define SK_REFENCODEDDATA_CTXPARAM
-#else
-    #define SK_REFENCODEDDATA_CTXPARAM  GrContext* ctx
-#endif
-
 class SK_API SkImageGenerator : public SkNoncopyable {
 public:
     /**
@@ -51,11 +45,7 @@ public:
      *  unref() on the data when it is finished.
      */
     SkData* refEncodedData(GrContext* ctx = nullptr) {
-#ifdef SK_SUPPORT_LEGACY_REFENCODEDDATA_NOCTX
-        return this->onRefEncodedData();
-#else
         return this->onRefEncodedData(ctx);
-#endif
     }
 
     /**
@@ -257,7 +247,7 @@ protected:
 
     SkImageGenerator(const SkImageInfo& info, uint32_t uniqueId = kNeedNewImageUniqueID);
 
-    virtual SkData* onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM);
+    virtual SkData* onRefEncodedData(GrContext* ctx);
 
     virtual bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
                              SkPMColor ctable[], int* ctableCount);
index 9f85971f898025943e1afdc3938f33c4bb4b51d7..447332b2c775a901b03060ca8b4f77dbbe344b1b 100644 (file)
@@ -30,7 +30,7 @@ SkCodecImageGenerator::SkCodecImageGenerator(SkCodec* codec, sk_sp<SkData> data)
     , fData(std::move(data))
 {}
 
-SkData* SkCodecImageGenerator::onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) {
+SkData* SkCodecImageGenerator::onRefEncodedData(GrContext* ctx) {
     return SkRef(fData.get());
 }
 
index 3abc9089d4a4a9bca803c4a550c6354aa5526a5f..222923b295bffd2de4065101bdad23728cb0996f 100644 (file)
@@ -21,7 +21,7 @@ public:
     }
 
 protected:
-    SkData* onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) override;
+    SkData* onRefEncodedData(GrContext* ctx) override;
 
     bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor ctable[],
             int* ctableCount) override;
index 5bb385e51b40432d8080beb37e107d5989f10064..377c873ec9616de7d6bc0e727bf980d7a658deb7 100644 (file)
@@ -116,7 +116,7 @@ bool SkImageGenerator::accessScaledImage(const SkRect& src, const SkMatrix& matr
 
 /////////////////////////////////////////////////////////////////////////////////////////////
 
-SkData* SkImageGenerator::onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) {
+SkData* SkImageGenerator::onRefEncodedData(GrContext* ctx) {
     return nullptr;
 }
 
index c54eebf9c7b212cd267d45f05ad1ffbe56bdd1f2..700a7b9a34711859c36cb15149228109ed5dfd8d 100644 (file)
@@ -75,7 +75,7 @@ SkImageGeneratorCG::SkImageGeneratorCG(const SkImageInfo& info, const void* imag
     , fData(SkRef(data))
 {}
 
-SkData* SkImageGeneratorCG::onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) {
+SkData* SkImageGeneratorCG::onRefEncodedData(GrContext* ctx) {
     return SkRef(fData.get());
 }
 
index baf3669ffce4cfad4ccd49fdb51a565c754888dc..9ecfe1b1fe2901e7b643f60ac2636bd448917e1d 100644 (file)
@@ -22,7 +22,7 @@ public:
     static SkImageGenerator* NewFromEncodedCG(SkData* data);
 
 protected:
-    SkData* onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) override;
+    SkData* onRefEncodedData(GrContext* ctx) override;
 
     bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor ctable[],
             int* ctableCount) override;
index 52d1377f20cc06fb3259456bc4e6de8f9aa11328..1232f35bd8f36736be9845c56a0532b8f19163e8 100644 (file)
@@ -132,7 +132,7 @@ SkImageGeneratorWIC::SkImageGeneratorWIC(const SkImageInfo& info,
     , fData(SkRef(data))
 {}
 
-SkData* SkImageGeneratorWIC::onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) {
+SkData* SkImageGeneratorWIC::onRefEncodedData(GrContext* ctx) {
     return SkRef(fData.get());
 }
 
index 76cb6df1a36ff344ab3ad584304521722926d5fc..eb65e0b6780cc90afd730a0977ed165f9eeb4a3c 100644 (file)
@@ -39,7 +39,7 @@ public:
     static SkImageGenerator* NewFromEncodedWIC(SkData* data);
 
 protected:
-    SkData* onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) override;
+    SkData* onRefEncodedData(GrContext* ctx) override;
 
     bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor ctable[],
             int* ctableCount) override;