Title: [123787] trunk/Source/WebKit/blackberry
Revision
123787
Author
[email protected]
Date
2012-07-26 13:19:39 -0700 (Thu, 26 Jul 2012)

Log Message

[BlackBerry] Add timing logs to SelectionHandler.
https://bugs.webkit.org/show_bug.cgi?id=92404

Reviewed by Rob Buis.

Add selection timing logs.

Reviewed Internally by Nima Ghanavatian.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::setSelection):
(BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
* WebKitSupport/SelectionHandler.h:
(SelectionHandler):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (123786 => 123787)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-07-26 20:15:53 UTC (rev 123786)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-07-26 20:19:39 UTC (rev 123787)
@@ -1,5 +1,22 @@
 2012-07-26  Mike Fenton  <[email protected]>
 
+        [BlackBerry] Add timing logs to SelectionHandler.
+        https://bugs.webkit.org/show_bug.cgi?id=92404
+
+        Reviewed by Rob Buis.
+
+        Add selection timing logs.
+
+        Reviewed Internally by Nima Ghanavatian.
+
+        * WebKitSupport/SelectionHandler.cpp:
+        (BlackBerry::WebKit::SelectionHandler::setSelection):
+        (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
+        * WebKitSupport/SelectionHandler.h:
+        (SelectionHandler):
+
+2012-07-26  Mike Fenton  <[email protected]>
+
         [BlackBerry] InputHandler failure logs should be logAlways and critical.
         https://bugs.webkit.org/show_bug.cgi?id=92403
 

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp (123786 => 123787)


--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp	2012-07-26 20:15:53 UTC (rev 123786)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp	2012-07-26 20:19:39 UTC (rev 123787)
@@ -45,6 +45,7 @@
 // Note: This generates a lot of logs when dumping rects lists. It will seriously
 // impact performance. Do not enable this during performance tests.
 #define SHOWDEBUG_SELECTIONHANDLER 0
+#define SHOWDEBUG_SELECTIONHANDLER_TIMING 0
 
 using namespace BlackBerry::Platform;
 using namespace WebCore;
@@ -55,6 +56,12 @@
 #define DEBUG_SELECTION(severity, format, ...)
 #endif // SHOWDEBUG_SELECTIONHANDLER
 
+#if SHOWDEBUG_SELECTIONHANDLER_TIMING
+#define DEBUG_SELECTION_TIMING(severity, format, ...) logAlways(severity, format, ## __VA_ARGS__)
+#else
+#define DEBUG_SELECTION_TIMING(severity, format, ...)
+#endif // SHOWDEBUG_SELECTIONHANDLER_TIMING
+
 namespace BlackBerry {
 namespace WebKit {
 
@@ -448,6 +455,10 @@
     Frame* focusedFrame = m_webPage->focusedOrMainFrame();
     FrameSelection* controller = focusedFrame->selection();
 
+#if SHOWDEBUG_SELECTIONHANDLER_TIMING
+    m_timer.start();
+#endif
+
     DEBUG_SELECTION(LogLevelInfo, "SelectionHandler::setSelection adjusted points %d, %d, %d, %d", start.x(), start.y(), end.x(), end.y());
 
     // Note that IntPoint(-1, -1) is being our sentinel so far for
@@ -858,6 +869,8 @@
     else if (!m_selectionActive)
         return;
 
+    DEBUG_SELECTION_TIMING(LogLevelInfo, "SelectionHandler::selectionPositionChanged starting at %f", m_timer.elapsed());
+
     WebCore::IntRect startCaret;
     WebCore::IntRect endCaret;
 
@@ -929,6 +942,7 @@
         m_webPage->m_selectionOverlay->draw(visibleSelectionRegion);
 
     m_webPage->m_client->notifySelectionDetailsChanged(startCaret, endCaret, visibleSelectionRegion, inputNodeOverridesTouch());
+    DEBUG_SELECTION_TIMING(LogLevelInfo, "SelectionHandler::selectionPositionChanged completed at %f", m_timer.elapsed());
 }
 
 // NOTE: This function is not in WebKit coordinates.

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h (123786 => 123787)


--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h	2012-07-26 20:15:53 UTC (rev 123786)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h	2012-07-26 20:19:39 UTC (rev 123787)
@@ -21,6 +21,7 @@
 
 #include "BlackBerryPlatformIntRectRegion.h"
 #include "BlackBerryPlatformPrimitives.h"
+#include "BlackBerryPlatformStopWatch.h"
 #include "TextGranularity.h"
 
 #include <wtf/Vector.h>
@@ -89,6 +90,8 @@
     bool m_caretActive;
     bool m_lastUpdatedEndPointIsValid;
     BlackBerry::Platform::IntRectRegion m_lastSelectionRegion;
+
+    BlackBerry::Platform::StopWatch m_timer;
 };
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to