Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGPathBlender.cpp

Issue 1646543004: Refactor away SVGPathSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use namespace Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public License 14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to 15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA. 17 * Boston, MA 02110-1301, USA.
18 */ 18 */
19 19
20 #include "core/svg/SVGPathBlender.h" 20 #include "core/svg/SVGPathBlender.h"
21 21
22 #include "core/svg/SVGPathByteStreamSource.h"
22 #include "core/svg/SVGPathConsumer.h" 23 #include "core/svg/SVGPathConsumer.h"
23 #include "core/svg/SVGPathData.h" 24 #include "core/svg/SVGPathData.h"
24 #include "core/svg/SVGPathSource.h"
25 #include "platform/animation/AnimationUtilities.h" 25 #include "platform/animation/AnimationUtilities.h"
26 26
27 namespace blink { 27 namespace blink {
28 28
29 enum FloatBlendMode { 29 enum FloatBlendMode {
30 BlendHorizontal, 30 BlendHorizontal,
31 BlendVertical 31 BlendVertical
32 }; 32 };
33 33
34 class SVGPathBlender::BlendState { 34 class SVGPathBlender::BlendState {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 default: 248 default:
249 ASSERT_NOT_REACHED(); 249 ASSERT_NOT_REACHED();
250 } 250 }
251 251
252 updateCurrentPoint(m_fromSubPathPoint, m_fromCurrentPoint, fromSeg); 252 updateCurrentPoint(m_fromSubPathPoint, m_fromCurrentPoint, fromSeg);
253 updateCurrentPoint(m_toSubPathPoint, m_toCurrentPoint, toSeg); 253 updateCurrentPoint(m_toSubPathPoint, m_toCurrentPoint, toSeg);
254 254
255 return true; 255 return true;
256 } 256 }
257 257
258 SVGPathBlender::SVGPathBlender(SVGPathSource* fromSource, SVGPathSource* toSourc e, SVGPathConsumer* consumer) 258 SVGPathBlender::SVGPathBlender(SVGPathByteStreamSource* fromSource, SVGPathByteS treamSource* toSource, SVGPathConsumer* consumer)
259 : m_fromSource(fromSource) 259 : m_fromSource(fromSource)
260 , m_toSource(toSource) 260 , m_toSource(toSource)
261 , m_consumer(consumer) 261 , m_consumer(consumer)
262 { 262 {
263 ASSERT(m_fromSource); 263 ASSERT(m_fromSource);
264 ASSERT(m_toSource); 264 ASSERT(m_toSource);
265 ASSERT(m_consumer); 265 ASSERT(m_consumer);
266 } 266 }
267 267
268 bool SVGPathBlender::addAnimatedPath(unsigned repeatCount) 268 bool SVGPathBlender::addAnimatedPath(unsigned repeatCount)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 if (fromSourceIsEmpty) 303 if (fromSourceIsEmpty)
304 continue; 304 continue;
305 if (m_fromSource->hasMoreData() != m_toSource->hasMoreData()) 305 if (m_fromSource->hasMoreData() != m_toSource->hasMoreData())
306 return false; 306 return false;
307 } 307 }
308 return true; 308 return true;
309 } 309 }
310 310
311 } // namespace blink 311 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathBlender.h ('k') | third_party/WebKit/Source/core/svg/SVGPathBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698