OLD | NEW |
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 17 matching lines...) Expand all Loading... |
28 | 28 |
29 class SVGPathByteStreamSource final : public SVGPathSource { | 29 class SVGPathByteStreamSource final : public SVGPathSource { |
30 public: | 30 public: |
31 explicit SVGPathByteStreamSource(const SVGPathByteStream& stream) | 31 explicit SVGPathByteStreamSource(const SVGPathByteStream& stream) |
32 : m_streamCurrent(stream.begin()) | 32 : m_streamCurrent(stream.begin()) |
33 , m_streamEnd(stream.end()) | 33 , m_streamEnd(stream.end()) |
34 { | 34 { |
35 } | 35 } |
36 | 36 |
37 private: | 37 private: |
38 virtual bool hasMoreData() const override; | 38 bool hasMoreData() const override; |
39 virtual SVGPathSegType peekSegmentType() override; | 39 SVGPathSegType peekSegmentType() override; |
40 virtual PathSegmentData parseSegment() override; | 40 PathSegmentData parseSegment() override; |
41 | 41 |
42 #if COMPILER(MSVC) | 42 #if COMPILER(MSVC) |
43 #pragma warning(disable: 4701) | 43 #pragma warning(disable: 4701) |
44 #endif | 44 #endif |
45 template<typename DataType> | 45 template<typename DataType> |
46 DataType readType() | 46 DataType readType() |
47 { | 47 { |
48 ByteType<DataType> data; | 48 ByteType<DataType> data; |
49 size_t typeSize = sizeof(ByteType<DataType>); | 49 size_t typeSize = sizeof(ByteType<DataType>); |
50 ASSERT(m_streamCurrent + typeSize <= m_streamEnd); | 50 ASSERT(m_streamCurrent + typeSize <= m_streamEnd); |
(...skipping 12 matching lines...) Expand all Loading... |
63 return FloatPoint(x, y); | 63 return FloatPoint(x, y); |
64 } | 64 } |
65 | 65 |
66 SVGPathByteStream::DataIterator m_streamCurrent; | 66 SVGPathByteStream::DataIterator m_streamCurrent; |
67 SVGPathByteStream::DataIterator m_streamEnd; | 67 SVGPathByteStream::DataIterator m_streamEnd; |
68 }; | 68 }; |
69 | 69 |
70 } // namespace blink | 70 } // namespace blink |
71 | 71 |
72 #endif // SVGPathByteStreamSource_h | 72 #endif // SVGPathByteStreamSource_h |
OLD | NEW |