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

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

Issue 2530443004: Add target color profile to BitmapImage::draw (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/BitmapImage.h
diff --git a/third_party/WebKit/Source/platform/graphics/BitmapImage.h b/third_party/WebKit/Source/platform/graphics/BitmapImage.h
index 3e74322e6732794ee12858f9f94218ad9e300eba..664fb795dad61b00b1a51b6349f97401e6cfa136 100644
--- a/third_party/WebKit/Source/platform/graphics/BitmapImage.h
+++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.h
@@ -117,17 +117,25 @@ class PLATFORM_EXPORT BitmapImage final : public Image {
RespectImageOrientationEnum,
ImageClampingMode) override;
+ void drawInColorSpace(SkCanvas*,
+ const SkPaint&,
+ const FloatRect& dstRect,
+ const FloatRect& srcRect,
+ RespectImageOrientationEnum,
+ ImageClampingMode,
+ sk_sp<SkColorSpace>) override;
+
size_t currentFrame() const { return m_currentFrame; }
size_t frameCount();
- sk_sp<SkImage> frameAtIndex(size_t);
+ sk_sp<SkImage> frameAtIndex(size_t, sk_sp<SkColorSpace> = nullptr);
bool frameIsCompleteAtIndex(size_t) const;
float frameDurationAtIndex(size_t) const;
bool frameHasAlphaAtIndex(size_t);
ImageOrientation frameOrientationAtIndex(size_t);
- sk_sp<SkImage> decodeAndCacheFrame(size_t index);
+ sk_sp<SkImage> decodeAndCacheFrame(size_t index, sk_sp<SkColorSpace>);
void updateSize() const;
// Returns the total number of bytes allocated for all framebuffers, i.e.
@@ -191,6 +199,8 @@ class PLATFORM_EXPORT BitmapImage final : public Image {
sk_sp<SkImage>
m_cachedFrame; // A cached copy of the most recently-accessed frame.
size_t m_cachedFrameIndex; // Index of the frame that is cached.
+ sk_sp<SkColorSpace>
+ m_cachedFrameColorSpace; // Color space of the cached frame.
std::unique_ptr<Timer<BitmapImage>> m_frameTimer;
int m_repetitionCount; // How many total animation loops we should do. This
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698