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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h

Issue 1647703006: Track positions of dimensions in image files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated GIF dimensions UMA logic Created 4 years, 10 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) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void setImagePlanes(PassOwnPtr<ImagePlanes>) override; 50 void setImagePlanes(PassOwnPtr<ImagePlanes>) override;
51 bool hasImagePlanes() const { return m_imagePlanes; } 51 bool hasImagePlanes() const { return m_imagePlanes; }
52 52
53 bool outputScanlines(); 53 bool outputScanlines();
54 unsigned desiredScaleNumerator() const; 54 unsigned desiredScaleNumerator() const;
55 void complete(); 55 void complete();
56 56
57 void setOrientation(ImageOrientation orientation) { m_orientation = orientat ion; } 57 void setOrientation(ImageOrientation orientation) { m_orientation = orientat ion; }
58 void setHasColorProfile(bool hasColorProfile) { m_hasColorProfile = hasColor Profile; } 58 void setHasColorProfile(bool hasColorProfile) { m_hasColorProfile = hasColor Profile; }
59 void setDecodedSize(unsigned width, unsigned height); 59 void setDecodedSize(unsigned width, unsigned height);
60 void setSizeOffset(size_t sizeOffset) { m_sizeOffset = sizeOffset; }
61 void setSizeOffsetOptimized(size_t sizeOffsetOptimized) { m_sizeOffsetOptimi zed = sizeOffsetOptimized; }
60 62
61 private: 63 private:
62 // ImageDecoder: 64 // ImageDecoder:
63 void decodeSize() override { decode(true); } 65 void decodeSize() override { decode(true); }
64 void decode(size_t) override { decode(false); } 66 void decode(size_t) override { decode(false); }
65 67
66 // Decodes the image. If |onlySize| is true, stops decoding after 68 // Decodes the image. If |onlySize| is true, stops decoding after
67 // calculating the image size. If decoding fails but there is no more 69 // calculating the image size. If decoding fails but there is no more
68 // data coming, sets the "decode failure" flag. 70 // data coming, sets the "decode failure" flag.
69 void decode(bool onlySize); 71 void decode(bool onlySize);
70 72
71 OwnPtr<JPEGImageReader> m_reader; 73 OwnPtr<JPEGImageReader> m_reader;
72 OwnPtr<ImagePlanes> m_imagePlanes; 74 OwnPtr<ImagePlanes> m_imagePlanes;
73 IntSize m_decodedSize; 75 IntSize m_decodedSize;
76 size_t m_sizeOffset;
77 size_t m_sizeOffsetOptimized;
74 bool m_hasColorProfile; 78 bool m_hasColorProfile;
75 }; 79 };
76 80
77 } // namespace blink 81 } // namespace blink
78 82
79 #endif 83 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698