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

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

Issue 1403393004: JPEGImageDecoder RGB565 and downsample support and related Skia imagegenerator changes Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Continued decoding fix and downscale combined Created 5 years, 2 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/jpeg/JPEGImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h
index dd2c690cc513aecad60f42b92901c39f9e5f9fb3..9556762080d18c99288aac029df65705477453c4 100644
--- a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h
@@ -54,6 +54,11 @@ public:
bool decodeToYUV() override;
void setImagePlanes(PassOwnPtr<ImagePlanes>) override;
bool hasImagePlanes() const { return m_imagePlanes; }
+ void getAvailableDecodeAndScale(ImageFrame::ColorType* outType, float* scale, float* lowerScale) override;
+ bool activateDecodeAndScale(ImageFrame::ColorType outColor, size_t maxDecodedBytes = noDecodedImageByteLimit) override;
+ void disableDecodeAndScale() override;
+ bool decodeToRGB565Enabled() const { return (m_decodeColor == ImageFrame::RGB565); }
+ bool hasFramebufferChanged() const;
bool outputScanlines();
unsigned desiredScaleNumerator() const;
@@ -77,6 +82,9 @@ private:
OwnPtr<ImagePlanes> m_imagePlanes;
IntSize m_decodedSize;
bool m_hasColorProfile;
+ ImageFrame::ColorType m_decodeColor;
+ // keep the value to restore after disableDecodeAndScale()
+ size_t m_originalMaxDecodedBytes;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698