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

Unified Diff: Source/platform/image-decoders/jpeg/JPEGImageDecoder.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: Fixed comments 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/jpeg/JPEGImageDecoder.h
diff --git a/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h b/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h
index 9293a67e44a45766ff89348e833f5e203c0be4cf..2f0e5de2c2ef0f95f32eb26f6808ff059ea679f1 100644
--- a/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h
+++ b/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h
@@ -48,12 +48,16 @@ public:
virtual bool isSizeAvailable() OVERRIDE;
virtual bool hasColorProfile() const OVERRIDE { return m_hasColorProfile; }
virtual IntSize decodedSize() const OVERRIDE { return m_decodedSize; }
+ virtual IntSize decodedYUVSize(int component = 0) const OVERRIDE;
Stephen White 2014/07/25 17:03:43 Nit: seems strange to have a default argument here
sugoi1 2014/07/25 17:08:38 You're right, I had originally put this here becau
virtual bool setSize(unsigned width, unsigned height) OVERRIDE;
virtual ImageFrame* frameBufferAtIndex(size_t) OVERRIDE;
// CAUTION: setFailed() deletes |m_reader|. Be careful to avoid
// accessing deleted memory, especially when calling this from inside
// JPEGImageReader!
virtual bool setFailed() OVERRIDE;
+ virtual bool YUVDecoding() const OVERRIDE { return m_imagePlanes.get(); }
+ virtual bool decodeToYUV() OVERRIDE;
+ virtual void setImagePlanes(OwnPtr<ImagePlanes>&) OVERRIDE;
bool outputScanlines();
unsigned desiredScaleNumerator() const;
@@ -70,6 +74,7 @@ private:
void decode(bool onlySize);
OwnPtr<JPEGImageReader> m_reader;
+ OwnPtr<ImagePlanes> m_imagePlanes;
IntSize m_decodedSize;
bool m_hasColorProfile;
};

Powered by Google App Engine
This is Rietveld 408576698