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

Unified Diff: src/effects/SkPictureImageFilter.cpp

Issue 182983003: Factory methods for heap-allocated SkImageFilter objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 6 years, 9 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/effects/SkMatrixConvolutionImageFilter.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPictureImageFilter.cpp
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp
index 6e76231867e785e56d5dfde34685f6cd5815b180..8db9914930c85cbf53bf48810a07107990f9cce5 100644
--- a/src/effects/SkPictureImageFilter.cpp
+++ b/src/effects/SkPictureImageFilter.cpp
@@ -15,15 +15,15 @@
SkPictureImageFilter::SkPictureImageFilter(SkPicture* picture)
: INHERITED(0, 0),
fPicture(picture),
- fRect(SkRect::MakeWH(picture ? SkIntToScalar(picture->width()) : 0,
- picture ? SkIntToScalar(picture->height()) : 0)) {
+ fCropRect(SkRect::MakeWH(picture ? SkIntToScalar(picture->width()) : 0,
+ picture ? SkIntToScalar(picture->height()) : 0)) {
SkSafeRef(fPicture);
}
-SkPictureImageFilter::SkPictureImageFilter(SkPicture* picture, const SkRect& rect)
+SkPictureImageFilter::SkPictureImageFilter(SkPicture* picture, const SkRect& cropRect)
: INHERITED(0, 0),
fPicture(picture),
- fRect(rect) {
+ fCropRect(cropRect) {
SkSafeRef(fPicture);
}
@@ -41,7 +41,7 @@ SkPictureImageFilter::SkPictureImageFilter(SkReadBuffer& buffer)
#else
buffer.readBool();
#endif
- buffer.readRect(&fRect);
+ buffer.readRect(&fCropRect);
}
void SkPictureImageFilter::flatten(SkWriteBuffer& buffer) const {
@@ -55,7 +55,7 @@ void SkPictureImageFilter::flatten(SkWriteBuffer& buffer) const {
#else
buffer.writeBool(false);
#endif
- buffer.writeRect(fRect);
+ buffer.writeRect(fCropRect);
}
bool SkPictureImageFilter::onFilterImage(Proxy* proxy, const SkBitmap&, const SkMatrix& matrix,
@@ -67,7 +67,7 @@ bool SkPictureImageFilter::onFilterImage(Proxy* proxy, const SkBitmap&, const Sk
SkRect floatBounds;
SkIRect bounds;
- matrix.mapRect(&floatBounds, fRect);
+ matrix.mapRect(&floatBounds, fCropRect);
floatBounds.roundOut(&bounds);
if (bounds.isEmpty()) {
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698