[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

girish at forwardbias.in girish at forwardbias.in
Wed Apr 7 23:46:19 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 618e10a2a80945cda8983315139951ff48fbe80e
Author: girish at forwardbias.in <girish at forwardbias.in@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 18 12:53:22 2009 +0000

    [Qt] Mac Plugins: Remove null timer
    
    Reviewed by Tor Arne Vestbø.
    
    A null timer was used to send mouse move events. Instead, we now use
    move events to send nullEvent. This brings down CPU usage by 20-30%.
    
    https://bugs.webkit.org/show_bug.cgi?id=31624
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51105 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 58440e9..c7268ce 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-18  Girish Ramakrishnan  <girish at forwardbias.in>
+
+        Reviewed by Tor Arne VestbÃ.,
+
+        [Qt] Mac Plugins: Remove null timer
+        
+        A null timer was used to send mouse move events. Instead, we now use
+        move events to send nullEvent. This brings down CPU usage by 20-30%.
+        
+        https://bugs.webkit.org/show_bug.cgi?id=31624
+
+        * plugins/PluginView.h:
+        * plugins/mac/PluginViewMac.cpp:
+        (WebCore::PluginView::platformStart):
+        (WebCore::PluginView::handleMouseEvent):
+
 2009-11-18  Benjamin Poulain  <benjamin.poulain at nokia.com>
 
         Reviewed by Simon Hausmann.
diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h
index 0a57fa6..1115773 100644
--- a/WebCore/plugins/PluginView.h
+++ b/WebCore/plugins/PluginView.h
@@ -324,12 +324,10 @@ private:
         void setNPWindowIfNeeded();
 #elif defined(XP_MACOSX)
         NP_CGContext m_npCgContext;
-        OwnPtr<Timer<PluginView> > m_nullEventTimer;
         NPDrawingModel m_drawingModel;
         NPEventModel m_eventModel;
 
         void setNPWindowIfNeeded();
-        void nullEventTimerFired(Timer<PluginView>*);
         Point globalMousePosForPlugin() const;
 #endif
 
diff --git a/WebCore/plugins/mac/PluginViewMac.cpp b/WebCore/plugins/mac/PluginViewMac.cpp
index 6521c84..d4bffcd 100644
--- a/WebCore/plugins/mac/PluginViewMac.cpp
+++ b/WebCore/plugins/mac/PluginViewMac.cpp
@@ -182,10 +182,6 @@ bool PluginView::platformStart()
 
     show();
 
-    // TODO: Implement null timer throttling depending on plugin activation
-    m_nullEventTimer.set(new Timer<PluginView>(this, &PluginView::nullEventTimerFired));
-    m_nullEventTimer->startRepeating(0.02);
-
     return true;
 }
 
@@ -484,8 +480,7 @@ void PluginView::handleMouseEvent(MouseEvent* event)
     EventRecord record;
 
     if (event->type() == eventNames().mousemoveEvent) {
-        // Mouse movement is handled by null timer events
-        return;
+        record.what = nullEvent;
     } else if (event->type() == eventNames().mouseoverEvent) {
         record.what = adjustCursorEvent;
     } else if (event->type() == eventNames().mouseoutEvent) {
@@ -592,22 +587,6 @@ void PluginView::handleKeyboardEvent(KeyboardEvent* event)
         event->setDefaultHandled();
 }
 
-void PluginView::nullEventTimerFired(Timer<PluginView>*)
-{
-    EventRecord record;
-
-    record.what = nullEvent;
-    record.message = 0;
-    record.when = TickCount();
-    record.where = globalMousePosForPlugin();
-    record.modifiers = GetCurrentKeyModifiers();
-    if (!Button())
-        record.modifiers |= btnState;
-
-    if (!dispatchNPEvent(record))
-        LOG(Events, "PluginView::nullEventTimerFired(): Null event not accepted");
-}
-
 static int modifiersForEvent(UIEventWithKeyState* event)
 {
     int modifiers = 0;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list