diff options
author | schenney <schenney@chromium.org> | 2015-10-06 12:59:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-06 12:59:55 -0700 |
commit | 95376a0dde3cdf414eb97a20cef3af19ed7e0151 (patch) | |
tree | b304b560eec5feed75d621c1aa3ec9a7df2573d9 /gm | |
parent | ccb88bcab03c2d7450b25f614b9203b8b9d7640d (diff) |
Revert of factories should return baseclass, allowing the impl to specialize (patchset #4 id:60001 of https://codereview.chromium.org/1390523005/ )
Reason for revert:
Breaks Chrome with this link error: ../../third_party/skia/include/effects/SkMorphologyImageFilter.h:75: error: undefined reference to 'SkMorphologyImageFilter::SkMorphologyImageFilter(int, int, SkImageFilter*, SkImageFilter::CropRect const*)'
../../third_party/skia/include/effects/SkMorphologyImageFilter.h:104: error: undefined reference to 'SkMorphologyImageFilter::SkMorphologyImageFilter(int, int, SkImageFilter*, SkImageFilter::CropRect const*)'
Presumably due to code in third_party/WebKit/Source/platform/graphics/filters/FEMorphology.cpp that contains:
#include "SkMorphologyImageFilter.h"
...
if (m_type == FEMORPHOLOGY_OPERATOR_DILATE)
return adoptRef(SkDilateImageFilter::Create(radiusX, radiusY, input.get(), &rect));
return adoptRef(SkErodeImageFilter::Create(radiusX, radiusY, input.get(), &rect));
Original issue's description:
> factories should return baseclass, allowing the impl to specialize
>
> waiting on https://codereview.chromium.org/1386163002/# to land
>
> BUG=skia:4424
>
> Committed: https://skia.googlesource.com/skia/+/80a6dcaa1b757826ed7414f64b035d512d9ccbf8
TBR=senorblanco@google.com,robertphillips@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4424
Review URL: https://codereview.chromium.org/1389063002
Diffstat (limited to 'gm')
-rw-r--r-- | gm/bigtileimagefilter.cpp | 4 | ||||
-rw-r--r-- | gm/filterfastbounds.cpp | 10 | ||||
-rw-r--r-- | gm/pictureimagefilter.cpp | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/gm/bigtileimagefilter.cpp b/gm/bigtileimagefilter.cpp index f2164e8e2f..20c462b744 100644 --- a/gm/bigtileimagefilter.cpp +++ b/gm/bigtileimagefilter.cpp @@ -56,7 +56,7 @@ protected: SkRect bound = SkRect::MakeWH(SkIntToScalar(kWidth), SkIntToScalar(kHeight)); SkAutoTUnref<SkImageFilter> imageSource(SkImageSource::Create(fRedImage)); - SkAutoTUnref<SkImageFilter> tif(SkTileImageFilter::Create( + SkAutoTUnref<SkTileImageFilter> tif(SkTileImageFilter::Create( SkRect::MakeWH(SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize)), SkRect::MakeWH(SkIntToScalar(kWidth), SkIntToScalar(kHeight)), imageSource)); @@ -71,7 +71,7 @@ protected: SkRect bound2 = SkRect::MakeWH(SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize)); - SkAutoTUnref<SkImageFilter> tif2(SkTileImageFilter::Create( + SkAutoTUnref<SkTileImageFilter> tif2(SkTileImageFilter::Create( SkRect::MakeWH(SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize)), SkRect::MakeWH(SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize)), nullptr)); diff --git a/gm/filterfastbounds.cpp b/gm/filterfastbounds.cpp index d484c4211c..dcff05bfcc 100644 --- a/gm/filterfastbounds.cpp +++ b/gm/filterfastbounds.cpp @@ -113,7 +113,7 @@ static void create_paints(SkImageFilter* source, SkTArray<SkPaint>* paints) { static const SkDropShadowImageFilter::ShadowMode kBoth = SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode; - SkAutoTUnref<SkImageFilter> dsif( + SkAutoTUnref<SkDropShadowImageFilter> dsif( SkDropShadowImageFilter::Create(10.0f, 10.0f, 3.0f, 3.0f, SK_ColorRED, kBoth, @@ -123,7 +123,7 @@ static void create_paints(SkImageFilter* source, SkTArray<SkPaint>* paints) { } { - SkAutoTUnref<SkImageFilter> dsif( + SkAutoTUnref<SkDropShadowImageFilter> dsif( SkDropShadowImageFilter::Create(27.0f, 27.0f, 3.0f, 3.0f, SK_ColorRED, @@ -134,13 +134,13 @@ static void create_paints(SkImageFilter* source, SkTArray<SkPaint>* paints) { } { - SkAutoTUnref<SkImageFilter> bif(SkBlurImageFilter::Create(3, 3, source)); + SkAutoTUnref<SkBlurImageFilter> bif(SkBlurImageFilter::Create(3, 3, source)); add_paint(bif, paints); } { - SkAutoTUnref<SkImageFilter> oif(SkOffsetImageFilter::Create(15, 15, source)); + SkAutoTUnref<SkOffsetImageFilter> oif(SkOffsetImageFilter::Create(15, 15, source)); add_paint(oif, paints); } @@ -246,7 +246,7 @@ protected: pic.reset(rec.endRecording()); } - SkAutoTUnref<SkImageFilter> pif(SkPictureImageFilter::Create(pic)); + SkAutoTUnref<SkPictureImageFilter> pif(SkPictureImageFilter::Create(pic)); SkTArray<SkPaint> pifPaints; create_paints(pif, &pifPaints); diff --git a/gm/pictureimagefilter.cpp b/gm/pictureimagefilter.cpp index ad479171fd..7f6cfbdd9a 100644 --- a/gm/pictureimagefilter.cpp +++ b/gm/pictureimagefilter.cpp @@ -57,16 +57,16 @@ protected: SkRect srcRect = SkRect::MakeXYWH(20, 20, 30, 30); SkRect emptyRect = SkRect::MakeXYWH(20, 20, 0, 0); SkRect bounds = SkRect::MakeXYWH(0, 0, 100, 100); - SkAutoTUnref<SkImageFilter> pictureSource( + SkAutoTUnref<SkPictureImageFilter> pictureSource( SkPictureImageFilter::Create(fPicture)); - SkAutoTUnref<SkImageFilter> pictureSourceSrcRect( + SkAutoTUnref<SkPictureImageFilter> pictureSourceSrcRect( SkPictureImageFilter::Create(fPicture, srcRect)); - SkAutoTUnref<SkImageFilter> pictureSourceEmptyRect( + SkAutoTUnref<SkPictureImageFilter> pictureSourceEmptyRect( SkPictureImageFilter::Create(fPicture, emptyRect)); - SkAutoTUnref<SkImageFilter> pictureSourceResampled( + SkAutoTUnref<SkPictureImageFilter> pictureSourceResampled( SkPictureImageFilter::CreateForLocalSpace(fPicture, fPicture->cullRect(), kLow_SkFilterQuality)); - SkAutoTUnref<SkImageFilter> pictureSourcePixelated( + SkAutoTUnref<SkPictureImageFilter> pictureSourcePixelated( SkPictureImageFilter::CreateForLocalSpace(fPicture, fPicture->cullRect(), kNone_SkFilterQuality)); |