Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: src/core/SkSpecialImage.cpp

Issue 1704603002: Change signature of SkSpecialImage::draw to take SkScalars (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkSpecialImage.h ('k') | src/core/SkSpecialSurface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpecialImage.cpp
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp
index 50447fc1e964ade4fe65bf42930e4e462c5ce735..4fed2ac24a0afdcd866e5234de79aa31f8fbdc45 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -15,7 +15,7 @@ public:
SkSpecialImage_Base(const SkIRect& subset) : INHERITED(subset) { }
virtual ~SkSpecialImage_Base() { }
- virtual void onDraw(SkCanvas*, int x, int y, const SkPaint*) const = 0;
+ virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const = 0;
virtual bool onPeekPixels(SkPixmap*) const { return false; }
@@ -32,7 +32,7 @@ static inline const SkSpecialImage_Base* as_IB(const SkSpecialImage* image) {
return static_cast<const SkSpecialImage_Base*>(image);
}
-void SkSpecialImage::draw(SkCanvas* canvas, int x, int y, const SkPaint* paint) const {
+void SkSpecialImage::draw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint) const {
return as_IB(this)->onDraw(canvas, x, y, paint);
}
@@ -64,7 +64,7 @@ public:
~SkSpecialImage_Image() override { }
- void onDraw(SkCanvas* canvas, int x, int y, const SkPaint* paint) const override {
+ void onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint) const override {
SkRect dst = SkRect::MakeXYWH(x, y, this->subset().width(), this->subset().height());
canvas->drawImageRect(fImage, this->subset(),
@@ -129,7 +129,7 @@ public:
~SkSpecialImage_Raster() override { }
- void onDraw(SkCanvas* canvas, int x, int y, const SkPaint* paint) const override {
+ void onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint) const override {
SkRect dst = SkRect::MakeXYWH(x, y,
this->subset().width(), this->subset().height());
@@ -181,7 +181,7 @@ public:
~SkSpecialImage_Gpu() override { }
- void onDraw(SkCanvas* canvas, int x, int y, const SkPaint* paint) const override {
+ void onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint) const override {
SkRect dst = SkRect::MakeXYWH(x, y,
this->subset().width(), this->subset().height());
« no previous file with comments | « src/core/SkSpecialImage.h ('k') | src/core/SkSpecialSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698