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 15 matching lines...) Expand all Loading... |
26 #include "platform/graphics/filters/SkiaImageFilterBuilder.h" | 26 #include "platform/graphics/filters/SkiaImageFilterBuilder.h" |
27 #include "platform/text/TextStream.h" | 27 #include "platform/text/TextStream.h" |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 FETile::FETile(Filter* filter) | 31 FETile::FETile(Filter* filter) |
32 : FilterEffect(filter) | 32 : FilterEffect(filter) |
33 { | 33 { |
34 } | 34 } |
35 | 35 |
36 RawPtr<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 ? maxEffectRect() : inputEffect(0)->maxEffectRect(); |
44 } | 44 } |
45 | 45 |
46 PassRefPtr<SkImageFilter> FETile::createImageFilter(SkiaImageFilterBuilder& buil
der) | 46 PassRefPtr<SkImageFilter> FETile::createImageFilter(SkiaImageFilterBuilder& buil
der) |
47 { | 47 { |
48 RefPtr<SkImageFilter> input(builder.build(inputEffect(0), operatingColorSpac
e())); | 48 RefPtr<SkImageFilter> input(builder.build(inputEffect(0), operatingColorSpac
e())); |
49 FloatRect srcRect = inputEffect(0)->filterPrimitiveSubregion(); | 49 FloatRect srcRect = inputEffect(0)->filterPrimitiveSubregion(); |
50 FloatRect dstRect = applyEffectBoundaries(getFilter()->filterRegion()); | 50 FloatRect dstRect = applyEffectBoundaries(getFilter()->filterRegion()); |
51 return adoptRef(SkTileImageFilter::Create(srcRect, dstRect, input.get())); | 51 return adoptRef(SkTileImageFilter::Create(srcRect, dstRect, input.get())); |
52 } | 52 } |
53 | 53 |
54 TextStream& FETile::externalRepresentation(TextStream& ts, int indent) const | 54 TextStream& FETile::externalRepresentation(TextStream& ts, int indent) const |
55 { | 55 { |
56 writeIndent(ts, indent); | 56 writeIndent(ts, indent); |
57 ts << "[feTile"; | 57 ts << "[feTile"; |
58 FilterEffect::externalRepresentation(ts); | 58 FilterEffect::externalRepresentation(ts); |
59 ts << "]\n"; | 59 ts << "]\n"; |
60 inputEffect(0)->externalRepresentation(ts, indent + 1); | 60 inputEffect(0)->externalRepresentation(ts, indent + 1); |
61 | 61 |
62 return ts; | 62 return ts; |
63 } | 63 } |
64 | 64 |
65 } // namespace blink | 65 } // namespace blink |
OLD | NEW |