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

Side by Side Diff: Source/core/svg/SVGPathByteStreamBuilder.cpp

Issue 1016023002: Move 'closePath' handling to the consumers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: closePath() Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGPathByteStreamBuilder.h ('k') | Source/core/svg/SVGPathConsumer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 size_t m_currentOffset; 66 size_t m_currentOffset;
67 unsigned char m_bytes[sizeof(unsigned short) + sizeof(FloatPoint) * 3]; 67 unsigned char m_bytes[sizeof(unsigned short) + sizeof(FloatPoint) * 3];
68 SVGPathByteStream& m_byteStream; 68 SVGPathByteStream& m_byteStream;
69 }; 69 };
70 70
71 SVGPathByteStreamBuilder::SVGPathByteStreamBuilder(SVGPathByteStream& byteStream ) 71 SVGPathByteStreamBuilder::SVGPathByteStreamBuilder(SVGPathByteStream& byteStream )
72 : m_byteStream(byteStream) 72 : m_byteStream(byteStream)
73 { 73 {
74 } 74 }
75 75
76 void SVGPathByteStreamBuilder::moveTo(const FloatPoint& targetPoint, bool, PathC oordinateMode mode) 76 void SVGPathByteStreamBuilder::moveTo(const FloatPoint& targetPoint, PathCoordin ateMode mode)
77 { 77 {
78 CoalescingBuffer buffer(m_byteStream); 78 CoalescingBuffer buffer(m_byteStream);
79 buffer.writeSegmentType(mode == RelativeCoordinates ? PathSegMoveToRel : Pa thSegMoveToAbs); 79 buffer.writeSegmentType(mode == RelativeCoordinates ? PathSegMoveToRel : Pa thSegMoveToAbs);
80 buffer.writeFloatPoint(targetPoint); 80 buffer.writeFloatPoint(targetPoint);
81 } 81 }
82 82
83 void SVGPathByteStreamBuilder::lineTo(const FloatPoint& targetPoint, PathCoordin ateMode mode) 83 void SVGPathByteStreamBuilder::lineTo(const FloatPoint& targetPoint, PathCoordin ateMode mode)
84 { 84 {
85 CoalescingBuffer buffer(m_byteStream); 85 CoalescingBuffer buffer(m_byteStream);
86 buffer.writeSegmentType(mode == RelativeCoordinates ? PathSegLineToRel : Pat hSegLineToAbs); 86 buffer.writeSegmentType(mode == RelativeCoordinates ? PathSegLineToRel : Pat hSegLineToAbs);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 buffer.writeFloatPoint(targetPoint); 145 buffer.writeFloatPoint(targetPoint);
146 } 146 }
147 147
148 void SVGPathByteStreamBuilder::closePath() 148 void SVGPathByteStreamBuilder::closePath()
149 { 149 {
150 CoalescingBuffer buffer(m_byteStream); 150 CoalescingBuffer buffer(m_byteStream);
151 buffer.writeSegmentType(PathSegClosePath); 151 buffer.writeSegmentType(PathSegClosePath);
152 } 152 }
153 153
154 } // namespace blink 154 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPathByteStreamBuilder.h ('k') | Source/core/svg/SVGPathConsumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698