OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 { | 46 { |
47 setOperatingColorSpace(sourceEffect->operatingColorSpace()); | 47 setOperatingColorSpace(sourceEffect->operatingColorSpace()); |
48 inputEffects().append(sourceEffect); | 48 inputEffects().append(sourceEffect); |
49 } | 49 } |
50 | 50 |
51 FloatRect SourceAlpha::determineAbsolutePaintRect(const FloatRect& requestedRect
) | 51 FloatRect SourceAlpha::determineAbsolutePaintRect(const FloatRect& requestedRect
) |
52 { | 52 { |
53 return inputEffect(0)->determineAbsolutePaintRect(requestedRect); | 53 return inputEffect(0)->determineAbsolutePaintRect(requestedRect); |
54 } | 54 } |
55 | 55 |
56 PassRefPtr<SkImageFilter> SourceAlpha::createImageFilter(SkiaImageFilterBuilder*
builder) | 56 PassRefPtr<SkImageFilter> SourceAlpha::createImageFilter(SkiaImageFilterBuilder&
builder) |
57 { | 57 { |
58 RefPtr<SkImageFilter> sourceGraphic(builder->build(inputEffect(0), operating
ColorSpace())); | 58 RefPtr<SkImageFilter> sourceGraphic(builder.build(inputEffect(0), operatingC
olorSpace())); |
59 SkScalar matrix[20] = { | 59 SkScalar matrix[20] = { |
60 0, 0, 0, 0, 0, | 60 0, 0, 0, 0, 0, |
61 0, 0, 0, 0, 0, | 61 0, 0, 0, 0, 0, |
62 0, 0, 0, 0, 0, | 62 0, 0, 0, 0, 0, |
63 0, 0, 0, SK_Scalar1, 0 | 63 0, 0, 0, SK_Scalar1, 0 |
64 }; | 64 }; |
65 RefPtr<SkColorFilter> colorFilter(adoptRef(SkColorMatrixFilter::Create(matri
x))); | 65 RefPtr<SkColorFilter> colorFilter(adoptRef(SkColorMatrixFilter::Create(matri
x))); |
66 return adoptRef(SkColorFilterImageFilter::Create(colorFilter.get(), sourceGr
aphic.get())); | 66 return adoptRef(SkColorFilterImageFilter::Create(colorFilter.get(), sourceGr
aphic.get())); |
67 } | 67 } |
68 | 68 |
69 TextStream& SourceAlpha::externalRepresentation(TextStream& ts, int indent) cons
t | 69 TextStream& SourceAlpha::externalRepresentation(TextStream& ts, int indent) cons
t |
70 { | 70 { |
71 writeIndent(ts, indent); | 71 writeIndent(ts, indent); |
72 ts << "[SourceAlpha]\n"; | 72 ts << "[SourceAlpha]\n"; |
73 return ts; | 73 return ts; |
74 } | 74 } |
75 | 75 |
76 } // namespace blink | 76 } // namespace blink |
OLD | NEW |