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

Unified Diff: src/effects/SkLightingImageFilter.cpp

Issue 1971343002: Convert GrClip to an abstract base class (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_clipout
Patch Set: remove iswideopen Created 4 years, 7 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
Index: src/effects/SkLightingImageFilter.cpp
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index d9b29363ed5a692dd2494b6e8a1902b5fe0551c3..d920c0eb798690df34c5d79adb49a135e7f6df44 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -415,18 +415,17 @@ sk_sp<SkSpecialImage> SkLightingImageFilterInternal::filterImageGPU(SkSpecialIma
return nullptr;
}
- SkRect dstRect = SkRect::MakeWH(SkIntToScalar(offsetBounds.width()),
- SkIntToScalar(offsetBounds.height()));
+ const SkIRect& dstRect = SkIRect::MakeWH(offsetBounds.width(), offsetBounds.height());
// setup new clip
- GrClip clip(dstRect);
+ GrFixedClip clip(dstRect);
const SkIRect inputBounds = SkIRect::MakeWH(input->width(), input->height());
SkRect topLeft = SkRect::MakeXYWH(0, 0, 1, 1);
SkRect top = SkRect::MakeXYWH(1, 0, dstRect.width() - 2, 1);
SkRect topRight = SkRect::MakeXYWH(dstRect.width() - 1, 0, 1, 1);
SkRect left = SkRect::MakeXYWH(0, 1, 1, dstRect.height() - 2);
- SkRect interior = dstRect.makeInset(1, 1);
+ SkRect interior = SkRect::Make(dstRect.makeInset(1, 1));
SkRect right = SkRect::MakeXYWH(dstRect.width() - 1, 1, 1, dstRect.height() - 2);
SkRect bottomLeft = SkRect::MakeXYWH(0, dstRect.height() - 1, 1, 1);
SkRect bottom = SkRect::MakeXYWH(1, dstRect.height() - 1, dstRect.width() - 2, 1);

Powered by Google App Engine
This is Rietveld 408576698