Title: [112024] trunk/Source
Revision
112024
Author
[email protected]
Date
2012-03-24 22:03:09 -0700 (Sat, 24 Mar 2012)

Log Message

[chromium] Instrument gesture animations with async traces
https://bugs.webkit.org/show_bug.cgi?id=82076

Reviewed by Adrienne Walker.

Source/WebCore:

* platform/ActivePlatformGestureAnimation.cpp:
(WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation):
(WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
* platform/PlatformGestureCurve.h:
(PlatformGestureCurve):
* platform/TouchpadFlingPlatformGestureCurve.h:
(WebCore::TouchpadFlingPlatformGestureCurve::debugName):
* platform/WheelFlingPlatformGestureCurve.h:
(WebCore::WheelFlingPlatformGestureCurve::debugName):
* platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
(WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
(WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation):
* platform/graphics/chromium/cc/CCGestureCurve.h:
(CCGestureCurve):

Source/WebKit/chromium:

* src/WebCompositorInputHandlerImpl.cpp:
(WebCore::PlatformGestureToCCGestureAdapter::debugName):
(PlatformGestureToCCGestureAdapter):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (112023 => 112024)


--- trunk/Source/WebCore/ChangeLog	2012-03-25 04:24:36 UTC (rev 112023)
+++ trunk/Source/WebCore/ChangeLog	2012-03-25 05:03:09 UTC (rev 112024)
@@ -1,3 +1,25 @@
+2012-03-24  Nat Duca  <[email protected]>
+
+        [chromium] Instrument gesture animations with async traces
+        https://bugs.webkit.org/show_bug.cgi?id=82076
+
+        Reviewed by Adrienne Walker.
+
+        * platform/ActivePlatformGestureAnimation.cpp:
+        (WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation):
+        (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
+        * platform/PlatformGestureCurve.h:
+        (PlatformGestureCurve):
+        * platform/TouchpadFlingPlatformGestureCurve.h:
+        (WebCore::TouchpadFlingPlatformGestureCurve::debugName):
+        * platform/WheelFlingPlatformGestureCurve.h:
+        (WebCore::WheelFlingPlatformGestureCurve::debugName):
+        * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
+        (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
+        (WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation):
+        * platform/graphics/chromium/cc/CCGestureCurve.h:
+        (CCGestureCurve):
+
 2012-03-24  Jeffrey Pfau  <[email protected]>
 
         XML error document creation should not fire mutation events

Modified: trunk/Source/WebCore/platform/ActivePlatformGestureAnimation.cpp (112023 => 112024)


--- trunk/Source/WebCore/platform/ActivePlatformGestureAnimation.cpp	2012-03-25 04:24:36 UTC (rev 112023)
+++ trunk/Source/WebCore/platform/ActivePlatformGestureAnimation.cpp	2012-03-25 05:03:09 UTC (rev 112024)
@@ -30,6 +30,10 @@
 #include "PlatformGestureCurve.h"
 #include "PlatformGestureCurveTarget.h"
 
+#if PLATFORM(CHROMIUM)
+#include "TraceEvent.h"
+#endif
+
 namespace WebCore {
 
 PassOwnPtr<ActivePlatformGestureAnimation> ActivePlatformGestureAnimation::create(PassOwnPtr<PlatformGestureCurve> curve, PlatformGestureCurveTarget* target)
@@ -39,6 +43,9 @@
 
 ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation()
 {
+#if PLATFORM(CHROMIUM)
+    TRACE_EVENT_FINISH0("input", "GestureAnimation", this);
+#endif
 }
 
 ActivePlatformGestureAnimation::ActivePlatformGestureAnimation(PassOwnPtr<PlatformGestureCurve> curve, PlatformGestureCurveTarget* target)
@@ -47,6 +54,9 @@
     , m_curve(curve)
     , m_target(target)
 {
+#if PLATFORM(CHROMIUM)
+    TRACE_EVENT_START1("input", "GestureAnimation", this, "curve", curve->debugName());
+#endif
 }
 
 bool ActivePlatformGestureAnimation::animate(double time)

Modified: trunk/Source/WebCore/platform/PlatformGestureCurve.h (112023 => 112024)


--- trunk/Source/WebCore/platform/PlatformGestureCurve.h	2012-03-25 04:24:36 UTC (rev 112023)
+++ trunk/Source/WebCore/platform/PlatformGestureCurve.h	2012-03-25 05:03:09 UTC (rev 112024)
@@ -37,6 +37,9 @@
 public:
     virtual ~PlatformGestureCurve() { }
 
+    // Returns a name of the curve for use in debugging.
+    virtual const char* debugName() const = 0;
+
     // Returns false if curve has finished and can no longer be applied.
     virtual bool apply(double time, PlatformGestureCurveTarget*) = 0;
 };

Modified: trunk/Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h (112023 => 112024)


--- trunk/Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h	2012-03-25 04:24:36 UTC (rev 112023)
+++ trunk/Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h	2012-03-25 05:03:09 UTC (rev 112024)
@@ -45,6 +45,7 @@
     static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity, const float unitTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bezierP2);
     virtual ~TouchpadFlingPlatformGestureCurve();
 
+    virtual const char* debugName() const { return "TouchpadFling"; }
     virtual bool apply(double monotonicTime, PlatformGestureCurveTarget*);
 
 private:

Modified: trunk/Source/WebCore/platform/WheelFlingPlatformGestureCurve.h (112023 => 112024)


--- trunk/Source/WebCore/platform/WheelFlingPlatformGestureCurve.h	2012-03-25 04:24:36 UTC (rev 112023)
+++ trunk/Source/WebCore/platform/WheelFlingPlatformGestureCurve.h	2012-03-25 05:03:09 UTC (rev 112024)
@@ -43,6 +43,7 @@
     static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity);
     virtual ~WheelFlingPlatformGestureCurve();
 
+    virtual const char* debugName() const { return "WheelFling"; }
     virtual bool apply(double time, PlatformGestureCurveTarget*);
 
 private:

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp (112023 => 112024)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp	2012-03-25 04:24:36 UTC (rev 112023)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp	2012-03-25 05:03:09 UTC (rev 112024)
@@ -26,6 +26,7 @@
 
 #include "cc/CCActiveGestureAnimation.h"
 
+#include "TraceEvent.h"
 #include "cc/CCGestureCurve.h"
 
 namespace WebCore {
@@ -41,10 +42,12 @@
     , m_gestureCurve(curve)
     , m_gestureCurveTarget(target)
 {
+    TRACE_EVENT_START1("input", "GestureAnimation", this, "curve", curve->debugName());
 }
 
 CCActiveGestureAnimation::~CCActiveGestureAnimation()
 {
+    TRACE_EVENT_FINISH0("input", "GestureAnimation", this);
 }
 
 bool CCActiveGestureAnimation::animate(double monotonicTime)

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCGestureCurve.h (112023 => 112024)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCGestureCurve.h	2012-03-25 04:24:36 UTC (rev 112023)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCGestureCurve.h	2012-03-25 05:03:09 UTC (rev 112024)
@@ -41,6 +41,8 @@
 public:
     virtual ~CCGestureCurve() { }
 
+    virtual const char* debugName() const = 0;
+
     virtual bool apply(double monotonicTime, CCGestureCurveTarget*) = 0;
 };
 

Modified: trunk/Source/WebKit/chromium/ChangeLog (112023 => 112024)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-03-25 04:24:36 UTC (rev 112023)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-03-25 05:03:09 UTC (rev 112024)
@@ -1,3 +1,14 @@
+2012-03-24  Nat Duca  <[email protected]>
+
+        [chromium] Instrument gesture animations with async traces
+        https://bugs.webkit.org/show_bug.cgi?id=82076
+
+        Reviewed by Adrienne Walker.
+
+        * src/WebCompositorInputHandlerImpl.cpp:
+        (WebCore::PlatformGestureToCCGestureAdapter::debugName):
+        (PlatformGestureToCCGestureAdapter):
+
 2012-03-23  Shawn Singh  <[email protected]>
 
         [chromium] Incorrect replica originTransform used in CCDamageTracker

Modified: trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp (112023 => 112024)


--- trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp	2012-03-25 04:24:36 UTC (rev 112023)
+++ trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp	2012-03-25 05:03:09 UTC (rev 112024)
@@ -55,6 +55,11 @@
         return adoptPtr(new PlatformGestureToCCGestureAdapter(platformCurve));
     }
 
+    virtual const char* debugName() const
+    {
+        return m_curve->debugName();
+    }
+
     virtual bool apply(double time, CCGestureCurveTarget* target)
     {
         ASSERT(target);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to