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

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

Issue 1812273003: Eliminate copies of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 e0d94c4e899d5d634cd5820fd2941144df86e866..a77fdb2ec9484fb70b5015c544e4e19917e5329f 100644
--- a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h
+++ b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h
@@ -27,10 +27,12 @@
#define DecodingImageGenerator_h
#include "platform/PlatformExport.h"
+#include "platform/image-decoders/SegmentReader.h"
#include "third_party/skia/include/core/SkImageGenerator.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
+#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
class SkData;
@@ -48,7 +50,7 @@ class PLATFORM_EXPORT DecodingImageGenerator final : public SkImageGenerator {
public:
static SkImageGenerator* create(SkData*);
- DecodingImageGenerator(PassRefPtr<ImageFrameGenerator>, const SkImageInfo&, size_t index);
+ DecodingImageGenerator(PassRefPtr<ImageFrameGenerator>, const SkImageInfo&, PassRefPtr<SegmentReader>, bool allDataReceived, size_t index);
~DecodingImageGenerator() override;
void setCanYUVDecode(bool yes) { m_canYUVDecode = yes; }
@@ -64,7 +66,9 @@ protected:
private:
RefPtr<ImageFrameGenerator> m_frameGenerator;
- size_t m_frameIndex;
+ const RefPtr<SegmentReader> m_data; // Data source.
+ const bool m_allDataReceived;
+ const size_t m_frameIndex;
bool m_canYUVDecode;
};

Powered by Google App Engine
This is Rietveld 408576698