Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 * | 7 * |
| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 | 70 |
| 71 static bool supportsAcceleratedAnimationOfProperty(CSSPropertyID); | 71 static bool supportsAcceleratedAnimationOfProperty(CSSPropertyID); |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 OwnPtr<AnimationControllerPrivate> m_data; | 74 OwnPtr<AnimationControllerPrivate> m_data; |
| 75 int m_beginAnimationUpdateCount; | 75 int m_beginAnimationUpdateCount; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 class AnimationUpdateBlock { | 78 class AnimationUpdateBlock { |
| 79 public: | 79 public: |
| 80 AnimationUpdateBlock(AnimationController* animationController) | 80 explicit AnimationUpdateBlock(AnimationController* animationController) |
| 81 : m_animationController(animationController) | 81 : m_animationController(animationController) |
| 82 { | 82 { |
| 83 if (m_animationController) | 83 if (m_animationController) |
| 84 m_animationController->beginAnimationUpdate(); | 84 m_animationController->beginAnimationUpdate(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 explicit AnimationUpdateBlock(AnimationController& animationController) | |
|
Inactive
2013/10/21 19:15:10
I added this constructor taking a reference for co
| |
| 88 : m_animationController(&animationController) | |
| 89 { | |
| 90 m_animationController->beginAnimationUpdate(); | |
| 91 } | |
| 92 | |
| 87 ~AnimationUpdateBlock() | 93 ~AnimationUpdateBlock() |
| 88 { | 94 { |
| 89 if (m_animationController) | 95 if (m_animationController) |
| 90 m_animationController->endAnimationUpdate(); | 96 m_animationController->endAnimationUpdate(); |
| 91 } | 97 } |
| 92 | 98 |
| 93 AnimationController* m_animationController; | 99 AnimationController* m_animationController; |
| 94 }; | 100 }; |
| 95 | 101 |
| 96 } // namespace WebCore | 102 } // namespace WebCore |
| 97 | 103 |
| 98 #endif // AnimationController_h | 104 #endif // AnimationController_h |
| OLD | NEW |