diff options
author | Cary Clark <caryclark@skia.org> | 2018-06-08 15:57:37 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-08 20:36:53 +0000 |
commit | 27dddae3130c8a6cfaa845195b2fb95cc691dd26 (patch) | |
tree | 248a7a0b76c427248b8aea1eb6ef203cefe15f33 /src/shaders/gradients | |
parent | a05a31aef4a0dc1af797aa454a2864a36260956b (diff) |
rebase
This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f.
Reason for revert: SkMatrix::toString use has been removed from flutter
and has been picked up in fuchsia
Additionally some bookmaker changes take into account recent
additions of typedef comments and the generated header comment.
Original change's description:
> Revert "remove toString"
>
> This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7.
>
> Reason for revert: broke flutter
>
> Original change's description:
> > remove toString
> >
> > toString may have been used by obsolete debugger only
> > find out if that is so
> >
> > R=​brianosman@google.com,bsalomon@google.com
> >
> > Docs-Preview: https://skia.org/?cl=119894
> > Bug:830651
> > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> > Reviewed-on: https://skia-review.googlesource.com/119894
> > Commit-Queue: Cary Clark <caryclark@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
>
> Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c
TBR=bsalomon@google.com,brianosman@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Reviewed-on: https://skia-review.googlesource.com/129623
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@google.com>
Docs-Preview: https://skia.org/?cl=133583
Bug: 830651
Change-Id: If8499e796be63580ad419e150e94d43e8b89de1b
Reviewed-on: https://skia-review.googlesource.com/133583
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'src/shaders/gradients')
-rw-r--r-- | src/shaders/gradients/SkGradientShader.cpp | 32 | ||||
-rw-r--r-- | src/shaders/gradients/SkGradientShaderPriv.h | 1 | ||||
-rw-r--r-- | src/shaders/gradients/SkLinearGradient.cpp | 10 | ||||
-rw-r--r-- | src/shaders/gradients/SkLinearGradient.h | 1 | ||||
-rw-r--r-- | src/shaders/gradients/SkRadialGradient.cpp | 16 | ||||
-rw-r--r-- | src/shaders/gradients/SkRadialGradient.h | 1 | ||||
-rw-r--r-- | src/shaders/gradients/SkSweepGradient.cpp | 14 | ||||
-rw-r--r-- | src/shaders/gradients/SkSweepGradient.h | 1 | ||||
-rw-r--r-- | src/shaders/gradients/SkTwoPointConicalGradient.cpp | 25 | ||||
-rw-r--r-- | src/shaders/gradients/SkTwoPointConicalGradient.h | 1 |
10 files changed, 0 insertions, 102 deletions
diff --git a/src/shaders/gradients/SkGradientShader.cpp b/src/shaders/gradients/SkGradientShader.cpp index 4c6a42571a..cfcd335f42 100644 --- a/src/shaders/gradients/SkGradientShader.cpp +++ b/src/shaders/gradients/SkGradientShader.cpp @@ -627,38 +627,6 @@ void SkGradientShaderBase::commonAsAGradient(GradientInfo* info) const { } } -void SkGradientShaderBase::toString(SkString* str) const { - - str->appendf("%d colors: ", fColorCount); - - for (int i = 0; i < fColorCount; ++i) { - str->appendHex(this->getLegacyColor(i), 8); - if (i < fColorCount-1) { - str->append(", "); - } - } - - if (fColorCount > 2) { - str->append(" points: ("); - for (int i = 0; i < fColorCount; ++i) { - str->appendScalar(this->getPos(i)); - if (i < fColorCount-1) { - str->append(", "); - } - } - str->append(")"); - } - - static const char* gTileModeName[SkShader::kTileModeCount] = { - "clamp", "repeat", "mirror", "decal", - }; - - str->append(" "); - str->append(gTileModeName[fTileMode]); - - this->INHERITED::toString(str); -} - /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// diff --git a/src/shaders/gradients/SkGradientShaderPriv.h b/src/shaders/gradients/SkGradientShaderPriv.h index dccb4e70cb..e50f1a69e4 100644 --- a/src/shaders/gradients/SkGradientShaderPriv.h +++ b/src/shaders/gradients/SkGradientShaderPriv.h @@ -80,7 +80,6 @@ protected: SkGradientShaderBase(SkReadBuffer& ); void flatten(SkWriteBuffer&) const override; - void toString(SkString* str) const override; void commonAsAGradient(GradientInfo*) const; diff --git a/src/shaders/gradients/SkLinearGradient.cpp b/src/shaders/gradients/SkLinearGradient.cpp index a377442dc4..34cac269f5 100644 --- a/src/shaders/gradients/SkLinearGradient.cpp +++ b/src/shaders/gradients/SkLinearGradient.cpp @@ -207,14 +207,4 @@ std::unique_ptr<GrFragmentProcessor> SkLinearGradient::asFragmentProcessor( #endif -void SkLinearGradient::toString(SkString* str) const { - str->append("SkLinearGradient ("); - - str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); - str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); - - this->INHERITED::toString(str); - - str->append(")"); -} diff --git a/src/shaders/gradients/SkLinearGradient.h b/src/shaders/gradients/SkLinearGradient.h index 111ed99744..d100a1cf30 100644 --- a/src/shaders/gradients/SkLinearGradient.h +++ b/src/shaders/gradients/SkLinearGradient.h @@ -19,7 +19,6 @@ public: std::unique_ptr<GrFragmentProcessor> asFragmentProcessor(const GrFPArgs&) const override; #endif - void toString(SkString* str) const override; SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLinearGradient) protected: diff --git a/src/shaders/gradients/SkRadialGradient.cpp b/src/shaders/gradients/SkRadialGradient.cpp index 6d193615a4..ec0f8a0f95 100644 --- a/src/shaders/gradients/SkRadialGradient.cpp +++ b/src/shaders/gradients/SkRadialGradient.cpp @@ -185,19 +185,3 @@ void SkRadialGradient::appendGradientStages(SkArenaAlloc*, SkRasterPipeline* p, SkRasterPipeline*) const { p->append(SkRasterPipeline::xy_to_radius); } - -void SkRadialGradient::toString(SkString* str) const { - str->append("SkRadialGradient: ("); - - str->append("center: ("); - str->appendScalar(fCenter.fX); - str->append(", "); - str->appendScalar(fCenter.fY); - str->append(") radius: "); - str->appendScalar(fRadius); - str->append(" "); - - this->INHERITED::toString(str); - - str->append(")"); -} diff --git a/src/shaders/gradients/SkRadialGradient.h b/src/shaders/gradients/SkRadialGradient.h index b0d6854221..d6963f6971 100644 --- a/src/shaders/gradients/SkRadialGradient.h +++ b/src/shaders/gradients/SkRadialGradient.h @@ -19,7 +19,6 @@ public: std::unique_ptr<GrFragmentProcessor> asFragmentProcessor(const GrFPArgs&) const override; #endif - void toString(SkString* str) const override; SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRadialGradient) protected: diff --git a/src/shaders/gradients/SkSweepGradient.cpp b/src/shaders/gradients/SkSweepGradient.cpp index c409d9a4e1..cfce5fe025 100644 --- a/src/shaders/gradients/SkSweepGradient.cpp +++ b/src/shaders/gradients/SkSweepGradient.cpp @@ -241,20 +241,6 @@ sk_sp<SkShader> SkSweepGradient::onMakeColorSpace(SkColorSpaceXformer* xformer) fGradFlags, &this->getLocalMatrix()); } -void SkSweepGradient::toString(SkString* str) const { - str->append("SkSweepGradient: ("); - - str->append("center: ("); - str->appendScalar(fCenter.fX); - str->append(", "); - str->appendScalar(fCenter.fY); - str->append(") "); - - this->INHERITED::toString(str); - - str->append(")"); -} - void SkSweepGradient::appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* p, SkRasterPipeline*) const { p->append(SkRasterPipeline::xy_to_unit_angle); diff --git a/src/shaders/gradients/SkSweepGradient.h b/src/shaders/gradients/SkSweepGradient.h index dce9a3561b..a58c95752d 100644 --- a/src/shaders/gradients/SkSweepGradient.h +++ b/src/shaders/gradients/SkSweepGradient.h @@ -20,7 +20,6 @@ public: std::unique_ptr<GrFragmentProcessor> asFragmentProcessor(const GrFPArgs&) const override; #endif - void toString(SkString* str) const override; SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSweepGradient) protected: diff --git a/src/shaders/gradients/SkTwoPointConicalGradient.cpp b/src/shaders/gradients/SkTwoPointConicalGradient.cpp index 73ec3f213b..7d5026bc22 100644 --- a/src/shaders/gradients/SkTwoPointConicalGradient.cpp +++ b/src/shaders/gradients/SkTwoPointConicalGradient.cpp @@ -199,31 +199,6 @@ sk_sp<SkShader> SkTwoPointConicalGradient::onMakeColorSpace(SkColorSpaceXformer* fTileMode, fGradFlags, &this->getLocalMatrix()); } - -void SkTwoPointConicalGradient::toString(SkString* str) const { - str->append("SkTwoPointConicalGradient: ("); - - str->append("center1: ("); - str->appendScalar(fCenter1.fX); - str->append(", "); - str->appendScalar(fCenter1.fY); - str->append(") radius1: "); - str->appendScalar(fRadius1); - str->append(" "); - - str->append("center2: ("); - str->appendScalar(fCenter2.fX); - str->append(", "); - str->appendScalar(fCenter2.fY); - str->append(") radius2: "); - str->appendScalar(fRadius2); - str->append(" "); - - this->INHERITED::toString(str); - - str->append(")"); -} - void SkTwoPointConicalGradient::appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* p, SkRasterPipeline* postPipeline) const { const auto dRadius = fRadius2 - fRadius1; diff --git a/src/shaders/gradients/SkTwoPointConicalGradient.h b/src/shaders/gradients/SkTwoPointConicalGradient.h index f0d341f17c..b965e15038 100644 --- a/src/shaders/gradients/SkTwoPointConicalGradient.h +++ b/src/shaders/gradients/SkTwoPointConicalGradient.h @@ -65,7 +65,6 @@ public: const SkMatrix& getGradientMatrix() const { return fPtsToUnit; } const FocalData& getFocalData() const { return fFocalData; } - void toString(SkString* str) const override; SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTwoPointConicalGradient) protected: |