Index: src/core/SkImageFilter.cpp |
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
index 899083dbb468260a3b63d04b6e5354971f84f34c..761c57bb173628f43531f35cb561a4fb5950e25a 100644 |
--- a/src/core/SkImageFilter.cpp |
+++ b/src/core/SkImageFilter.cpp |
@@ -287,13 +287,13 @@ sk_sp<SkSpecialImage> SkImageFilter::DrawWithFP(GrContext* context, |
return nullptr; |
} |
- SkRect srcRect = SkRect::Make(bounds); |
- SkRect dstRect = SkRect::MakeWH(srcRect.width(), srcRect.height()); |
- GrClip clip(dstRect); |
+ const SkIRect& dstIRect = SkIRect::MakeWH(bounds.width(), bounds.height()); |
bsalomon
2016/05/13 02:34:12
Does the change to references here add any value?
Chris Dalton
2016/05/13 03:53:46
Semantically it avoids a copy constructor. But sin
bsalomon
2016/05/13 13:44:56
Ok, given that the Make functions are short NVRO-c
|
+ const SkRect& srcRect = SkRect::Make(bounds); |
+ const SkRect& dstRect = SkRect::MakeWH(srcRect.width(), srcRect.height()); |
+ GrFixedClip clip(dstIRect); |
drawContext->fillRectToRect(clip, paint, SkMatrix::I(), dstRect, srcRect); |
- return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(bounds.width(), bounds.height()), |
- kNeedNewImageUniqueID_SpecialImage, |
+ return SkSpecialImage::MakeFromGpu(dstIRect, kNeedNewImageUniqueID_SpecialImage, |
drawContext->asTexture()); |
} |
#endif |