Changeset 112287 in webkit
- Timestamp:
- Mar 27, 2012 11:39:59 AM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/WebPageCompositor.cpp
r112026 r112287 44 44 : m_client(client) 45 45 , m_webPage(page) 46 , m_animationTimer(this, &WebPageCompositorPrivate::animationTimerFired)47 , m_timerClient(new Platform::GenericTimerClient(Platform::userInterfaceThreadTimerClient()))48 46 , m_pendingAnimationFrame(0.0) 49 47 { 50 m_animationTimer.setClient(m_timerClient);48 setOneShot(true); // one-shot animation client 51 49 } 52 50 53 51 WebPageCompositorPrivate::~WebPageCompositorPrivate() 54 52 { 55 m_animationTimer.stop(); 56 delete m_timerClient; 53 Platform::AnimationFrameRateController::instance()->removeClient(this); 57 54 } 58 55 … … 131 128 m_pendingAnimationFrame = m_client->requestAnimationFrame(); 132 129 else { 133 m_animationTimer.start(1.0 / 60.0);130 Platform::AnimationFrameRateController::instance()->addClient(this); 134 131 m_webPage->updateDelegatedOverlays(); 135 132 } … … 144 141 } 145 142 146 void WebPageCompositorPrivate::animation TimerFired()143 void WebPageCompositorPrivate::animationFrameChanged() 147 144 { 148 145 BackingStore* backingStore = m_webPage->m_backingStore; -
trunk/Source/WebKit/blackberry/Api/WebPageCompositor_p.h
r111959 r112287 25 25 #include "LayerRenderer.h" 26 26 27 #include <BlackBerryPlatformAnimation.h> 27 28 #include <BlackBerryPlatformGLES2Context.h> 28 #include <BlackBerryPlatformTimer.h>29 29 #include <wtf/OwnPtr.h> 30 30 #include <wtf/RefCounted.h> … … 42 42 43 43 // This class may only be used on the compositing thread. So it does not need to be threadsaferefcounted. 44 class WebPageCompositorPrivate : public RefCounted<WebPageCompositorPrivate> {44 class WebPageCompositorPrivate : public RefCounted<WebPageCompositorPrivate>, public Platform::AnimationFrameRateClient { 45 45 public: 46 46 static PassRefPtr<WebPageCompositorPrivate> create(WebPagePrivate* page, WebPageCompositorClient* client) … … 87 87 88 88 private: 89 void animation TimerFired();89 void animationFrameChanged(); 90 90 91 91 WebPageCompositorClient* m_client; … … 97 97 WebCore::IntSize m_contentsSizeForCompositing; 98 98 WebCore::LayerRenderingResults m_lastCompositingResults; 99 BlackBerry::Platform::Timer<WebPageCompositorPrivate> m_animationTimer;100 BlackBerry::Platform::TimerClient* m_timerClient;101 99 double m_pendingAnimationFrame; 102 100 }; -
trunk/Source/WebKit/blackberry/ChangeLog
r112252 r112287 1 2012-03-27 Andrew Lo <anlo@rim.com> 2 3 [BlackBerry] Switch WebPageCompositor to use AnimationFrameRateController instead of timer 4 https://bugs.webkit.org/show_bug.cgi?id=82350 5 6 Switch timer in WebPageCompositor to use AnimationFrameRateController. 7 8 Reviewed by Rob Buis. 9 10 * Api/WebPageCompositor.cpp: 11 (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate): 12 (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate): 13 (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers): 14 (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged): 15 * Api/WebPageCompositor_p.h: 16 (WebPageCompositorPrivate): 17 1 18 2012-03-27 Chris Guan <chris.guan@torchmobile.com.cn> 2 19
Note: See TracChangeset
for help on using the changeset viewer.