| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 enum FileType { | 68 enum FileType { |
| 69 ICON = 1, | 69 ICON = 1, |
| 70 CURSOR = 2, | 70 CURSOR = 2, |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 struct IconDirectoryEntry { | 73 struct IconDirectoryEntry { |
| 74 IntSize m_size; | 74 IntSize m_size; |
| 75 uint16_t m_bitCount; | 75 uint16_t m_bitCount; |
| 76 IntPoint m_hotSpot; | 76 IntPoint m_hotSpot; |
| 77 uint32_t m_imageSize; |
| 77 uint32_t m_imageOffset; | 78 uint32_t m_imageOffset; |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 // Returns true if |a| is a preferable icon entry to |b|. | 81 // Returns true if |a| is a preferable icon entry to |b|. |
| 81 // Larger sizes, or greater bitdepths at the same size, are preferable. | 82 // Larger sizes, or greater bitdepths at the same size, are preferable. |
| 82 static bool compareEntries(const IconDirectoryEntry& a, const IconDirectoryE
ntry& b); | 83 static bool compareEntries(const IconDirectoryEntry& a, const IconDirectoryE
ntry& b); |
| 83 | 84 |
| 84 inline uint16_t readUint16(int offset) const | 85 inline uint16_t readUint16(int offset) const |
| 85 { | 86 { |
| 86 return BMPImageReader::readUint16(m_data.get(), m_decodedOffset + offset
); | 87 return BMPImageReader::readUint16(m_data.get(), m_decodedOffset + offset
); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 PNGDecoders m_pngDecoders; | 148 PNGDecoders m_pngDecoders; |
| 148 | 149 |
| 149 // Valid only while a BMPImageReader is decoding, this holds the size | 150 // Valid only while a BMPImageReader is decoding, this holds the size |
| 150 // for the particular entry being decoded. | 151 // for the particular entry being decoded. |
| 151 IntSize m_frameSize; | 152 IntSize m_frameSize; |
| 152 }; | 153 }; |
| 153 | 154 |
| 154 } // namespace blink | 155 } // namespace blink |
| 155 | 156 |
| 156 #endif | 157 #endif |
| OLD | NEW |