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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.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/graphics/ImageFrameGenerator.h
diff --git a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
index 39d3c40b00713a5849d327db5aa0bc9b17454317..c952d6c39f1118f637f9ac3a75b8458ca627118a 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
@@ -85,6 +85,10 @@ public:
// FIXME: Return alpha state for each frame.
bool hasAlpha(size_t);
+ // for single frame, get information if decoder can produce color output
+ // and how close to specified scale.
+ void getAvailableDecodeAndScale(SkColorType* outType, float* scale, float* lowerScale);
+
bool getYUVComponentSizes(SkISize componentSizes[3]);
private:
@@ -97,11 +101,11 @@ private:
void setHasAlpha(size_t index, bool hasAlpha);
// These methods are called while m_decodeMutex is locked.
- SkBitmap tryToResumeDecode(const SkISize& scaledSize, size_t index);
+ SkBitmap tryToResumeDecode(const SkISize& scaledSize, size_t index, SkColorType outputType, size_t rowBytes);
// Use the given decoder to decode. If a decoder is not given then try to create one.
// Returns true if decoding was complete.
- bool decode(size_t index, ImageDecoder**, SkBitmap*);
+ bool decode(size_t index, ImageDecoder**, SkBitmap*, SkColorType outputType, const SkISize& scaledSize, size_t rowBytes);
SkISize m_fullSize;
ThreadSafeDataTransport m_data;

Powered by Google App Engine
This is Rietveld 408576698