| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2015 Google Inc. All rights reserved. | 2 * Copyright (C) 2015 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef FastSharedBufferReader_h | 31 #ifndef FastSharedBufferReader_h |
| 32 #define FastSharedBufferReader_h | 32 #define FastSharedBufferReader_h |
| 33 | 33 |
| 34 #include "platform/PlatformExport.h" | 34 #include "platform/PlatformExport.h" |
| 35 #include "platform/image-decoders/SegmentReader.h" | 35 #include "platform/image-decoders/SegmentReader.h" |
| 36 #include "wtf/Allocator.h" | 36 #include "platform/wtf/Allocator.h" |
| 37 #include "wtf/Noncopyable.h" | 37 #include "platform/wtf/Noncopyable.h" |
| 38 #include "wtf/PassRefPtr.h" | 38 #include "platform/wtf/PassRefPtr.h" |
| 39 #include "wtf/RefPtr.h" | 39 #include "platform/wtf/RefPtr.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 // This class is used by image decoders to avoid memory consolidation and | 43 // This class is used by image decoders to avoid memory consolidation and |
| 44 // therefore minimizes the cost of memory copying when the decoders | 44 // therefore minimizes the cost of memory copying when the decoders |
| 45 // repeatedly read from a buffer that is continually growing due to network | 45 // repeatedly read from a buffer that is continually growing due to network |
| 46 // traffic. | 46 // traffic. |
| 47 class PLATFORM_EXPORT FastSharedBufferReader final { | 47 class PLATFORM_EXPORT FastSharedBufferReader final { |
| 48 DISALLOW_NEW(); | 48 DISALLOW_NEW(); |
| 49 WTF_MAKE_NONCOPYABLE(FastSharedBufferReader); | 49 WTF_MAKE_NONCOPYABLE(FastSharedBufferReader); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 mutable const char* m_segment; | 89 mutable const char* m_segment; |
| 90 mutable size_t m_segmentLength; | 90 mutable size_t m_segmentLength; |
| 91 | 91 |
| 92 // Data position in |m_data| pointed to by |m_segment|. | 92 // Data position in |m_data| pointed to by |m_segment|. |
| 93 mutable size_t m_dataPosition; | 93 mutable size_t m_dataPosition; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace blink | 96 } // namespace blink |
| 97 | 97 |
| 98 #endif | 98 #endif |
| OLD | NEW |