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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/ImageFrame.h

Issue 1820733004: Propagate the decoder frame premul info to SkBitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 int width() const 192 int width() const
193 { 193 {
194 return m_bitmap.width(); 194 return m_bitmap.width();
195 } 195 }
196 196
197 int height() const 197 int height() const
198 { 198 {
199 return m_bitmap.height(); 199 return m_bitmap.height();
200 } 200 }
201 201
202 SkAlphaType computeAlphaType() const;
203
202 SkBitmap m_bitmap; 204 SkBitmap m_bitmap;
203 SkBitmap::Allocator* m_allocator; 205 SkBitmap::Allocator* m_allocator;
204 bool m_hasAlpha; 206 bool m_hasAlpha;
205 // This will always just be the entire buffer except for GIF or WebP 207 // This will always just be the entire buffer except for GIF or WebP
206 // frames whose original rect was smaller than the overall image size. 208 // frames whose original rect was smaller than the overall image size.
207 IntRect m_originalFrameRect; 209 IntRect m_originalFrameRect;
208 Status m_status; 210 Status m_status;
209 unsigned m_duration; 211 unsigned m_duration;
210 DisposalMethod m_disposalMethod; 212 DisposalMethod m_disposalMethod;
211 AlphaBlendSource m_alphaBlendSource; 213 AlphaBlendSource m_alphaBlendSource;
212 bool m_premultiplyAlpha; 214 bool m_premultiplyAlpha;
213 // True if the pixels changed, but the bitmap has not yet been notified. 215 // True if the pixels changed, but the bitmap has not yet been notified.
214 bool m_pixelsChanged; 216 bool m_pixelsChanged;
215 217
216 // The frame that must be decoded before this frame can be decoded. 218 // The frame that must be decoded before this frame can be decoded.
217 // WTF::kNotFound if this frame doesn't require any previous frame. 219 // WTF::kNotFound if this frame doesn't require any previous frame.
218 // This is used by ImageDecoder::clearCacheExceptFrame(), and will never 220 // This is used by ImageDecoder::clearCacheExceptFrame(), and will never
219 // be read for image formats that do not have multiple frames. 221 // be read for image formats that do not have multiple frames.
220 size_t m_requiredPreviousFrameIndex; 222 size_t m_requiredPreviousFrameIndex;
221 }; 223 };
222 224
223 } // namespace blink 225 } // namespace blink
224 226
225 #endif 227 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698