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

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

Issue 1812273003: Eliminate copies of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small cleanups; remove unneeded changes Created 4 years, 9 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 3338d4aa8ad1e5039efc98d14e95b2c39d9237ad..86e5d650f232755b2ac5252a1715e28f098654bd 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
@@ -31,6 +31,7 @@
#include "platform/image-decoders/ImageDecoder.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkPixelRef.h"
+#include "third_party/skia/src/core/SkRWBuffer.h"
#include "wtf/Allocator.h"
#include "wtf/Forward.h"
#include "wtf/OwnPtr.h"
@@ -88,9 +89,10 @@ private:
PassRefPtr<SkImage> createFrameImageAtIndex(size_t index, bool knownToBeOpaque) const;
- RefPtr<SharedBuffer> m_data;
+ // Copy of the data that is passed in, used by deferred decoding.
+ // Allows creating readonly snapshots that may be read in another thread.
+ OwnPtr<SkRWBuffer> m_rwBuffer;
bool m_allDataReceived;
- unsigned m_lastDataSize;
OwnPtr<ImageDecoder> m_actualDecoder;
String m_filenameExtension;

Powered by Google App Engine
This is Rietveld 408576698