| 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) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 { | 33 { |
| 34 } | 34 } |
| 35 | 35 |
| 36 FETile* FETile::create(Filter* filter) | 36 FETile* FETile::create(Filter* filter) |
| 37 { | 37 { |
| 38 return new FETile(filter); | 38 return new FETile(filter); |
| 39 } | 39 } |
| 40 | 40 |
| 41 FloatRect FETile::mapPaintRect(const FloatRect& rect, bool forward) const | 41 FloatRect FETile::mapPaintRect(const FloatRect& rect, bool forward) const |
| 42 { | 42 { |
| 43 return forward ? maxEffectRect() : inputEffect(0)->maxEffectRect(); | 43 return forward ? absoluteBounds() : inputEffect(0)->absoluteBounds(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 sk_sp<SkImageFilter> FETile::createImageFilter() | 46 sk_sp<SkImageFilter> FETile::createImageFilter() |
| 47 { | 47 { |
| 48 sk_sp<SkImageFilter> input(SkiaImageFilterBuilder::build(inputEffect(0), ope
ratingColorSpace())); | 48 sk_sp<SkImageFilter> input(SkiaImageFilterBuilder::build(inputEffect(0), ope
ratingColorSpace())); |
| 49 FloatRect srcRect; | 49 FloatRect srcRect; |
| 50 if (inputEffect(0)->getFilterEffectType() == FilterEffectTypeSourceInput) | 50 if (inputEffect(0)->getFilterEffectType() == FilterEffectTypeSourceInput) |
| 51 srcRect = getFilter()->filterRegion(); | 51 srcRect = getFilter()->filterRegion(); |
| 52 else | 52 else |
| 53 srcRect = inputEffect(0)->filterPrimitiveSubregion(); | 53 srcRect = inputEffect(0)->filterPrimitiveSubregion(); |
| 54 FloatRect dstRect = filterPrimitiveSubregion(); | 54 FloatRect dstRect = filterPrimitiveSubregion(); |
| 55 return SkTileImageFilter::Make(srcRect, dstRect, std::move(input)); | 55 return SkTileImageFilter::Make(srcRect, dstRect, std::move(input)); |
| 56 } | 56 } |
| 57 | 57 |
| 58 TextStream& FETile::externalRepresentation(TextStream& ts, int indent) const | 58 TextStream& FETile::externalRepresentation(TextStream& ts, int indent) const |
| 59 { | 59 { |
| 60 writeIndent(ts, indent); | 60 writeIndent(ts, indent); |
| 61 ts << "[feTile"; | 61 ts << "[feTile"; |
| 62 FilterEffect::externalRepresentation(ts); | 62 FilterEffect::externalRepresentation(ts); |
| 63 ts << "]\n"; | 63 ts << "]\n"; |
| 64 inputEffect(0)->externalRepresentation(ts, indent + 1); | 64 inputEffect(0)->externalRepresentation(ts, indent + 1); |
| 65 | 65 |
| 66 return ts; | 66 return ts; |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace blink | 69 } // namespace blink |
| OLD | NEW |