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

Unified Diff: Source/platform/graphics/filters/FilterEffect.cpp

Issue 212803005: Fix for partial filter subregion specification with deferred filters. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/filters/FilterEffect.cpp
diff --git a/Source/platform/graphics/filters/FilterEffect.cpp b/Source/platform/graphics/filters/FilterEffect.cpp
index b44d198708f8870a4e67c7afe71a53d2da1b5a62..ad5daa38320c8d65c232c5a27c9c4c8327eed5de 100644
--- a/Source/platform/graphics/filters/FilterEffect.cpp
+++ b/Source/platform/graphics/filters/FilterEffect.cpp
@@ -544,24 +544,26 @@ PassRefPtr<SkImageFilter> FilterEffect::createImageFilter(SkiaImageFilterBuilder
SkImageFilter::CropRect FilterEffect::getCropRect(const FloatSize& cropOffset) const
{
- SkRect rect = filter()->filterRegion();
+ FloatRect rect = filter()->filterRegion();
uint32_t flags = 0;
FloatRect boundaries = effectBoundaries();
boundaries.move(cropOffset);
if (hasX()) {
- rect.fLeft = boundaries.x();
+ rect.setX(boundaries.x());
flags |= SkImageFilter::CropRect::kHasLeft_CropEdge;
+ flags |= SkImageFilter::CropRect::kHasRight_CropEdge;
}
if (hasY()) {
- rect.fTop = boundaries.y();
+ rect.setY(boundaries.y());
flags |= SkImageFilter::CropRect::kHasTop_CropEdge;
+ flags |= SkImageFilter::CropRect::kHasBottom_CropEdge;
}
if (hasWidth()) {
- rect.fRight = rect.fLeft + boundaries.width();
+ rect.setWidth(boundaries.width());
flags |= SkImageFilter::CropRect::kHasRight_CropEdge;
}
if (hasHeight()) {
- rect.fBottom = rect.fTop + boundaries.height();
+ rect.setHeight(boundaries.height());
flags |= SkImageFilter::CropRect::kHasBottom_CropEdge;
}
rect = filter()->mapLocalRectToAbsoluteRect(rect);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698