Mark some CPDF_Function methods as skia-only

These are only called from core/fxge/skia/fx_skia_device.cpp

Change-Id: If42eb69fa8e3dd0dac0ed4d507eb8b57e819b42c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/82551
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_function.cpp b/core/fpdfapi/page/cpdf_function.cpp
index 5011cdc..a8c6463 100644
--- a/core/fpdfapi/page/cpdf_function.cpp
+++ b/core/fpdfapi/page/cpdf_function.cpp
@@ -162,6 +162,7 @@
   return ymin + (divisor ? (x - xmin) * (ymax - ymin) / divisor : 0);
 }
 
+#if defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
 const CPDF_SampledFunc* CPDF_Function::ToSampledFunc() const {
   return m_Type == Type::kType0Sampled
              ? static_cast<const CPDF_SampledFunc*>(this)
@@ -179,3 +180,4 @@
              ? static_cast<const CPDF_StitchFunc*>(this)
              : nullptr;
 }
+#endif  // defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
diff --git a/core/fpdfapi/page/cpdf_function.h b/core/fpdfapi/page/cpdf_function.h
index fd68b6b..03c21aa 100644
--- a/core/fpdfapi/page/cpdf_function.h
+++ b/core/fpdfapi/page/cpdf_function.h
@@ -45,9 +45,11 @@
                     float ymin,
                     float ymax) const;
 
+#if defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
   const CPDF_SampledFunc* ToSampledFunc() const;
   const CPDF_ExpIntFunc* ToExpIntFunc() const;
   const CPDF_StitchFunc* ToStitchFunc() const;
+#endif  // defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
 
  protected:
   explicit CPDF_Function(Type type);