SkShader::asACompose is android-only
Bug: skia:
Change-Id: Ib99a7ee4984544f342699fa6b20797c55be7d5a0
Reviewed-on: https://skia-review.googlesource.com/19268
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index daed2ba..61da334 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -157,21 +157,14 @@
virtual GradientType asAGradient(GradientInfo* info) const;
- /**
- * If the shader subclass is composed of two shaders, return true, and if rec is not NULL,
- * fill it out with info about the shader.
- *
- * These are bare pointers; the ownership and reference count are unchanged.
- */
-
- // TODO: clean up clients, move to SkShaderBase.
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
struct ComposeRec {
const SkShader* fShaderA;
const SkShader* fShaderB;
SkBlendMode fBlendMode;
};
-
virtual bool asACompose(ComposeRec*) const { return false; }
+#endif
//////////////////////////////////////////////////////////////////////////
// Methods to create combinations or variants of shaders
diff --git a/src/shaders/SkComposeShader.cpp b/src/shaders/SkComposeShader.cpp
index 3155784..1eae163 100644
--- a/src/shaders/SkComposeShader.cpp
+++ b/src/shaders/SkComposeShader.cpp
@@ -69,6 +69,7 @@
fMode, fLerpT);
}
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
bool SkComposeShader::asACompose(ComposeRec* rec) const {
if (!this->isJustMode()) {
return false;
@@ -81,6 +82,7 @@
}
return true;
}
+#endif
bool SkComposeShader::onAppendStages(SkRasterPipeline* pipeline, SkColorSpace* dstCS,
SkArenaAlloc* alloc, const SkMatrix& ctm,
diff --git a/src/shaders/SkComposeShader.h b/src/shaders/SkComposeShader.h
index 0386100..a3b5b21 100644
--- a/src/shaders/SkComposeShader.h
+++ b/src/shaders/SkComposeShader.h
@@ -31,7 +31,9 @@
SkShader* getShaderB() { return fShaderB.get(); }
#endif
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
bool asACompose(ComposeRec* rec) const override;
+#endif
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeShader)