| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 matrix.uncheckedAppend(clampTo<float>(0.534 - 0.534 * oneMinusAmount)); | 113 matrix.uncheckedAppend(clampTo<float>(0.534 - 0.534 * oneMinusAmount)); |
| 114 matrix.uncheckedAppend(clampTo<float>(0.131 + 0.869 * oneMinusAmount)); | 114 matrix.uncheckedAppend(clampTo<float>(0.131 + 0.869 * oneMinusAmount)); |
| 115 endMatrixRow(matrix); | 115 endMatrixRow(matrix); |
| 116 | 116 |
| 117 lastMatrixRow(matrix); | 117 lastMatrixRow(matrix); |
| 118 return matrix; | 118 return matrix; |
| 119 } | 119 } |
| 120 | 120 |
| 121 } // namespace | 121 } // namespace |
| 122 | 122 |
| 123 FilterEffectBuilder::FilterEffectBuilder(const FloatRect& zoomedReferenceBox, |
| 124 float zoom, |
| 125 const SkPaint* fillPaint, |
| 126 const SkPaint* strokePaint) { |
| 127 FilterEffectBuilder(nullptr, zoomedReferenceBox, zoom, fillPaint, |
| 128 strokePaint); |
| 129 } |
| 130 |
| 123 FilterEffectBuilder::FilterEffectBuilder(Node* target, | 131 FilterEffectBuilder::FilterEffectBuilder(Node* target, |
| 124 const FloatRect& zoomedReferenceBox, | 132 const FloatRect& zoomedReferenceBox, |
| 125 float zoom, | 133 float zoom, |
| 126 const SkPaint* fillPaint, | 134 const SkPaint* fillPaint, |
| 127 const SkPaint* strokePaint) | 135 const SkPaint* strokePaint) |
| 128 : m_targetContext(target), | 136 : m_targetContext(target), |
| 129 m_referenceBox(zoomedReferenceBox), | 137 m_referenceBox(zoomedReferenceBox), |
| 130 m_zoom(zoom), | 138 m_zoom(zoom), |
| 131 m_fillPaint(fillPaint), | 139 m_fillPaint(fillPaint), |
| 132 m_strokePaint(strokePaint) { | 140 m_strokePaint(strokePaint) { |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 Filter::create(m_referenceBox, filterRegion, m_zoom, unitScaling); | 438 Filter::create(m_referenceBox, filterRegion, m_zoom, unitScaling); |
| 431 if (!previousEffect) | 439 if (!previousEffect) |
| 432 previousEffect = result->getSourceGraphic(); | 440 previousEffect = result->getSourceGraphic(); |
| 433 SVGFilterBuilder builder(previousEffect, nodeMap, m_fillPaint, m_strokePaint); | 441 SVGFilterBuilder builder(previousEffect, nodeMap, m_fillPaint, m_strokePaint); |
| 434 builder.buildGraph(result, filterElement, m_referenceBox); | 442 builder.buildGraph(result, filterElement, m_referenceBox); |
| 435 result->setLastEffect(builder.lastEffect()); | 443 result->setLastEffect(builder.lastEffect()); |
| 436 return result; | 444 return result; |
| 437 } | 445 } |
| 438 | 446 |
| 439 } // namespace blink | 447 } // namespace blink |
| OLD | NEW |