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

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

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: Removed changes to ImageFrameGenerator for now 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.cpp
diff --git a/Source/platform/image-decoders/ImageDecoder.cpp b/Source/platform/image-decoders/ImageDecoder.cpp
index 16940d10e1a02755c60140e30f8ea17ba2b7139c..3e226260fd03a844d52ef0edb6acc38afec04880 100644
--- a/Source/platform/image-decoders/ImageDecoder.cpp
+++ b/Source/platform/image-decoders/ImageDecoder.cpp
@@ -82,6 +82,34 @@ inline bool matchesCURSignature(char* contents)
return !memcmp(contents, "\x00\x00\x02\x00", 4);
}
+DecodingBuffers::DecodingBuffers()
Noel Gordon 2014/07/25 15:55:01 Not the best place to add this: please move all th
sugoi1 2014/07/25 16:56:47 Done.
+{
+ for (int i = 0; i < 3; ++i) {
+ m_planes[i] = 0;
+ m_rowBytes[i] = 0;
+ }
+}
+
+void DecodingBuffers::set(void* planes[3], size_t rowBytes[3])
+{
+ for (int i = 0; i < 3; ++i) {
+ m_planes[i] = planes[i];
+ m_rowBytes[i] = rowBytes[i];
+ }
+}
+
+void* DecodingBuffers::getPlane(int i)
+{
+ ASSERT((i >= 0) && i < 3);
+ return m_planes[i];
+}
+
+size_t DecodingBuffers::getRowBytes(int i) const
+{
+ ASSERT((i >= 0) && i < 3);
+ return m_rowBytes[i];
+}
+
PassOwnPtr<ImageDecoder> ImageDecoder::create(const SharedBuffer& data, ImageSource::AlphaOption alphaOption, ImageSource::GammaAndColorProfileOption gammaAndColorProfileOption)
{
static const unsigned longestSignatureLength = sizeof("RIFF????WEBPVP") - 1;

Powered by Google App Engine
This is Rietveld 408576698