Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/anidata.cpp
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | 62 | { | |||
---|---|---|---|---|---|
65 | // Add synthetic repaint to prevent glitches after cross-fading | 65 | // Add synthetic repaint to prevent glitches after cross-fading | ||
66 | // translucent windows. | 66 | // translucent windows. | ||
67 | effects->addRepaint(m_window->expandedGeometry()); | 67 | effects->addRepaint(m_window->expandedGeometry()); | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | AniData::AniData() | 70 | AniData::AniData() | ||
71 | : attribute(AnimationEffect::Opacity) | 71 | : attribute(AnimationEffect::Opacity) | ||
72 | , customCurve(0) // Linear | 72 | , customCurve(0) // Linear | ||
73 | , time(0) | | |||
74 | , duration(0) | | |||
75 | , meta(0) | 73 | , meta(0) | ||
76 | , startTime(0) | 74 | , startTime(0) | ||
77 | , waitAtSource(false) | 75 | , waitAtSource(false) | ||
78 | , keepAtTarget(false) | 76 | , keepAtTarget(false) | ||
79 | , keepAlive(true) | 77 | , keepAlive(true) | ||
80 | { | 78 | { | ||
81 | } | 79 | } | ||
82 | 80 | | |||
83 | AniData::AniData(AnimationEffect::Attribute a, int meta_, int ms, const FPx2 &to_, | 81 | AniData::AniData(AnimationEffect::Attribute a, int meta_, const FPx2 &to_, | ||
84 | QEasingCurve curve_, int delay, const FPx2 &from_, bool waitAtSource_, bool keepAtTarget_, | 82 | int delay, const FPx2 &from_, bool waitAtSource_, bool keepAtTarget_, | ||
85 | FullScreenEffectLockPtr fullScreenEffectLock_, bool keepAlive, | 83 | FullScreenEffectLockPtr fullScreenEffectLock_, bool keepAlive, | ||
86 | PreviousWindowPixmapLockPtr previousWindowPixmapLock_) | 84 | PreviousWindowPixmapLockPtr previousWindowPixmapLock_) | ||
87 | : attribute(a) | 85 | : attribute(a) | ||
88 | , curve(curve_) | | |||
89 | , from(from_) | 86 | , from(from_) | ||
90 | , to(to_) | 87 | , to(to_) | ||
91 | , time(0) | | |||
92 | , duration(ms) | | |||
93 | , meta(meta_) | 88 | , meta(meta_) | ||
94 | , startTime(AnimationEffect::clock() + delay) | 89 | , startTime(AnimationEffect::clock() + delay) | ||
95 | , fullScreenEffectLock(fullScreenEffectLock_) | 90 | , fullScreenEffectLock(fullScreenEffectLock_) | ||
96 | , waitAtSource(waitAtSource_) | 91 | , waitAtSource(waitAtSource_) | ||
97 | , keepAtTarget(keepAtTarget_) | 92 | , keepAtTarget(keepAtTarget_) | ||
98 | , keepAlive(keepAlive) | 93 | , keepAlive(keepAlive) | ||
99 | , previousWindowPixmapLock(previousWindowPixmapLock_) | 94 | , previousWindowPixmapLock(previousWindowPixmapLock_) | ||
100 | { | 95 | { | ||
Show All 16 Lines | |||||
117 | } | 112 | } | ||
118 | 113 | | |||
119 | QString AniData::debugInfo() const | 114 | QString AniData::debugInfo() const | ||
120 | { | 115 | { | ||
121 | return QLatin1String("Animation: ") + attributeString(attribute) + | 116 | return QLatin1String("Animation: ") + attributeString(attribute) + | ||
122 | QLatin1String("\n From: ") + from.toString() + | 117 | QLatin1String("\n From: ") + from.toString() + | ||
123 | QLatin1String("\n To: ") + to.toString() + | 118 | QLatin1String("\n To: ") + to.toString() + | ||
124 | QLatin1String("\n Started: ") + QString::number(AnimationEffect::clock() - startTime) + QLatin1String("ms ago\n") + | 119 | QLatin1String("\n Started: ") + QString::number(AnimationEffect::clock() - startTime) + QLatin1String("ms ago\n") + | ||
125 | QLatin1String( " Duration: ") + QString::number(duration) + QLatin1String("ms\n") + | 120 | QLatin1String( " Duration: ") + QString::number(timeLine.duration().count()) + QLatin1String("ms\n") + | ||
126 | QLatin1String( " Passed: ") + QString::number(time) + QLatin1String("ms\n"); | 121 | QLatin1String( " Passed: ") + QString::number(timeLine.elapsed().count()) + QLatin1String("ms\n"); | ||
127 | } | 122 | } |