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

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

Issue 1719533002: Modify YUV codecs to match Skia's API change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ASSERT in base class YUV implementations, Use ArrayBuffer Created 4 years, 10 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/image-decoders/ImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
index 2ebd7797caf99844abc34018d95e42f885f8b453..52d099e468d28cebeaf7eba264666acf160aa37f 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
@@ -55,7 +55,7 @@ class PLATFORM_EXPORT ImagePlanes final {
WTF_MAKE_NONCOPYABLE(ImagePlanes);
public:
ImagePlanes();
- ImagePlanes(void* planes[3], size_t rowBytes[3]);
+ ImagePlanes(void* planes[3], const size_t rowBytes[3]);
void* plane(int);
size_t rowBytes(int) const;
@@ -71,8 +71,6 @@ private:
class PLATFORM_EXPORT ImageDecoder {
WTF_MAKE_NONCOPYABLE(ImageDecoder); USING_FAST_MALLOC(ImageDecoder);
public:
- enum SizeType { ActualSize, SizeForMemoryAllocation };
-
static const size_t noDecodedImageByteLimit = Platform::noDecodedImageByteLimit;
enum AlphaOption {
@@ -136,9 +134,21 @@ public:
// return the actual decoded size.
virtual IntSize decodedSize() const { return size(); }
- // Decoders which support YUV decoding can override this to
- // give potentially different sizes per component.
- virtual IntSize decodedYUVSize(int component, SizeType) const { return decodedSize(); }
+ // Decoders which support YUV decoding must override this to
Noel Gordon 2016/03/01 02:27:49 which/that confusion: "Image decoders that support
msarett 2016/03/01 18:00:38 Done.
+ // provide the size of each component.
+ virtual IntSize decodedYUVSize(int component) const
+ {
+ ASSERT(false);
+ return IntSize();
+ }
+
+ // Decoders which support YUV decoding must override this to
Noel Gordon 2016/03/01 02:27:49 which/that confusion: "Image decoders that support
msarett 2016/03/01 18:00:38 Done.
+ // return the width of each row of the memory allocation.
+ virtual size_t decodedYUVWidthBytes(int component) const
+ {
+ ASSERT(false);
+ return 0;
+ }
// This will only differ from size() for ICO (where each frame is a
// different icon) or other formats where different frames are different

Powered by Google App Engine
This is Rietveld 408576698