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

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: 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..d939268aa7c11d0d8b989320a103acdf3b093470 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
@@ -85,6 +85,9 @@ public:
// FIXME: Return alpha state for each frame.
bool hasAlpha(size_t);
+ // for single frame, if decoder can produce RGB_565 by decoding current image
+ bool canDecodeToRGB565();
+
bool getYUVComponentSizes(SkISize componentSizes[3]);
private:
@@ -97,11 +100,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 outType);
scroggo_chromium 2015/10/19 20:41:36 Maybe this should use an SkImageInfo, and combine
aleksandar.stojiljkovic 2015/10/20 09:51:12 This is private code for this class. It comes back
// 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 outType);
SkISize m_fullSize;
ThreadSafeDataTransport m_data;

Powered by Google App Engine
This is Rietveld 408576698