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

Unified Diff: third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h

Issue 1925533003: High CPU and increased memory usage fix for high-res (GIF, WEBP...) animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: @scroggo, thanks a lot - this makes page [3] to use 250MB (was 750MB) Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h
diff --git a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h
index 74ba6cabbe88bb061a142cb73f3539596b62f178..aef00b8a71e03ffdf80e60ac9c6c96e821eab4bb 100644
--- a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h
+++ b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h
@@ -48,9 +48,14 @@ class PLATFORM_EXPORT DecodingImageGenerator final : public SkImageGenerator {
USING_FAST_MALLOC(DecodingImageGenerator);
WTF_MAKE_NONCOPYABLE(DecodingImageGenerator);
public:
+ // Make kNeedNeedNewImageUniqueID accessible.
Peter Kasting 2016/05/04 03:01:07 Extra "need". Also, you should qualify this with
aleksandar.stojiljkovic 2016/05/04 20:56:29 Done.
Peter Kasting 2016/05/07 01:58:29 Any comment on the idea of exposing SkImageGenerat
aleksandar.stojiljkovic 2016/05/07 19:50:52 I think SkImageGenerator should stay as it is now
+ enum {
+ NeedNewImageUniqueID = kNeedNewImageUniqueID
Peter Kasting 2016/05/04 03:01:07 This should still be named with a leading k. Use
aleksandar.stojiljkovic 2016/05/04 20:56:29 Done.
+ };
+
static SkImageGenerator* create(SkData*);
- DecodingImageGenerator(PassRefPtr<ImageFrameGenerator>, const SkImageInfo&, PassRefPtr<SegmentReader>, bool allDataReceived, size_t index);
+ DecodingImageGenerator(PassRefPtr<ImageFrameGenerator>, const SkImageInfo&, PassRefPtr<SegmentReader>, bool allDataReceived, size_t index, uint32_t uniqueID = NeedNewImageUniqueID);
~DecodingImageGenerator() override;
void setCanYUVDecode(bool yes) { m_canYUVDecode = yes; }

Powered by Google App Engine
This is Rietveld 408576698