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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ImageSource.h

Issue 2054643003: Remove duplication of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a comment Created 4 years, 5 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) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // earlier frame may require more work to be done, e.g. redecoding the image 62 // earlier frame may require more work to be done, e.g. redecoding the image
63 // from the beginning. 63 // from the beginning.
64 // 64 //
65 // Implementations may elect to preserve more frames than the one requested 65 // Implementations may elect to preserve more frames than the one requested
66 // here if doing so is likely to save CPU time in the future, but will pay 66 // here if doing so is likely to save CPU time in the future, but will pay
67 // an increased memory cost to do so. 67 // an increased memory cost to do so.
68 // 68 //
69 // Returns the number of bytes of frame data actually cleared. 69 // Returns the number of bytes of frame data actually cleared.
70 size_t clearCacheExceptFrame(size_t); 70 size_t clearCacheExceptFrame(size_t);
71 71
72 bool hasData() const;
73 PassRefPtr<SharedBuffer> data();
haraken 2016/07/13 02:18:30 Who uses these methods?
hajimehoshi 2016/07/13 07:36:22 data() is used by BitmapImage. hasData() is not u
72 void setData(SharedBuffer& data, bool allDataReceived); 74 void setData(SharedBuffer& data, bool allDataReceived);
73 String filenameExtension() const; 75 String filenameExtension() const;
74 76
75 bool isSizeAvailable(); 77 bool isSizeAvailable();
76 bool hasColorProfile() const; 78 bool hasColorProfile() const;
77 IntSize size(RespectImageOrientationEnum = DoNotRespectImageOrientation) con st; 79 IntSize size(RespectImageOrientationEnum = DoNotRespectImageOrientation) con st;
78 IntSize frameSizeAtIndex(size_t, RespectImageOrientationEnum = DoNotRespectI mageOrientation) const; 80 IntSize frameSizeAtIndex(size_t, RespectImageOrientationEnum = DoNotRespectI mageOrientation) const;
79 81
80 bool getHotSpot(IntPoint&) const; 82 bool getHotSpot(IntPoint&) const;
81 int repetitionCount(); 83 int repetitionCount();
(...skipping 12 matching lines...) Expand all
94 // frame has not yet begun to decode. 96 // frame has not yet begun to decode.
95 size_t frameBytesAtIndex(size_t) const; 97 size_t frameBytesAtIndex(size_t) const;
96 98
97 private: 99 private:
98 std::unique_ptr<DeferredImageDecoder> m_decoder; 100 std::unique_ptr<DeferredImageDecoder> m_decoder;
99 }; 101 };
100 102
101 } // namespace blink 103 } // namespace blink
102 104
103 #endif 105 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698