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

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

Issue 2462803002: Plumb color space to DecodingImageGenerator and ImageFrameGenerator (Closed)
Patch Set: Incorporate review feedback Created 4 years, 1 month 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 f437070cd2eadfbcb14db93599d3e732be9685f5..004b4200cff68d4a3e721f0faddb9b7737c863db 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
@@ -64,8 +64,10 @@ class PLATFORM_EXPORT ImageFrameGenerator final
public:
static PassRefPtr<ImageFrameGenerator> create(const SkISize& fullSize,
+ sk_sp<SkColorSpace> colorSpace,
bool isMultiFrame = false) {
- return adoptRef(new ImageFrameGenerator(fullSize, isMultiFrame));
+ return adoptRef(
+ new ImageFrameGenerator(fullSize, std::move(colorSpace), isMultiFrame));
}
~ImageFrameGenerator();
@@ -93,6 +95,7 @@ class PLATFORM_EXPORT ImageFrameGenerator final
const size_t rowBytes[3]);
const SkISize& getFullSize() const { return m_fullSize; }
+ sk_sp<SkColorSpace> getColorSpace() const { return m_colorSpace; }
bool isMultiFrame() const { return m_isMultiFrame; }
bool decodeFailed() const { return m_decodeFailed; }
@@ -105,7 +108,9 @@ class PLATFORM_EXPORT ImageFrameGenerator final
bool getYUVComponentSizes(SegmentReader*, SkYUVSizeInfo*);
private:
- ImageFrameGenerator(const SkISize& fullSize, bool isMultiFrame);
+ ImageFrameGenerator(const SkISize& fullSize,
+ sk_sp<SkColorSpace>,
+ bool isMultiFrame);
friend class ImageFrameGeneratorTest;
friend class DeferredImageDecoderTest;
@@ -131,6 +136,7 @@ class PLATFORM_EXPORT ImageFrameGenerator final
SkBitmap::Allocator*);
const SkISize m_fullSize;
+ sk_sp<SkColorSpace> m_colorSpace;
const bool m_isMultiFrame;
bool m_decodeFailed;

Powered by Google App Engine
This is Rietveld 408576698