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

Side by Side Diff: Source/core/frame/animation/AnimationController.h

Issue 33483002: Have Frame::animation() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/CompositedLayerMapping.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) 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
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
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698