OLD | NEW |
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* ***** BEGIN LICENSE BLOCK ***** | 2 /* ***** BEGIN LICENSE BLOCK ***** |
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
4 * | 4 * |
5 * The contents of this file are subject to the Mozilla Public License Version | 5 * The contents of this file are subject to the Mozilla Public License Version |
6 * 1.1 (the "License"); you may not use this file except in compliance with | 6 * 1.1 (the "License"); you may not use this file except in compliance with |
7 * the License. You may obtain a copy of the License at | 7 * the License. You may obtain a copy of the License at |
8 * http://www.mozilla.org/MPL/ | 8 * http://www.mozilla.org/MPL/ |
9 * | 9 * |
10 * Software distributed under the License is distributed on an "AS IS" basis, | 10 * Software distributed under the License is distributed on an "AS IS" basis, |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 reinterpret_cast<const unsigned char*>(m_streamBuffer.get()); | 655 reinterpret_cast<const unsigned char*>(m_streamBuffer.get()); |
656 | 656 |
657 int netscapeExtension = currentComponent[0] & 7; | 657 int netscapeExtension = currentComponent[0] & 7; |
658 | 658 |
659 // Loop entire animation specified # of times. Only read the loop co
unt during the first iteration. | 659 // Loop entire animation specified # of times. Only read the loop co
unt during the first iteration. |
660 if (netscapeExtension == 1) { | 660 if (netscapeExtension == 1) { |
661 m_loopCount = GETINT16(currentComponent + 1); | 661 m_loopCount = GETINT16(currentComponent + 1); |
662 | 662 |
663 // Zero loop count is infinite animation loop request. | 663 // Zero loop count is infinite animation loop request. |
664 if (!m_loopCount) | 664 if (!m_loopCount) |
665 m_loopCount = SkCodecAnimation::kAnimationLoopInfinite; | 665 m_loopCount = SkCodec::kRepetitionCountInfinite; |
666 | 666 |
667 GETN(1, SkGIFNetscapeExtensionBlock); | 667 GETN(1, SkGIFNetscapeExtensionBlock); |
668 } else if (netscapeExtension == 2) { | 668 } else if (netscapeExtension == 2) { |
669 // Wait for specified # of bytes to enter buffer. | 669 // Wait for specified # of bytes to enter buffer. |
670 | 670 |
671 // Don't do this, this extension doesn't exist (isn't used at al
l) | 671 // Don't do this, this extension doesn't exist (isn't used at al
l) |
672 // and doesn't do anything, as our streaming/buffering takes car
e of it all... | 672 // and doesn't do anything, as our streaming/buffering takes car
e of it all... |
673 // See: http://semmix.pl/color/exgraf/eeg24.htm | 673 // See: http://semmix.pl/color/exgraf/eeg24.htm |
674 GETN(1, SkGIFNetscapeExtensionBlock); | 674 GETN(1, SkGIFNetscapeExtensionBlock); |
675 } else { | 675 } else { |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 rowsRemaining = m_frameContext->height(); | 932 rowsRemaining = m_frameContext->height(); |
933 | 933 |
934 // Clearing the whole suffix table lets us be more tolerant of bad data. | 934 // Clearing the whole suffix table lets us be more tolerant of bad data. |
935 for (int i = 0; i < clearCode; ++i) { | 935 for (int i = 0; i < clearCode; ++i) { |
936 suffix[i] = i; | 936 suffix[i] = i; |
937 suffixLength[i] = 1; | 937 suffixLength[i] = 1; |
938 } | 938 } |
939 return true; | 939 return true; |
940 } | 940 } |
941 | 941 |
OLD | NEW |