| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> | 2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> |
| 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 5 * Copyright (C) 2012 University of Szeged | 5 * Copyright (C) 2012 University of Szeged |
| 6 * Copyright (C) 2013 Google Inc. All rights reserved. | 6 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 if (flags & ClipToFilterRegion) { | 545 if (flags & ClipToFilterRegion) { |
| 546 absoluteSubregion.intersect(filter->absoluteFilterRegion()); | 546 absoluteSubregion.intersect(filter->absoluteFilterRegion()); |
| 547 } | 547 } |
| 548 | 548 |
| 549 setMaxEffectRect(absoluteSubregion); | 549 setMaxEffectRect(absoluteSubregion); |
| 550 return subregion; | 550 return subregion; |
| 551 } | 551 } |
| 552 | 552 |
| 553 PassRefPtr<SkImageFilter> FilterEffect::createImageFilter(SkiaImageFilterBuilder
* builder) | 553 PassRefPtr<SkImageFilter> FilterEffect::createImageFilter(SkiaImageFilterBuilder
* builder) |
| 554 { | 554 { |
| 555 return 0; | 555 return nullptr; |
| 556 } | 556 } |
| 557 | 557 |
| 558 SkImageFilter::CropRect FilterEffect::getCropRect(const FloatSize& cropOffset) c
onst | 558 SkImageFilter::CropRect FilterEffect::getCropRect(const FloatSize& cropOffset) c
onst |
| 559 { | 559 { |
| 560 SkRect rect = filter()->filterRegion(); | 560 SkRect rect = filter()->filterRegion(); |
| 561 uint32_t flags = 0; | 561 uint32_t flags = 0; |
| 562 FloatRect boundaries = effectBoundaries(); | 562 FloatRect boundaries = effectBoundaries(); |
| 563 boundaries.move(cropOffset); | 563 boundaries.move(cropOffset); |
| 564 if (hasX()) { | 564 if (hasX()) { |
| 565 rect.fLeft = boundaries.x(); | 565 rect.fLeft = boundaries.x(); |
| 566 flags |= SkImageFilter::CropRect::kHasLeft_CropEdge; | 566 flags |= SkImageFilter::CropRect::kHasLeft_CropEdge; |
| 567 } | 567 } |
| 568 if (hasY()) { | 568 if (hasY()) { |
| 569 rect.fTop = boundaries.y(); | 569 rect.fTop = boundaries.y(); |
| 570 flags |= SkImageFilter::CropRect::kHasTop_CropEdge; | 570 flags |= SkImageFilter::CropRect::kHasTop_CropEdge; |
| 571 } | 571 } |
| 572 if (hasWidth()) { | 572 if (hasWidth()) { |
| 573 rect.fRight = rect.fLeft + boundaries.width(); | 573 rect.fRight = rect.fLeft + boundaries.width(); |
| 574 flags |= SkImageFilter::CropRect::kHasRight_CropEdge; | 574 flags |= SkImageFilter::CropRect::kHasRight_CropEdge; |
| 575 } | 575 } |
| 576 if (hasHeight()) { | 576 if (hasHeight()) { |
| 577 rect.fBottom = rect.fTop + boundaries.height(); | 577 rect.fBottom = rect.fTop + boundaries.height(); |
| 578 flags |= SkImageFilter::CropRect::kHasBottom_CropEdge; | 578 flags |= SkImageFilter::CropRect::kHasBottom_CropEdge; |
| 579 } | 579 } |
| 580 rect = filter()->mapLocalRectToAbsoluteRect(rect); | 580 rect = filter()->mapLocalRectToAbsoluteRect(rect); |
| 581 return SkImageFilter::CropRect(rect, flags); | 581 return SkImageFilter::CropRect(rect, flags); |
| 582 } | 582 } |
| 583 | 583 |
| 584 } // namespace WebCore | 584 } // namespace WebCore |
| OLD | NEW |