| 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 20 matching lines...) Expand all Loading... |
| 31 union ByteType { | 31 union ByteType { |
| 32 DataType value; | 32 DataType value; |
| 33 unsigned char bytes[sizeof(DataType)]; | 33 unsigned char bytes[sizeof(DataType)]; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 class SVGPathByteStream { | 36 class SVGPathByteStream { |
| 37 USING_FAST_MALLOC(SVGPathByteStream); | 37 USING_FAST_MALLOC(SVGPathByteStream); |
| 38 | 38 |
| 39 public: | 39 public: |
| 40 static std::unique_ptr<SVGPathByteStream> create() { | 40 static std::unique_ptr<SVGPathByteStream> create() { |
| 41 return wrapUnique(new SVGPathByteStream); | 41 return WTF::wrapUnique(new SVGPathByteStream); |
| 42 } | 42 } |
| 43 | 43 |
| 44 std::unique_ptr<SVGPathByteStream> clone() const { | 44 std::unique_ptr<SVGPathByteStream> clone() const { |
| 45 return wrapUnique(new SVGPathByteStream(m_data)); | 45 return WTF::wrapUnique(new SVGPathByteStream(m_data)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 typedef Vector<unsigned char> Data; | 48 typedef Vector<unsigned char> Data; |
| 49 typedef Data::const_iterator DataIterator; | 49 typedef Data::const_iterator DataIterator; |
| 50 | 50 |
| 51 DataIterator begin() const { return m_data.begin(); } | 51 DataIterator begin() const { return m_data.begin(); } |
| 52 DataIterator end() const { return m_data.end(); } | 52 DataIterator end() const { return m_data.end(); } |
| 53 void append(const unsigned char* data, size_t dataSize) { | 53 void append(const unsigned char* data, size_t dataSize) { |
| 54 m_data.append(data, dataSize); | 54 m_data.append(data, dataSize); |
| 55 } | 55 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 68 private: | 68 private: |
| 69 SVGPathByteStream() {} | 69 SVGPathByteStream() {} |
| 70 SVGPathByteStream(const Data& data) : m_data(data) {} | 70 SVGPathByteStream(const Data& data) : m_data(data) {} |
| 71 | 71 |
| 72 Data m_data; | 72 Data m_data; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace blink | 75 } // namespace blink |
| 76 | 76 |
| 77 #endif // SVGPathByteStream_h | 77 #endif // SVGPathByteStream_h |
| OLD | NEW |