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

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

Issue 2878363003: Revert of Fix ImageAnimation constant names after Blink renaming (Closed)
Patch Set: Created 3 years, 7 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) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 16 matching lines...) Expand all
27 #define ImageAnimation_h 27 #define ImageAnimation_h
28 28
29 namespace blink { 29 namespace blink {
30 30
31 // GIF and WebP support animation. The explanation below is in terms of GIF, 31 // GIF and WebP support animation. The explanation below is in terms of GIF,
32 // but the same constants are used for WebP, too. 32 // but the same constants are used for WebP, too.
33 // GIFs have an optional 16-bit unsigned loop count that describes how an 33 // GIFs have an optional 16-bit unsigned loop count that describes how an
34 // animated GIF should be cycled. If the loop count is absent, the animation 34 // animated GIF should be cycled. If the loop count is absent, the animation
35 // cycles once; if it is 0, the animation cycles infinitely; otherwise the 35 // cycles once; if it is 0, the animation cycles infinitely; otherwise the
36 // animation plays n + 1 cycles (where n is the specified loop count). If the 36 // animation plays n + 1 cycles (where n is the specified loop count). If the
37 // GIF decoder defaults to kAnimationLoopOnce in the absence of any loop count 37 // GIF decoder defaults to kCAnimationLoopOnce in the absence of any loop count
38 // and translates an explicit "0" loop count to kAnimationLoopInfinite, then we 38 // and translates an explicit "0" loop count to kCAnimationLoopInfinite, then we
39 // get a couple of nice side effects: 39 // get a couple of nice side effects:
40 // * By making kAnimationLoopOnce be 0, we allow the animation cycling code in 40 // * By making kCAnimationLoopOnce be 0, we allow the animation cycling code
41 // BitmapImage.cpp to avoid special-casing it, and simply treat all 41 // in BitmapImage.cpp to avoid special-casing it, and simply treat all
42 // non-negative loop counts identically. 42 // non-negative loop counts identically.
43 // * By making the other two constants negative, we avoid conflicts with any 43 // * By making the other two constants negative, we avoid conflicts with any
44 // real loop count values. 44 // real loop count values.
45 const int kAnimationLoopOnce = 0; 45 const int kCAnimationLoopOnce = 0;
46 const int kAnimationLoopInfinite = -1; 46 const int kCAnimationLoopInfinite = -1;
47 const int kAnimationNone = -2; 47 const int kCAnimationNone = -2;
48 48
49 } // namespace blink 49 } // namespace blink
50 50
51 #endif 51 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698