Diff
Modified: trunk/Source/WebCore/ChangeLog (125905 => 125906)
--- trunk/Source/WebCore/ChangeLog 2012-08-17 15:37:18 UTC (rev 125905)
+++ trunk/Source/WebCore/ChangeLog 2012-08-17 15:38:39 UTC (rev 125906)
@@ -1,3 +1,24 @@
+2012-08-17 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r125892.
+ http://trac.webkit.org/changeset/125892
+ https://bugs.webkit.org/show_bug.cgi?id=94350
+
+ Broke windows build (Requested by vollick on #webkit).
+
+ * platform/graphics/chromium/cc/CCActiveAnimation.cpp:
+ (WebCore::CCActiveAnimation::CCActiveAnimation):
+ (WebCore::CCActiveAnimation::~CCActiveAnimation):
+ (WebCore::CCActiveAnimation::setRunState):
+ (WebCore::CCActiveAnimation::cloneForImplThread):
+ * platform/graphics/chromium/cc/CCActiveAnimation.h:
+ (CCActiveAnimation):
+ * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
+ (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
+ (WebCore):
+ (WebCore::CCLayerAnimationController::replaceImplThreadAnimations):
+ (WebCore::CCLayerAnimationController::tickAnimations):
+
2012-08-17 Zach Kuznia <[email protected]>
Add support for Skia Magnifier filter to Chromium layers
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCActiveAnimation.cpp (125905 => 125906)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCActiveAnimation.cpp 2012-08-17 15:37:18 UTC (rev 125905)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCActiveAnimation.cpp 2012-08-17 15:38:39 UTC (rev 125906)
@@ -26,39 +26,10 @@
#include "cc/CCActiveAnimation.h"
-#include "TraceEvent.h"
#include "cc/CCAnimationCurve.h"
-#include <wtf/Assertions.h>
-#include <wtf/StdLibExtras.h>
#include <cmath>
-namespace {
-
-// This should match the RunState enum.
-static const char* const s_runStateNames[] = {
- "WaitingForNextTick",
- "WaitingForTargetAvailability",
- "WaitingForStartTime",
- "WaitingForDeletion",
- "Running",
- "Paused",
- "Finished",
- "Aborted"
-};
-
-COMPILE_ASSERT(static_cast<int>(WebCore::CCActiveAnimation::RunStateEnumSize) == WTF_ARRAY_LENGTH(s_runStateNames), RunState_names_match_enum);
-
-// This should match the TargetProperty enum.
-static const char* const s_targetPropertyNames[] = {
- "Transform",
- "Opacity"
-};
-
-COMPILE_ASSERT(static_cast<int>(WebCore::CCActiveAnimation::TargetPropertyEnumSize) == WTF_ARRAY_LENGTH(s_targetPropertyNames), TargetProperty_names_match_enum);
-
-} // namespace
-
namespace WebCore {
PassOwnPtr<CCActiveAnimation> CCActiveAnimation::create(PassOwnPtr<CCAnimationCurve> curve, int animationId, int groupId, TargetProperty targetProperty)
@@ -80,14 +51,11 @@
, m_suspended(false)
, m_pauseTime(0)
, m_totalPausedTime(0)
- , m_isControllingInstance(false)
{
}
CCActiveAnimation::~CCActiveAnimation()
{
- if (m_runState == Running || m_runState == Paused)
- setRunState(Aborted, 0);
}
void CCActiveAnimation::setRunState(RunState runState, double monotonicTime)
@@ -95,35 +63,11 @@
if (m_suspended)
return;
- char nameBuffer[256];
- snprintf(nameBuffer, sizeof(nameBuffer), "%s-%d%s", s_targetPropertyNames[m_targetProperty], m_group, m_isControllingInstance ? "(impl)" : "");
-
- bool isWaitingToStart = m_runState == WaitingForNextTick
- || m_runState == WaitingForTargetAvailability
- || m_runState == WaitingForStartTime;
-
- if (isWaitingToStart && runState == Running)
- TRACE_EVENT_ASYNC_BEGIN1("cc", "CCActiveAnimation", this, "Name", TRACE_STR_COPY(nameBuffer));
-
- bool wasFinished = isFinished();
-
- const char* oldRunStateName = s_runStateNames[m_runState];
-
if (runState == Running && m_runState == Paused)
m_totalPausedTime += monotonicTime - m_pauseTime;
else if (runState == Paused)
m_pauseTime = monotonicTime;
m_runState = runState;
-
- const char* newRunStateName = s_runStateNames[runState];
-
- if (!wasFinished && isFinished())
- TRACE_EVENT_ASYNC_END0("cc", "CCActiveAnimation", this);
-
- char stateBuffer[256];
- snprintf(stateBuffer, sizeof(stateBuffer), "%s->%s", oldRunStateName, newRunStateName);
-
- TRACE_EVENT_INSTANT2("cc", "CCLayerAnimationController::setRunState", "Name", TRACE_STR_COPY(nameBuffer), "State", TRACE_STR_COPY(stateBuffer));
}
void CCActiveAnimation::suspend(double monotonicTime)
@@ -195,22 +139,16 @@
return trimmed;
}
-PassOwnPtr<CCActiveAnimation> CCActiveAnimation::clone(InstanceType instanceType) const
+PassOwnPtr<CCActiveAnimation> CCActiveAnimation::cloneForImplThread() const
{
- return cloneAndInitialize(instanceType, m_runState, m_startTime);
-}
-
-PassOwnPtr<CCActiveAnimation> CCActiveAnimation::cloneAndInitialize(InstanceType instanceType, RunState initialRunState, double startTime) const
-{
OwnPtr<CCActiveAnimation> toReturn(adoptPtr(new CCActiveAnimation(m_curve->clone(), m_id, m_group, m_targetProperty)));
- toReturn->m_runState = initialRunState;
+ toReturn->m_runState = m_runState;
toReturn->m_iterations = m_iterations;
- toReturn->m_startTime = startTime;
+ toReturn->m_startTime = m_startTime;
toReturn->m_pauseTime = m_pauseTime;
toReturn->m_totalPausedTime = m_totalPausedTime;
toReturn->m_timeOffset = m_timeOffset;
toReturn->m_alternatesDirection = m_alternatesDirection;
- toReturn->m_isControllingInstance = instanceType == ControllingInstance;
return toReturn.release();
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCActiveAnimation.h (125905 => 125906)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCActiveAnimation.h 2012-08-17 15:37:18 UTC (rev 125905)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCActiveAnimation.h 2012-08-17 15:38:39 UTC (rev 125906)
@@ -56,16 +56,12 @@
Running,
Paused,
Finished,
- Aborted,
- // This sentinel must be last.
- RunStateEnumSize
+ Aborted
};
enum TargetProperty {
Transform = 0,
- Opacity,
- // This sentinel must be last.
- TargetPropertyEnumSize
+ Opacity
};
static PassOwnPtr<CCActiveAnimation> create(PassOwnPtr<CCAnimationCurve>, int animationId, int groupId, TargetProperty);
@@ -116,15 +112,8 @@
// of iterations, returns the relative time in the current iteration.
double trimTimeToCurrentIteration(double monotonicTime) const;
- enum InstanceType {
- ControllingInstance = 0,
- NonControllingInstance
- };
+ PassOwnPtr<CCActiveAnimation> cloneForImplThread() const;
- PassOwnPtr<CCActiveAnimation> clone(InstanceType) const;
- PassOwnPtr<CCActiveAnimation> cloneAndInitialize(InstanceType, RunState initialRunState, double startTime) const;
- bool isControllingInstance() const { return m_isControllingInstance; }
-
void pushPropertiesTo(CCActiveAnimation*) const;
private:
@@ -165,15 +154,6 @@
// about these values.
double m_pauseTime;
double m_totalPausedTime;
-
- // Animations lead dual lives. An active animation will be conceptually owned by
- // two controllers, one on the impl thread and one on the main. In reality, there
- // will be two separate CCActiveAnimation instances for the same animation. They
- // will have the same group id and the same target property (these two values
- // uniquely identify an animation). The instance on the impl thread is the instance
- // that ultimately controls the values of the animating layer and so we will refer
- // to it as the 'controlling instance'.
- bool m_isControllingInstance;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerAnimationController.cpp (125905 => 125906)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerAnimationController.cpp 2012-08-17 15:37:18 UTC (rev 125905)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerAnimationController.cpp 2012-08-17 15:38:39 UTC (rev 125906)
@@ -200,11 +200,11 @@
if (!m_activeAnimations[i]->needsSynchronizedStartTime())
continue;
- // The new animation should be set to run as soon as possible.
- CCActiveAnimation::RunState initialRunState = CCActiveAnimation::WaitingForTargetAvailability;
- double startTime = 0;
- OwnPtr<CCActiveAnimation> toAdd(m_activeAnimations[i]->cloneAndInitialize(CCActiveAnimation::ControllingInstance, initialRunState, startTime));
+ OwnPtr<CCActiveAnimation> toAdd(m_activeAnimations[i]->cloneForImplThread());
ASSERT(!toAdd->needsSynchronizedStartTime());
+ // The new animation should be set to run as soon as possible.
+ toAdd->setRunState(CCActiveAnimation::WaitingForTargetAvailability, 0);
+ toAdd->setStartTime(0);
controllerImpl->addAnimation(toAdd.release());
}
}
@@ -324,6 +324,7 @@
}
}
+
void CCLayerAnimationController::markAnimationsForDeletion(double monotonicTime, CCAnimationEventsVector* events)
{
for (size_t i = 0; i < m_activeAnimations.size(); i++) {
@@ -368,16 +369,13 @@
{
controllerImpl->m_activeAnimations.clear();
for (size_t i = 0; i < m_activeAnimations.size(); ++i) {
- OwnPtr<CCActiveAnimation> toAdd;
+ OwnPtr<CCActiveAnimation> toAdd(m_activeAnimations[i]->cloneForImplThread());
if (m_activeAnimations[i]->needsSynchronizedStartTime()) {
// We haven't received an animation started notification yet, so it
// is important that we add it in a 'waiting' and not 'running' state.
- CCActiveAnimation::RunState initialRunState = CCActiveAnimation::WaitingForTargetAvailability;
- double startTime = 0;
- toAdd = m_activeAnimations[i]->cloneAndInitialize(CCActiveAnimation::ControllingInstance, initialRunState, startTime);
- } else
- toAdd = m_activeAnimations[i]->clone(CCActiveAnimation::ControllingInstance);
-
+ toAdd->setRunState(CCActiveAnimation::WaitingForTargetAvailability, 0);
+ toAdd->setStartTime(0);
+ }
controllerImpl->addAnimation(toAdd.release());
}
}
@@ -415,10 +413,6 @@
break;
}
- // Do nothing for sentinel value.
- case CCActiveAnimation::TargetPropertyEnumSize:
- ASSERT_NOT_REACHED();
-
}
}
}
Modified: trunk/Source/WebKit/chromium/ChangeLog (125905 => 125906)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-08-17 15:37:18 UTC (rev 125905)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-17 15:38:39 UTC (rev 125906)
@@ -1,3 +1,14 @@
+2012-08-17 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r125892.
+ http://trac.webkit.org/changeset/125892
+ https://bugs.webkit.org/show_bug.cgi?id=94350
+
+ Broke windows build (Requested by vollick on #webkit).
+
+ * src/WebAnimationImpl.cpp:
+ (WebKit::WebAnimationImpl::cloneToCCAnimation):
+
2012-08-17 Peter Beverloo <[email protected]>
Unreviewed. Rolled DEPS.
Modified: trunk/Source/WebKit/chromium/src/WebAnimationImpl.cpp (125905 => 125906)
--- trunk/Source/WebKit/chromium/src/WebAnimationImpl.cpp 2012-08-17 15:37:18 UTC (rev 125905)
+++ trunk/Source/WebKit/chromium/src/WebAnimationImpl.cpp 2012-08-17 15:38:39 UTC (rev 125906)
@@ -96,7 +96,7 @@
PassOwnPtr<WebCore::CCActiveAnimation> WebAnimationImpl::cloneToCCAnimation()
{
- OwnPtr<WebCore::CCActiveAnimation> toReturn(m_animation->clone(WebCore::CCActiveAnimation::NonControllingInstance));
+ OwnPtr<WebCore::CCActiveAnimation> toReturn(m_animation->cloneForImplThread());
toReturn->setNeedsSynchronizedStartTime(true);
return toReturn.release();
}