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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h

Issue 2787053004: Respect colorSpace in DecodingImageGenerator::onGetPixels() (Closed)
Patch Set: Response to comments Created 3 years, 8 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 65ce816863b5a8a378fc0cbc7f67b3c2607e2d2d..ef15943f4149b240430a91e0718caefa8a2793eb 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
@@ -64,11 +64,10 @@ class PLATFORM_EXPORT ImageFrameGenerator final
public:
static PassRefPtr<ImageFrameGenerator> create(
- const SkISize& fullSize,
+ const SkImageInfo& info,
bool isMultiFrame,
const ColorBehavior& colorBehavior) {
- return adoptRef(
- new ImageFrameGenerator(fullSize, isMultiFrame, colorBehavior));
+ return adoptRef(new ImageFrameGenerator(info, isMultiFrame, colorBehavior));
}
~ImageFrameGenerator();
@@ -95,7 +94,7 @@ class PLATFORM_EXPORT ImageFrameGenerator final
void* planes[3],
const size_t rowBytes[3]);
- const SkISize& getFullSize() const { return m_fullSize; }
+ SkISize getFullSize() const { return m_info.dimensions(); }
bool isMultiFrame() const { return m_isMultiFrame; }
bool decodeFailed() const { return m_decodeFailed; }
@@ -108,7 +107,7 @@ class PLATFORM_EXPORT ImageFrameGenerator final
bool getYUVComponentSizes(SegmentReader*, SkYUVSizeInfo*);
private:
- ImageFrameGenerator(const SkISize& fullSize,
+ ImageFrameGenerator(const SkImageInfo&,
bool isMultiFrame,
const ColorBehavior&);
@@ -126,16 +125,19 @@ class PLATFORM_EXPORT ImageFrameGenerator final
bool allDataReceived,
size_t index,
const SkISize& scaledSize,
- SkBitmap::Allocator*);
+ SkBitmap::Allocator*,
+ const SkImageInfo& dstInfo);
// This method should only be called while m_decodeMutex is locked.
bool decode(SegmentReader*,
bool allDataReceived,
size_t index,
ImageDecoder**,
SkBitmap*,
- SkBitmap::Allocator*);
+ SkBitmap::Allocator*,
+ ImageDecoder::AlphaOption,
+ const SkImageInfo& dstInfo);
- const SkISize m_fullSize;
+ const SkImageInfo m_info;
// Parameters used to create internal ImageDecoder objects.
const ColorBehavior m_decoderColorBehavior;

Powered by Google App Engine
This is Rietveld 408576698