Fixing build with SK_IGNORE_TO_STRING defined.

Change-Id: Id7238e427e490338d1f610255774c2069cfd4879
Reviewed-on: https://skia-review.googlesource.com/117060
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Kaloyan Donev 2018-03-28 15:27:32 +03:00 committed by Skia Commit-Bot
parent 23463004df
commit 560d283295
4 changed files with 5 additions and 2 deletions

View File

@ -32,7 +32,7 @@ public:
GrContext*, const GrColorSpaceInfo&) const override;
#endif
void toString(SkString* str) const override;
SK_TO_STRING_OVERRIDE()
static sk_sp<SkFlattenable> CreateProc(SkReadBuffer& buffer);
Factory getFactory() const override { return CreateProc; }

View File

@ -36,6 +36,7 @@ void SkOverdrawColorFilter::onAppendStages(SkRasterPipeline* p,
p->append(SkRasterPipeline::callback, ctx);
}
#ifndef SK_IGNORE_TO_STRING
void SkOverdrawColorFilter::toString(SkString* str) const {
str->append("SkOverdrawColorFilter (");
for (int i = 0; i < kNumColors; i++) {
@ -43,6 +44,7 @@ void SkOverdrawColorFilter::toString(SkString* str) const {
}
str->append(")");
}
#endif //SK_IGNORE_TO_STRING
void SkOverdrawColorFilter::flatten(SkWriteBuffer& buffer) const {
buffer.writeByteArray(fColors, kNumColors * sizeof(SkPMColor));

View File

@ -10,6 +10,7 @@
#include "SkRefCnt.h"
#include "SkTDArray.h"
#include "SkString.h"
class SkPDFDict;
class SkPDFObject;

View File

@ -261,6 +261,7 @@ void SkSweepGradient::toString(SkString* str) const {
str->append(")");
}
#endif
void SkSweepGradient::appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* p,
SkRasterPipeline*) const {
@ -269,4 +270,3 @@ void SkSweepGradient::appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline
SkMatrix::MakeTrans(fTBias , 0)));
}
#endif