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

Unified Diff: Source/platform/image-decoders/ImageDecoder.h

Issue 418653002: Allowing YUV data to be retrieved from the JPEG Decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed unsigned char to appropriate JSAMP... types Created 6 years, 5 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: Source/platform/image-decoders/ImageDecoder.h
diff --git a/Source/platform/image-decoders/ImageDecoder.h b/Source/platform/image-decoders/ImageDecoder.h
index 559213011fae93fa14db64b85678ba0c704652f1..5684299a75a5627e2ce634a75771fe7afd43e3ad 100644
--- a/Source/platform/image-decoders/ImageDecoder.h
+++ b/Source/platform/image-decoders/ImageDecoder.h
@@ -49,6 +49,20 @@
namespace blink {
+// DecodingBuffers can be used to decode color components into provided buffers instead of using an ImageFrame.
+class DecodingBuffers {
+public:
+ DecodingBuffers();
+
+ void set(void* planes[3], size_t rowBytes[3]);
Peter Kasting 2014/07/24 18:08:14 Nit: Do we really have to use void* for these plan
+ void* getPlane(int) const;
Peter Kasting 2014/07/24 18:08:14 Const functions should not return non-const pointe
+ size_t getRowBytes(int) const;
+
+private:
+ void* m_planes[3];
+ size_t m_rowBytes[3];
+};
+
// ImageDecoder is a base for all format-specific decoders
// (e.g. JPEGImageDecoder). This base manages the ImageFrame cache.
//
@@ -100,7 +114,7 @@ public:
// Decoders which downsample images should override this method to
// return the actual decoded size.
- virtual IntSize decodedSize() const { return size(); }
+ virtual IntSize decodedSize(int component = 0) const { return size(); }
// This will only differ from size() for ICO (where each frame is a
// different icon) or other formats where different frames are different
@@ -252,6 +266,11 @@ public:
m_frameBufferCache[0].setMemoryAllocator(allocator);
}
+ virtual void setAcceleratedYUVDecoding(bool) { }
+ virtual bool acceleratedYUVDecoding() const { return false; }
+ virtual bool doAcceleratedYUVDecoding() { return false; }
+ virtual void setDecodingBuffers(OwnPtr<DecodingBuffers>&) { }
+
protected:
// Calculates the most recent frame whose image data may be needed in
// order to decode frame |frameIndex|, based on frame disposal methods

Powered by Google App Engine
This is Rietveld 408576698