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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: style Created 4 years 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 void SVGImageChromeClient::setTimer(std::unique_ptr<TimerBase> timer) { 106 void SVGImageChromeClient::setTimer(std::unique_ptr<TimerBase> timer) {
107 m_animationTimer = std::move(timer); 107 m_animationTimer = std::move(timer);
108 } 108 }
109 109
110 void SVGImageChromeClient::animationTimerFired(TimerBase*) { 110 void SVGImageChromeClient::animationTimerFired(TimerBase*) {
111 if (!m_image) 111 if (!m_image)
112 return; 112 return;
113 113
114 // The SVGImageChromeClient object's lifetime is dependent on 114 // The SVGImageChromeClient object's lifetime is dependent on
115 // the ImageObserver (an ImageResource) of its image. Should it 115 // the ImageObserver (an ImageResourceContent) of its image. Should it
116 // be dead and about to be lazily swept out, do not proceed. 116 // be dead and about to be lazily swept out, do not proceed.
117 // 117 //
118 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid 118 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid
119 // this explicit lifetime check. 119 // this explicit lifetime check.
120 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver())) 120 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver()))
121 return; 121 return;
122 122
123 m_image->serviceAnimations(monotonicallyIncreasingTime()); 123 m_image->serviceAnimations(monotonicallyIncreasingTime());
124 } 124 }
125 125
126 } // namespace blink 126 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698