| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 targetBoundingBox.y()); | 64 targetBoundingBox.y()); |
| 65 contentTransformation.scaleNonUniform(targetBoundingBox.width(), | 65 contentTransformation.scaleNonUniform(targetBoundingBox.width(), |
| 66 targetBoundingBox.height()); | 66 targetBoundingBox.height()); |
| 67 } | 67 } |
| 68 | 68 |
| 69 if (m_maskContentPicture) | 69 if (m_maskContentPicture) |
| 70 return m_maskContentPicture; | 70 return m_maskContentPicture; |
| 71 | 71 |
| 72 SubtreeContentTransformScope contentTransformScope(contentTransformation); | 72 SubtreeContentTransformScope contentTransformScope(contentTransformation); |
| 73 | 73 |
| 74 // Using strokeBoundingBox (instead of paintInvalidationRectInLocalCoordinates
) to avoid the intersection | 74 // Using strokeBoundingBox instead of paintInvalidationRectInLocalCoordinates |
| 75 // with local clips/mask, which may yield incorrect results when mixing object
BoundingBox and | 75 // to avoid the intersection with local clips/mask, which may yield incorrect |
| 76 // userSpaceOnUse units (http://crbug.com/294900). | 76 // results when mixing objectBoundingBox and userSpaceOnUse units. |
| 77 // http://crbug.com/294900 |
| 77 FloatRect bounds = strokeBoundingBox(); | 78 FloatRect bounds = strokeBoundingBox(); |
| 78 | 79 |
| 79 SkPictureBuilder pictureBuilder(bounds, nullptr, &context); | 80 SkPictureBuilder pictureBuilder(bounds, nullptr, &context); |
| 80 | 81 |
| 81 ColorFilter maskContentFilter = | 82 ColorFilter maskContentFilter = |
| 82 style()->svgStyle().colorInterpolation() == CI_LINEARRGB | 83 style()->svgStyle().colorInterpolation() == CI_LINEARRGB |
| 83 ? ColorFilterSRGBToLinearRGB | 84 ? ColorFilterSRGBToLinearRGB |
| 84 : ColorFilterNone; | 85 : ColorFilterNone; |
| 85 pictureBuilder.context().setColorFilter(maskContentFilter); | 86 pictureBuilder.context().setColorFilter(maskContentFilter); |
| 86 | 87 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 transform.scaleNonUniform(objectBoundingBox.width(), | 145 transform.scaleNonUniform(objectBoundingBox.width(), |
| 145 objectBoundingBox.height()); | 146 objectBoundingBox.height()); |
| 146 maskRect = transform.mapRect(maskRect); | 147 maskRect = transform.mapRect(maskRect); |
| 147 } | 148 } |
| 148 | 149 |
| 149 maskRect.intersect(maskBoundaries); | 150 maskRect.intersect(maskBoundaries); |
| 150 return maskRect; | 151 return maskRect; |
| 151 } | 152 } |
| 152 | 153 |
| 153 } // namespace blink | 154 } // namespace blink |
| OLD | NEW |