Skip to content

Instantly share code, notes, and snippets.

@nornagon
Created May 14, 2017 14:51
Show Gist options
  • Save nornagon/d801cabc36fa33ff4cd275cd2eecbefd to your computer and use it in GitHub Desktop.
Save nornagon/d801cabc36fa33ff4cd275cd2eecbefd to your computer and use it in GitHub Desktop.
Commenting stuff out that doesn't work when trying to bind Skia with JavaCPP
diff --git a/include/core/SkData.h b/include/core/SkData.h
index 0622c9f0fa..3af112e2a5 100644
--- a/include/core/SkData.h
+++ b/include/core/SkData.h
@@ -19,7 +19,7 @@ class SkStream;
* but the actual ptr that is returned (by data() or bytes()) is guaranteed
* to always be the same for the life of this instance.
*/
-class SK_API SkData final : public SkNVRefCnt<SkData> {
+class SK_API SkData /*final*/ : public SkNVRefCnt<SkData> {
public:
/**
* Returns the number of bytes stored.
diff --git a/include/core/SkDrawLooper.h b/include/core/SkDrawLooper.h
index 6d9a871ca3..5f3b1e40fd 100644
--- a/include/core/SkDrawLooper.h
+++ b/include/core/SkDrawLooper.h
@@ -64,7 +64,7 @@ public:
* Called right before something is being drawn. Returns a Context
* whose next() method should be called until it returns false.
*/
- virtual Context* makeContext(SkCanvas*, SkArenaAlloc*) const = 0;
+ //virtual Context* makeContext(SkCanvas*, SkArenaAlloc*) const = 0;
/**
* The fast bounds functions are used to enable the paint to be culled early
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index a6ade97b1f..68b55f238a 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -130,7 +130,7 @@ public:
* TODO: Right now the imagefilters sometimes return empty result bitmaps/
* specialimages. That doesn't seem quite right.
*/
- sk_sp<SkSpecialImage> filterImage(SkSpecialImage* src, const Context&, SkIPoint* offset) const;
+ //sk_sp<SkSpecialImage> filterImage(SkSpecialImage* src, const Context&, SkIPoint* offset) const;
enum MapDirection {
kForward_MapDirection,
diff --git a/include/core/SkMaskFilter.h b/include/core/SkMaskFilter.h
index 5cd5535904..bd2e6f6580 100644
--- a/include/core/SkMaskFilter.h
+++ b/include/core/SkMaskFilter.h
@@ -111,6 +111,7 @@ public:
const SkMatrix& ctm,
SkRect* maskRect) const;
+#if 0
/**
* Try to directly render the mask filter into the target. Returns true if drawing was
* successful. If false is returned then paint is unmodified.
@@ -147,6 +148,7 @@ public:
const SkMatrix& ctm,
const SkIRect& maskRect) const;
#endif
+#endif
/**
* The fast bounds function is used to enable the paint to be culled early
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 70f2acb6ab..66704678e9 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -206,6 +206,7 @@ private:
static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrome M39.
static const uint32_t CURRENT_PICTURE_VERSION = 53;
+ /*
static_assert(MIN_PICTURE_VERSION <= 41,
"Remove kFontFileName and related code from SkFontDescriptor.cpp.");
@@ -220,6 +221,7 @@ private:
static_assert(MIN_PICTURE_VERSION <= 48,
"Remove legacy gradient deserialization code from SkGradientShader.cpp.");
+ */
static bool IsValidPictInfo(const SkPictInfo& info);
static sk_sp<SkPicture> Forwardport(const SkPictInfo&,
diff --git a/include/core/SkRasterHandleAllocator.h b/include/core/SkRasterHandleAllocator.h
index e1cc83040e..a3b9137599 100644
--- a/include/core/SkRasterHandleAllocator.h
+++ b/include/core/SkRasterHandleAllocator.h
@@ -75,8 +75,8 @@ public:
* If rec is non-null, then it will be used as the base-layer of pixels/handle.
* If rec is null, then the allocator will be called for the base-layer as well.
*/
- static std::unique_ptr<SkCanvas> MakeCanvas(std::unique_ptr<SkRasterHandleAllocator>,
- const SkImageInfo&, const Rec* rec = nullptr);
+ /*static std::unique_ptr<SkCanvas> MakeCanvas(std::unique_ptr<SkRasterHandleAllocator>,
+ const SkImageInfo&, const Rec* rec = nullptr);*/
private:
friend class SkBitmapDevice;
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h
index 7f2b9199d0..9b6e7f4cf4 100644
--- a/include/core/SkTypeface.h
+++ b/include/core/SkTypeface.h
@@ -89,8 +89,8 @@ public:
* variation space. It is possible the number of axes can be retrieved but actual position
* cannot.
*/
- int getVariationDesignPosition(SkFontArguments::VariationPosition::Coordinate coordinates[],
- int coordinateCount) const;
+ /*int getVariationDesignPosition(SkFontArguments::VariationPosition::Coordinate coordinates[],
+ int coordinateCount) const;*/
/** Return a 32bit value for this typeface, unique for the underlying font
data. Will never return 0.
@@ -146,7 +146,7 @@ public:
/** Return a new typeface given font data and configuration. If the data
is not valid font data, returns nullptr.
*/
- static sk_sp<SkTypeface> MakeFromFontData(std::unique_ptr<SkFontData>);
+ //static sk_sp<SkTypeface> MakeFromFontData(std::unique_ptr<SkFontData>);
/** Write a unique signature to a stream, sufficient to reconstruct a
typeface referencing the same font when Deserialize is called.
@@ -295,16 +295,16 @@ public:
/**
* Return the font data, or nullptr on failure.
*/
- std::unique_ptr<SkFontData> makeFontData() const;
+ //std::unique_ptr<SkFontData> makeFontData() const;
/**
* Return a scalercontext for the given descriptor. If this fails, then
* if allowFailure is true, this returns NULL, else it returns a
* dummy scalercontext that will not crash, but will draw nothing.
*/
- std::unique_ptr<SkScalerContext> createScalerContext(const SkScalerContextEffects&,
+ /*std::unique_ptr<SkScalerContext> createScalerContext(const SkScalerContextEffects&,
const SkDescriptor*,
- bool allowFailure = false) const;
+ bool allowFailure = false) const;*/
/**
* Return a rectangle (scaled to 1-pt) that represents the union of the bounds of all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment