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

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

Issue 2202473002: DO NOT COMMIT: Experimental removal of encoded image data Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebase) Created 4 years, 3 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 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 SizeAvailable, 106 SizeAvailable,
107 SizeUnavailable 107 SizeUnavailable
108 }; 108 };
109 virtual SizeAvailability setData(PassRefPtr<SharedBuffer> data, bool allData Received); 109 virtual SizeAvailability setData(PassRefPtr<SharedBuffer> data, bool allData Received);
110 virtual SizeAvailability dataChanged(bool /*allDataReceived*/) { return Size Unavailable; } 110 virtual SizeAvailability dataChanged(bool /*allDataReceived*/) { return Size Unavailable; }
111 111
112 virtual String filenameExtension() const { return String(); } // null string if unknown 112 virtual String filenameExtension() const { return String(); } // null string if unknown
113 113
114 virtual void destroyDecodedData() = 0; 114 virtual void destroyDecodedData() = 0;
115 115
116 virtual bool clear() { return false; }
116 virtual PassRefPtr<SharedBuffer> data() { return m_encodedImageData; } 117 virtual PassRefPtr<SharedBuffer> data() { return m_encodedImageData; }
117 118
118 // Animation begins whenever someone draws the image, so startAnimation() is not normally called. 119 // Animation begins whenever someone draws the image, so startAnimation() is not normally called.
119 // It will automatically pause once all observers no longer want to render t he image anywhere. 120 // It will automatically pause once all observers no longer want to render t he image anywhere.
120 enum CatchUpAnimation { DoNotCatchUp, CatchUp }; 121 enum CatchUpAnimation { DoNotCatchUp, CatchUp };
121 virtual void startAnimation(CatchUpAnimation = CatchUp) { } 122 virtual void startAnimation(CatchUpAnimation = CatchUp) { }
122 virtual void resetAnimation() {} 123 virtual void resetAnimation() {}
123 124
124 // True if this image can potentially animate. 125 // True if this image can potentially animate.
125 virtual bool maybeAnimated() { return false; } 126 virtual bool maybeAnimated() { return false; }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 UntracedMember<ImageObserver> m_imageObserver; 187 UntracedMember<ImageObserver> m_imageObserver;
187 bool m_imageObserverDisabled; 188 bool m_imageObserverDisabled;
188 }; 189 };
189 190
190 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ 191 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \
191 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t ypeName()) 192 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t ypeName())
192 193
193 } // namespace blink 194 } // namespace blink
194 195
195 #endif 196 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698