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

Side by Side Diff: Source/platform/graphics/BitmapImage.h

Issue 388253004: Drawing an animated image to a canvas now behave as expected (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Corrections according to comments + rebase master Created 6 years, 5 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 | « Source/core/html/HTMLImageElement.cpp ('k') | Source/platform/graphics/BitmapImage.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 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * Copyright (C) 2008-2009 Torch Mobile, Inc. 4 * Copyright (C) 2008-2009 Torch Mobile, Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 virtual String filenameExtension() const OVERRIDE; 72 virtual String filenameExtension() const OVERRIDE;
73 73
74 // It may look unusual that there is no start animation call as public API. This is because 74 // It may look unusual that there is no start animation call as public API. This is because
75 // we start and stop animating lazily. Animation begins whenever someone dr aws the image. It will 75 // we start and stop animating lazily. Animation begins whenever someone dr aws the image. It will
76 // automatically pause once all observers no longer want to render the image anywhere. 76 // automatically pause once all observers no longer want to render the image anywhere.
77 virtual void stopAnimation() OVERRIDE; 77 virtual void stopAnimation() OVERRIDE;
78 virtual void resetAnimation() OVERRIDE; 78 virtual void resetAnimation() OVERRIDE;
79 virtual bool maybeAnimated() OVERRIDE; 79 virtual bool maybeAnimated() OVERRIDE;
80 80
81 virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() OVERRIDE; 81 virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() OVERRIDE;
82 virtual PassRefPtr<Image> imageForDefaultFrame() OVERRIDE;
82 virtual bool currentFrameKnownToBeOpaque() OVERRIDE; 83 virtual bool currentFrameKnownToBeOpaque() OVERRIDE;
83 84
84 ImageOrientation currentFrameOrientation(); 85 ImageOrientation currentFrameOrientation();
85 86
86 #if ENABLE(ASSERT) 87 #if ENABLE(ASSERT)
87 virtual bool notSolidColor() OVERRIDE; 88 virtual bool notSolidColor() OVERRIDE;
88 #endif 89 #endif
89 90
90 private: 91 private:
91 friend class BitmapImageTest; 92 friend class BitmapImageTest;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO. 187 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO.
187 mutable bool m_hasUniformFrameSize : 1; 188 mutable bool m_hasUniformFrameSize : 1;
188 mutable bool m_haveFrameCount : 1; 189 mutable bool m_haveFrameCount : 1;
189 }; 190 };
190 191
191 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); 192 DEFINE_IMAGE_TYPE_CASTS(BitmapImage);
192 193
193 } 194 }
194 195
195 #endif 196 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698