| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 | 32 |
| 33 #include "core/animation/CompositorAnimations.h" | 33 #include "core/animation/CompositorAnimations.h" |
| 34 | 34 |
| 35 #include "core/animation/AnimatableDouble.h" | 35 #include "core/animation/AnimatableDouble.h" |
| 36 #include "core/animation/AnimatableFilterOperations.h" | 36 #include "core/animation/AnimatableFilterOperations.h" |
| 37 #include "core/animation/AnimatableTransform.h" | 37 #include "core/animation/AnimatableTransform.h" |
| 38 #include "core/animation/AnimatableValueTestHelper.h" | 38 #include "core/animation/AnimatableValueTestHelper.h" |
| 39 #include "core/animation/CompositorAnimationsImpl.h" | 39 #include "core/animation/CompositorAnimationsImpl.h" |
| 40 #include "core/animation/CompositorAnimationsTestHelper.h" | 40 #include "core/animation/CompositorAnimationsTestHelper.h" |
| 41 #include "platform/animation/TimingFunctionTestHelper.h" | |
| 42 #include "platform/geometry/IntSize.h" | 41 #include "platform/geometry/IntSize.h" |
| 43 #include "platform/graphics/filters/FilterOperations.h" | 42 #include "platform/graphics/filters/FilterOperations.h" |
| 44 #include "platform/transforms/TransformOperations.h" | 43 #include "platform/transforms/TransformOperations.h" |
| 45 #include "platform/transforms/TranslateTransformOperation.h" | 44 #include "platform/transforms/TranslateTransformOperation.h" |
| 46 #include "public/platform/WebAnimation.h" | 45 #include "public/platform/WebAnimation.h" |
| 47 #include "wtf/HashFunctions.h" | 46 #include "wtf/HashFunctions.h" |
| 48 #include "wtf/OwnPtr.h" | 47 #include "wtf/OwnPtr.h" |
| 49 #include "wtf/PassOwnPtr.h" | 48 #include "wtf/PassOwnPtr.h" |
| 50 #include "wtf/PassRefPtr.h" | 49 #include "wtf/PassRefPtr.h" |
| 51 #include "wtf/RefPtr.h" | 50 #include "wtf/RefPtr.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 76 KeyframeEffectModel::KeyframeVector m_keyframeVector5; | 75 KeyframeEffectModel::KeyframeVector m_keyframeVector5; |
| 77 RefPtrWillBePersistent<KeyframeEffectModel> m_keyframeAnimationEffect5; | 76 RefPtrWillBePersistent<KeyframeEffectModel> m_keyframeAnimationEffect5; |
| 78 | 77 |
| 79 virtual void SetUp() | 78 virtual void SetUp() |
| 80 { | 79 { |
| 81 AnimationCompositorAnimationsTestBase::SetUp(); | 80 AnimationCompositorAnimationsTestBase::SetUp(); |
| 82 | 81 |
| 83 m_linearTimingFunction = LinearTimingFunction::create(); | 82 m_linearTimingFunction = LinearTimingFunction::create(); |
| 84 m_cubicEaseTimingFunction = CubicBezierTimingFunction::preset(CubicBezie
rTimingFunction::Ease); | 83 m_cubicEaseTimingFunction = CubicBezierTimingFunction::preset(CubicBezie
rTimingFunction::Ease); |
| 85 m_cubicCustomTimingFunction = CubicBezierTimingFunction::create(1, 2, 3,
4); | 84 m_cubicCustomTimingFunction = CubicBezierTimingFunction::create(1, 2, 3,
4); |
| 86 m_stepTimingFunction = StepsTimingFunction::create(1, false); | 85 m_stepTimingFunction = StepsTimingFunction::create(1, StepsTimingFunctio
n::StepAtEnd); |
| 87 | 86 |
| 88 m_timing = createCompositableTiming(); | 87 m_timing = createCompositableTiming(); |
| 89 m_compositorTiming = CompositorAnimationsImpl::CompositorTiming(); | 88 m_compositorTiming = CompositorAnimationsImpl::CompositorTiming(); |
| 90 // Make sure the CompositableTiming is really compositable, otherwise | 89 // Make sure the CompositableTiming is really compositable, otherwise |
| 91 // most other tests will fail. | 90 // most other tests will fail. |
| 92 ASSERT(convertTimingForCompositor(m_timing, m_compositorTiming)); | 91 ASSERT(convertTimingForCompositor(m_timing, m_compositorTiming)); |
| 93 | 92 |
| 94 m_keyframeVector2 = createCompositableFloatKeyframeVector(2); | 93 m_keyframeVector2 = createCompositableFloatKeyframeVector(2); |
| 95 m_keyframeAnimationEffect2 = KeyframeEffectModel::create(m_keyframeVecto
r2); | 94 m_keyframeAnimationEffect2 = KeyframeEffectModel::create(m_keyframeVecto
r2); |
| 96 | 95 |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 // Go! | 1035 // Go! |
| 1037 setCompositorForTesting(mockCompositor); | 1036 setCompositorForTesting(mockCompositor); |
| 1038 Vector<OwnPtr<blink::WebAnimation> > result; | 1037 Vector<OwnPtr<blink::WebAnimation> > result; |
| 1039 getAnimationOnCompositor(m_timing, *effect.get(), result); | 1038 getAnimationOnCompositor(m_timing, *effect.get(), result); |
| 1040 EXPECT_EQ(1U, result.size()); | 1039 EXPECT_EQ(1U, result.size()); |
| 1041 result[0].clear(); | 1040 result[0].clear(); |
| 1042 } | 1041 } |
| 1043 | 1042 |
| 1044 | 1043 |
| 1045 } // namespace WebCore | 1044 } // namespace WebCore |
| OLD | NEW |