Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.h

Issue 2081013002: Re-enable DrMemory test for ICOImageDecoderTests.parseAndDecodeByteByByte. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 IntPoint m_hotSpot; 77 IntPoint m_hotSpot;
78 uint32_t m_imageOffset; 78 uint32_t m_imageOffset;
79 uint32_t m_byteSize; 79 uint32_t m_byteSize;
80 }; 80 };
81 81
82 // Returns true if |a| is a preferable icon entry to |b|. 82 // Returns true if |a| is a preferable icon entry to |b|.
83 // Larger sizes, or greater bitdepths at the same size, are preferable. 83 // Larger sizes, or greater bitdepths at the same size, are preferable.
84 static bool compareEntries(const IconDirectoryEntry& a, const IconDirectoryE ntry& b); 84 static bool compareEntries(const IconDirectoryEntry& a, const IconDirectoryE ntry& b);
85 85
86 // ImageDecoder: 86 // ImageDecoder:
87 virtual void decodeSize() { decode(0, true); } 87 void decodeSize() override { decode(0, true); }
88 size_t decodeFrameCount() override; 88 size_t decodeFrameCount() override;
89 void decode(size_t index) override { decode(index, false); } 89 void decode(size_t index) override { decode(index, false); }
90 90
91 // TODO (scroggo): These functions are identical to functions in BMPImageRea der. Share code? 91 // TODO (scroggo): These functions are identical to functions in BMPImageRea der. Share code?
92 inline uint8_t readUint8(size_t offset) const 92 inline uint8_t readUint8(size_t offset) const
93 { 93 {
94 return m_fastReader.getOneByte(m_decodedOffset + offset); 94 return m_fastReader.getOneByte(m_decodedOffset + offset);
95 } 95 }
96 96
97 inline uint16_t readUint16(int offset) const 97 inline uint16_t readUint16(int offset) const
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 PNGDecoders m_pngDecoders; 166 PNGDecoders m_pngDecoders;
167 167
168 // Valid only while a BMPImageReader is decoding, this holds the size 168 // Valid only while a BMPImageReader is decoding, this holds the size
169 // for the particular entry being decoded. 169 // for the particular entry being decoded.
170 IntSize m_frameSize; 170 IntSize m_frameSize;
171 }; 171 };
172 172
173 } // namespace blink 173 } // namespace blink
174 174
175 #endif 175 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698