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

Unified Diff: third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.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: Nits related to review #31 Created 4 years, 7 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/DeferredImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
index d6084c91d47c542ff2caad1b7e16f2d693c3c3c3..36f81799e3e88c393e19f911923c1375b1a4b6e6 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
@@ -43,7 +43,7 @@ namespace blink {
class ImageFrameGenerator;
class SharedBuffer;
-struct FrameData;
+struct DeferredFrameData;
class PLATFORM_EXPORT DeferredImageDecoder final {
WTF_MAKE_NONCOPYABLE(DeferredImageDecoder);
@@ -87,7 +87,7 @@ private:
void activateLazyDecoding();
void prepareLazyDecodedFrames();
- PassRefPtr<SkImage> createFrameImageAtIndex(size_t index, bool knownToBeOpaque) const;
+ PassRefPtr<SkImage> createFrameImageAtIndex(size_t index, bool knownToBeOpaque);
// Copy of the data that is passed in, used by deferred decoding.
// Allows creating readonly snapshots that may be read in another thread.
@@ -101,8 +101,8 @@ private:
bool m_hasColorProfile;
bool m_canYUVDecode;
- // Carries only frame state and other information. Does not carry bitmap.
- Vector<FrameData> m_frameData;
+ // Caches frame state information.
+ Vector<DeferredFrameData> m_frameData;
RefPtr<ImageFrameGenerator> m_frameGenerator;
static bool s_enabled;

Powered by Google App Engine
This is Rietveld 408576698