Reland "Remove deprecated SkImageFilter::MakeMatrixFilter"
This reverts commitfde740c7f2
. Reason for revert: g3 updated so roll won't be stopped Original change's description: > Revert "Remove deprecated SkImageFilter::MakeMatrixFilter" > > This reverts commited63d4f177
. > > Reason for revert: Breaking G3 roll? > > Original change's description: > > Remove deprecated SkImageFilter::MakeMatrixFilter > > > > The equivalent functionality is available in > > include/effects/SkImageFilters.h via SkImageFilters::MatrixTransform. > > > > Bug: skia:11230 > > Change-Id: I77b78d508d653a32c913a7599f1004ab634e3e6d > > Docs-Preview: https://skia.org/?cl=361497 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361497 > > Commit-Queue: Michael Ludwig <michaelludwig@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > Auto-Submit: Michael Ludwig <michaelludwig@google.com> > > Reviewed-by: Mike Reed <reed@google.com> > > TBR=reed@google.com,michaelludwig@google.com > > Change-Id: I60a98a1ca9a42db6bfc5796cf4df69042571161e > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:11230 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364097 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:11230 Change-Id: I76ef4d762151475c498e8cf9392bc2191d84fe1a Docs-Preview: https://skia.org/?cl=366318 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366318 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This commit is contained in:
parent
4fca9956db
commit
7c6abf86f5
@ -7,6 +7,10 @@ This file includes a list of high level updates for each milestone release.
|
||||
Milestone 90
|
||||
------------
|
||||
|
||||
* Remove SkImageFilter::MakeMatrixFilter as it was unused and replaced with
|
||||
SkImageFilters::MatrixTransform.
|
||||
https://review.skia.org/366318
|
||||
|
||||
* Refactored particle system to use a single code string containing both Effect and Particle code.
|
||||
Uniform APIs are now shared for all program entry points, and no longer prefixed with 'Effect'
|
||||
or 'Particle'. For example, instead of `SkParticleEffect::effectUniformInfo` and
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "include/core/SkColor.h"
|
||||
#include "include/core/SkFilterQuality.h"
|
||||
#include "include/core/SkImage.h"
|
||||
#include "include/core/SkImageFilter.h"
|
||||
#include "include/core/SkMatrix.h"
|
||||
#include "include/core/SkPaint.h"
|
||||
#include "include/core/SkRect.h"
|
||||
|
@ -94,16 +94,6 @@ public:
|
||||
*/
|
||||
sk_sp<SkImageFilter> makeWithLocalMatrix(const SkMatrix& matrix) const;
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_MATRIX_IMAGEFILTER
|
||||
/**
|
||||
* Return an imagefilter which transforms its input by the given matrix.
|
||||
* DEPRECATED: Use include/effects/SkImageFilters::MatrixTransform
|
||||
*/
|
||||
static sk_sp<SkImageFilter> MakeMatrixFilter(const SkMatrix& matrix,
|
||||
SkFilterQuality quality,
|
||||
sk_sp<SkImageFilter> input);
|
||||
#endif
|
||||
|
||||
static SkFlattenable::Type GetFlattenableType() {
|
||||
return kSkImageFilter_Type;
|
||||
}
|
||||
|
@ -3777,7 +3777,7 @@
|
||||
"name": "Xor"
|
||||
},
|
||||
"Canvas_Clip": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n SkPaint redPaint, scalePaint;\n redPaint.setAntiAlias(true);\n redPaint.setColor(SK_ColorRED);\n canvas->save();\n for (bool antialias : { false, true } ) {\n canvas->save();\n canvas->clipRect(SkRect::MakeWH(19.5f, 11.5f), antialias);\n canvas->drawCircle(17, 11, 8, redPaint);\n canvas->restore();\n canvas->translate(16, 0);\n }\n canvas->restore();\n SkMatrix matrix;\n matrix.setScale(6, 6);\n scalePaint.setImageFilter(\n SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr));\n SkCanvas::SaveLayerRec saveLayerRec(\n nullptr, &scalePaint, SkCanvas::kInitWithPrevious_SaveLayerFlag);\n canvas->saveLayer(saveLayerRec);\n canvas->restore();\n}",
|
||||
"code": "void draw(SkCanvas* canvas) {\n SkPaint redPaint, scalePaint;\n redPaint.setAntiAlias(true);\n redPaint.setColor(SK_ColorRED);\n canvas->save();\n for (bool antialias : { false, true } ) {\n canvas->save();\n canvas->clipRect(SkRect::MakeWH(19.5f, 11.5f), antialias);\n canvas->drawCircle(17, 11, 8, redPaint);\n canvas->restore();\n canvas->translate(16, 0);\n }\n canvas->restore();\n SkMatrix matrix;\n matrix.setScale(6, 6);\n scalePaint.setImageFilter(\n SkImageFilters::MatrixTransform(matrix, SkSamplingOptions(), nullptr));\n SkCanvas::SaveLayerRec saveLayerRec(\n nullptr, &scalePaint, SkCanvas::kInitWithPrevious_SaveLayerFlag);\n canvas->saveLayer(saveLayerRec);\n canvas->restore();\n}",
|
||||
"width": 256,
|
||||
"height": 90,
|
||||
"hash": "862cc026601a41a58df49c0b9f0d7777",
|
||||
@ -4609,7 +4609,7 @@
|
||||
"name": "SkCanvas::PointMode"
|
||||
},
|
||||
"SkCanvas_SaveLayerFlagsSet": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n SkPaint redPaint, bluePaint, scalePaint;\n redPaint.setColor(SK_ColorRED);\n canvas->drawCircle(21, 21, 8, redPaint);\n bluePaint.setColor(SK_ColorBLUE);\n canvas->drawCircle(31, 21, 8, bluePaint);\n SkMatrix matrix;\n matrix.setScale(4, 4);\n scalePaint.setAlpha(0x40);\n scalePaint.setImageFilter(\n SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr));\n SkCanvas::SaveLayerRec saveLayerRec(nullptr, &scalePaint,\n SkCanvas::kInitWithPrevious_SaveLayerFlag);\n canvas->saveLayer(saveLayerRec);\n canvas->restore();\n}\n",
|
||||
"code": "void draw(SkCanvas* canvas) {\n SkPaint redPaint, bluePaint, scalePaint;\n redPaint.setColor(SK_ColorRED);\n canvas->drawCircle(21, 21, 8, redPaint);\n bluePaint.setColor(SK_ColorBLUE);\n canvas->drawCircle(31, 21, 8, bluePaint);\n SkMatrix matrix;\n matrix.setScale(4, 4);\n scalePaint.setAlpha(0x40);\n scalePaint.setImageFilter(\n SkImageFilters::MatrixTransform(matrix, SkSamplingOptions(), nullptr));\n SkCanvas::SaveLayerRec saveLayerRec(nullptr, &scalePaint,\n SkCanvas::kInitWithPrevious_SaveLayerFlag);\n canvas->saveLayer(saveLayerRec);\n canvas->restore();\n}\n",
|
||||
"width": 256,
|
||||
"height": 160,
|
||||
"hash": "05db6a937225e8e31ae3481173d25dae",
|
||||
@ -4617,7 +4617,7 @@
|
||||
"name": "SkCanvas::SaveLayerFlagsSet"
|
||||
},
|
||||
"SkCanvas_SaveLayerRec": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n SkPaint redPaint, bluePaint;\n redPaint.setAntiAlias(true);\n redPaint.setColor(SK_ColorRED);\n canvas->drawCircle(21, 21, 8, redPaint);\n bluePaint.setColor(SK_ColorBLUE);\n canvas->drawCircle(31, 21, 8, bluePaint);\n SkMatrix matrix;\n matrix.setScale(4, 4);\n auto scaler = SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr);\n SkCanvas::SaveLayerRec saveLayerRec(nullptr, nullptr, scaler.get(), 0);\n canvas->saveLayer(saveLayerRec);\n canvas->drawCircle(125, 85, 8, redPaint);\n canvas->restore();\n}\n",
|
||||
"code": "void draw(SkCanvas* canvas) {\n SkPaint redPaint, bluePaint;\n redPaint.setAntiAlias(true);\n redPaint.setColor(SK_ColorRED);\n canvas->drawCircle(21, 21, 8, redPaint);\n bluePaint.setColor(SK_ColorBLUE);\n canvas->drawCircle(31, 21, 8, bluePaint);\n SkMatrix matrix;\n matrix.setScale(4, 4);\n auto scaler = SkImageFilters::MatrixTransform(matrix, SkSamplingOptions(), nullptr);\n SkCanvas::SaveLayerRec saveLayerRec(nullptr, nullptr, scaler.get(), 0);\n canvas->saveLayer(saveLayerRec);\n canvas->drawCircle(125, 85, 8, redPaint);\n canvas->restore();\n}\n",
|
||||
"width": 256,
|
||||
"height": 160,
|
||||
"hash": "ee8c0b120234e27364f8c9a786cf8f89",
|
||||
@ -9689,4 +9689,3 @@ onclick="handleMouseClick()"
|
||||
></canvas >
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -128,15 +128,6 @@ bool SkImageFilter::asAColorFilter(SkColorFilter** filterPtr) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_MATRIX_IMAGEFILTER
|
||||
sk_sp<SkImageFilter> SkImageFilter::MakeMatrixFilter(const SkMatrix& matrix,
|
||||
SkFilterQuality filterQuality,
|
||||
sk_sp<SkImageFilter> input) {
|
||||
SkSamplingOptions sampling(filterQuality, SkSamplingOptions::kMedium_asMipmapLinear);
|
||||
return SkMatrixImageFilter::Make(matrix, sampling, std::move(input));
|
||||
}
|
||||
#endif
|
||||
|
||||
sk_sp<SkImageFilter> SkImageFilter::makeWithLocalMatrix(const SkMatrix& matrix) const {
|
||||
return SkLocalMatrixImageFilter::Make(matrix, this->refMe());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user