Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: third_party/WebKit/Source/platform/CompositorFactory.cpp

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "platform/CompositorFactory.h"
6
7 #include "platform/animation/WebFilterAnimationCurve.h"
8 #include "platform/animation/WebFilterOperations.h"
9 #include "platform/animation/WebFloatAnimationCurve.h"
10 #include "platform/animation/WebTransformAnimationCurve.h"
11 #include "platform/animation/WebTransformOperations.h"
12
13 namespace blink {
14
15 class CompositorFactoryImpl : public CompositorFactory {
16 public:
17 WebFilterAnimationCurve* createFilterAnimationCurve() override
18 {
19 return new WebFilterAnimationCurve();
20 }
21
22 WebFloatAnimationCurve* createFloatAnimationCurve() override
23 {
24 return new WebFloatAnimationCurve();
25 }
26
27 WebScrollOffsetAnimationCurve* createScrollOffsetAnimationCurve(
28 WebFloatPoint targetValue,
29 WebCompositorAnimationCurve::TimingFunctionType timingFunctionType,
30 WebScrollOffsetAnimationCurve::ScrollDurationBehavior durationBehavior)
31 {
32 return new WebScrollOffsetAnimationCurve(targetValue, timingFunctionType ,
33 durationBehavior);
34 }
35
36 WebTransformAnimationCurve* createTransformAnimationCurve() override
37 {
38 return new WebTransformAnimationCurve();
39 }
40
41 WebTransformOperations* createTransformOperations() override
42 {
43 return new WebTransformOperations();
44 }
45
46 WebFilterOperations* createFilterOperations() override
47 {
48 return new WebFilterOperations();
49 }
50 };
51
52 static CompositorFactory* s_factory = 0;
53
54 void CompositorFactory::initializeDefault()
55 {
56 s_factory = nullptr;
57 }
58
59 void CompositorFactory::initializeForTesting(scoped_ptr<CompositorFactory> facto ry)
60 {
61 s_factory = factory.release();
62 }
63
64 void CompositorFactory::shutdown()
65 {
66 delete s_factory;
67 s_factory = nullptr;
68 }
69
70 CompositorFactory& CompositorFactory::current()
71 {
72 ASSERT(s_factory);
73 return *s_factory;
74 }
75
76 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698