| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010, 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010, 2011. 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 case PathSegLineToHorizontalAbs: | 198 case PathSegLineToHorizontalAbs: |
| 199 currentPoint.setX(segment.targetPoint.x()); | 199 currentPoint.setX(segment.targetPoint.x()); |
| 200 break; | 200 break; |
| 201 case PathSegLineToVerticalAbs: | 201 case PathSegLineToVerticalAbs: |
| 202 currentPoint.setY(segment.targetPoint.y()); | 202 currentPoint.setY(segment.targetPoint.y()); |
| 203 break; | 203 break; |
| 204 case PathSegClosePath: | 204 case PathSegClosePath: |
| 205 currentPoint = subPathPoint; | 205 currentPoint = subPathPoint; |
| 206 break; | 206 break; |
| 207 default: | 207 default: |
| 208 ASSERT_NOT_REACHED(); | 208 NOTREACHED(); |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 | 211 |
| 212 bool SVGPathBlender::BlendState::blendSegments( | 212 bool SVGPathBlender::BlendState::blendSegments( |
| 213 const PathSegmentData& fromSeg, | 213 const PathSegmentData& fromSeg, |
| 214 const PathSegmentData& toSeg, | 214 const PathSegmentData& toSeg, |
| 215 PathSegmentData& blendedSegment) { | 215 PathSegmentData& blendedSegment) { |
| 216 if (!canBlend(fromSeg, toSeg)) | 216 if (!canBlend(fromSeg, toSeg)) |
| 217 return false; | 217 return false; |
| 218 | 218 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 blendedSegment.arcLarge = fromSeg.arcLarge || toSeg.arcLarge; | 270 blendedSegment.arcLarge = fromSeg.arcLarge || toSeg.arcLarge; |
| 271 blendedSegment.arcSweep = fromSeg.arcSweep || toSeg.arcSweep; | 271 blendedSegment.arcSweep = fromSeg.arcSweep || toSeg.arcSweep; |
| 272 } else { | 272 } else { |
| 273 blendedSegment.arcLarge = | 273 blendedSegment.arcLarge = |
| 274 m_isInFirstHalfOfAnimation ? fromSeg.arcLarge : toSeg.arcLarge; | 274 m_isInFirstHalfOfAnimation ? fromSeg.arcLarge : toSeg.arcLarge; |
| 275 blendedSegment.arcSweep = | 275 blendedSegment.arcSweep = |
| 276 m_isInFirstHalfOfAnimation ? fromSeg.arcSweep : toSeg.arcSweep; | 276 m_isInFirstHalfOfAnimation ? fromSeg.arcSweep : toSeg.arcSweep; |
| 277 } | 277 } |
| 278 break; | 278 break; |
| 279 default: | 279 default: |
| 280 ASSERT_NOT_REACHED(); | 280 NOTREACHED(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 updateCurrentPoint(m_fromSubPathPoint, m_fromCurrentPoint, fromSeg); | 283 updateCurrentPoint(m_fromSubPathPoint, m_fromCurrentPoint, fromSeg); |
| 284 updateCurrentPoint(m_toSubPathPoint, m_toCurrentPoint, toSeg); | 284 updateCurrentPoint(m_toSubPathPoint, m_toCurrentPoint, toSeg); |
| 285 | 285 |
| 286 return true; | 286 return true; |
| 287 } | 287 } |
| 288 | 288 |
| 289 SVGPathBlender::SVGPathBlender(SVGPathByteStreamSource* fromSource, | 289 SVGPathBlender::SVGPathBlender(SVGPathByteStreamSource* fromSource, |
| 290 SVGPathByteStreamSource* toSource, | 290 SVGPathByteStreamSource* toSource, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 329 |
| 330 if (fromSourceIsEmpty) | 330 if (fromSourceIsEmpty) |
| 331 continue; | 331 continue; |
| 332 if (m_fromSource->hasMoreData() != m_toSource->hasMoreData()) | 332 if (m_fromSource->hasMoreData() != m_toSource->hasMoreData()) |
| 333 return false; | 333 return false; |
| 334 } | 334 } |
| 335 return true; | 335 return true; |
| 336 } | 336 } |
| 337 | 337 |
| 338 } // namespace blink | 338 } // namespace blink |
| OLD | NEW |