Reland "Add new virts, hide old ones"
This reverts commit 8f924ac0ce63806886b7297e8be554984a6e7ce5.
Reason for revert: suppressions landed for fuchsia images to rebaseline
Original change's description:
> Revert "Add new virts, hide old ones"
>
> This reverts commit c56e2e5aa65dd129e5927224d2f6c1f82edff74e.
>
> Reason for revert: suspected of breaking chrome roll
>
> Original change's description:
> > Add new virts, hide old ones
> >
> > Add virtuals for the draw methods that now take sampling/filtermode.
> >
> > drawImage
> > drawImageRect
> > drawImageLattice
> > drawAtlas
> >
> > Add a flag that can remove the older virtuals, once each client has
> > stopped overriding them. In that situation, the older public methods
> > will simplify extract the sampling from the paint, and call the new
> > public methods.
> >
> > Bug: skia:11105, skia:7650
> > Change-Id: I8b0029727295caa983e8148fc743a55cfbecd043
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347022
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,fmalita@chromium.org,reed@google.com
>
> Change-Id: I0a90952c11a180d918126ea06a630f4a0bf9b49b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11105
> Bug: skia:7650
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348194
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Derek Sollenberger <djsollen@google.com>
TBR=djsollen@google.com,bsalomon@google.com,fmalita@chromium.org,reed@google.com
# Not skipping CQ checks because this is a reland.
Bug: skia:11105
Bug: skia:7650
Change-Id: Ia2b4537a2d330460b7554278d2c05075cf27162a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348876
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/samplecode/SampleAnimatedText.cpp b/samplecode/SampleAnimatedText.cpp
index f9bd925..80aafdc 100644
--- a/samplecode/SampleAnimatedText.cpp
+++ b/samplecode/SampleAnimatedText.cpp
@@ -73,7 +73,8 @@
sk_sp<SkImage> image = direct->priv().testingOnly_getFontAtlasImage(
GrMaskFormat::kA8_GrMaskFormat);
const SkRect rect = SkRect::MakeXYWH(512.0f, 10.0f, 512.0f, 512.0f);
- canvas->drawImageRect(image.get(), rect, rect, sampling, &paint);
+ canvas->drawImageRect(image.get(), rect, rect, sampling, &paint,
+ SkCanvas::kFast_SrcRectConstraint);
}
#endif
canvas->translate(180, 180);
diff --git a/samplecode/SampleFilterBounds.cpp b/samplecode/SampleFilterBounds.cpp
index bebdcc2..d9d699d 100644
--- a/samplecode/SampleFilterBounds.cpp
+++ b/samplecode/SampleFilterBounds.cpp
@@ -184,7 +184,7 @@
canvas->saveLayer(&localContentRect, &blurPaint);
canvas->drawImageRect(fImage.get(), localContentRect, localContentRect,
SkSamplingOptions(SkFilterMode::kLinear, SkMipmapMode::kNone),
- nullptr);
+ nullptr, SkCanvas::kFast_SrcRectConstraint);
canvas->restore();
// Now visualize the underlying bounds calculations used to determine the layer for the blur
diff --git a/samplecode/SampleThinAA.cpp b/samplecode/SampleThinAA.cpp
index 08b2b44..97be844 100644
--- a/samplecode/SampleThinAA.cpp
+++ b/samplecode/SampleThinAA.cpp
@@ -226,7 +226,8 @@
SkRect::MakeWH(kTileWidth, kTileHeight),
SkSamplingOptions(scale > 1.f ? kNone_SkFilterQuality
: kMedium_SkFilterQuality),
- &blit);
+ &blit,
+ SkCanvas::kFast_SrcRectConstraint);
}
private: