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

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

Issue 2565323003: Move gif image decoder to SkCodec (Closed)
Patch Set: Fix DeferredImageDecoderTestWoPlatform.mixImagesGif by tracking onSetData(nullptr) Created 3 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
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const int rowBytes = (endX - startX) * sizeof(PixelData); 115 const int rowBytes = (endX - startX) * sizeof(PixelData);
116 const PixelData* const startAddr = getAddr(startX, startY); 116 const PixelData* const startAddr = getAddr(startX, startY);
117 for (int destY = startY + 1; destY < endY; ++destY) 117 for (int destY = startY + 1; destY < endY; ++destY)
118 memcpy(getAddr(startX, destY), startAddr, rowBytes); 118 memcpy(getAddr(startX, destY), startAddr, rowBytes);
119 } 119 }
120 120
121 // Allocates space for the pixel data. Must be called before any pixels 121 // Allocates space for the pixel data. Must be called before any pixels
122 // are written. Must only be called once. The specified color space may 122 // are written. Must only be called once. The specified color space may
123 // be nullptr if and only if color correct rendering is enabled. Returns 123 // be nullptr if and only if color correct rendering is enabled. Returns
124 // whether allocation succeeded. 124 // whether allocation succeeded.
125 bool setSizeAndColorSpaceWithoutZeroFilling(int newWidth,
126 int newHeight,
127 sk_sp<SkColorSpace>);
125 bool setSizeAndColorSpace(int newWidth, int newHeight, sk_sp<SkColorSpace>); 128 bool setSizeAndColorSpace(int newWidth, int newHeight, sk_sp<SkColorSpace>);
126 129
127 bool hasAlpha() const; 130 bool hasAlpha() const;
128 const IntRect& originalFrameRect() const { return m_originalFrameRect; } 131 const IntRect& originalFrameRect() const { return m_originalFrameRect; }
129 Status getStatus() const { return m_status; } 132 Status getStatus() const { return m_status; }
130 unsigned duration() const { return m_duration; } 133 unsigned duration() const { return m_duration; }
131 DisposalMethod getDisposalMethod() const { return m_disposalMethod; } 134 DisposalMethod getDisposalMethod() const { return m_disposalMethod; }
132 AlphaBlendSource getAlphaBlendSource() const { return m_alphaBlendSource; } 135 AlphaBlendSource getAlphaBlendSource() const { return m_alphaBlendSource; }
133 bool premultiplyAlpha() const { return m_premultiplyAlpha; } 136 bool premultiplyAlpha() const { return m_premultiplyAlpha; }
134 SkBitmap::Allocator* allocator() const { return m_allocator; } 137 SkBitmap::Allocator* allocator() const { return m_allocator; }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 // The frame that must be decoded before this frame can be decoded. 295 // The frame that must be decoded before this frame can be decoded.
293 // WTF::kNotFound if this frame doesn't require any previous frame. 296 // WTF::kNotFound if this frame doesn't require any previous frame.
294 // This is used by ImageDecoder::clearCacheExceptFrame(), and will never 297 // This is used by ImageDecoder::clearCacheExceptFrame(), and will never
295 // be read for image formats that do not have multiple frames. 298 // be read for image formats that do not have multiple frames.
296 size_t m_requiredPreviousFrameIndex; 299 size_t m_requiredPreviousFrameIndex;
297 }; 300 };
298 301
299 } // namespace blink 302 } // namespace blink
300 303
301 #endif 304 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698