Reland of SkShaderBase
Introduce a private base class (SkShaderBase), to hide
implementation details from the public interface (SkShader).
Change-Id: Ib1d76cde880bd51868b97408710f8bb38128e536
Reviewed-on: https://skia-review.googlesource.com/17925
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/bench/SkLinearBitmapPipelineBench.cpp b/bench/SkLinearBitmapPipelineBench.cpp
index 0a86778..bbacac7 100644
--- a/bench/SkLinearBitmapPipelineBench.cpp
+++ b/bench/SkLinearBitmapPipelineBench.cpp
@@ -15,7 +15,7 @@
#include "SkImage.h"
#include "SkLinearBitmapPipeline.h"
#include "SkPM4f.h"
-#include "SkShader.h"
+#include "SkShaderBase.h"
struct CommonBitmapFPBenchmark : public Benchmark {
CommonBitmapFPBenchmark(
@@ -201,10 +201,10 @@
SkAutoTMalloc<SkPMColor> buffer4b(width*height);
SkArenaAlloc alloc{0};
- const SkShader::ContextRec rec(fPaint, fM, nullptr,
- SkShader::ContextRec::kPMColor_DstType,
- nullptr);
- SkShader::Context* ctx = fPaint.getShader()->makeContext(rec, &alloc);
+ const SkShaderBase::ContextRec rec(fPaint, fM, nullptr,
+ SkShaderBase::ContextRec::kPMColor_DstType,
+ nullptr);
+ SkShaderBase::Context* ctx = as_SB(fPaint.getShader())->makeContext(rec, &alloc);
int count = 100;