Revert "[Tizen] Add codes for Dali Windows Backend"
[platform/core/uifw/dali-adaptor.git] / dali / internal / vector-animation / common / vector-animation-renderer-impl.cpp
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/internal/vector-animation/common/vector-animation-renderer-impl.h>
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/type-registry.h>
23
24 // INTERNAL INCLUDES
25
26 namespace Dali
27 {
28
29 namespace Internal
30 {
31
32 namespace Adaptor
33 {
34
35 namespace // unnamed namespace
36 {
37
38 // Type Registration
39 Dali::BaseHandle Create()
40 {
41   return Dali::BaseHandle();
42 }
43
44 Dali::TypeRegistration type( typeid( Dali::VectorAnimationRenderer ), typeid( Dali::BaseHandle ), Create );
45
46 } // unnamed namespace
47
48 VectorAnimationRendererPtr VectorAnimationRenderer::New()
49 {
50   VectorAnimationRendererPtr renderer = new VectorAnimationRenderer();
51   return renderer;
52 }
53
54 VectorAnimationRenderer::VectorAnimationRenderer()
55 : mPlugin( std::string() )
56 {
57 }
58
59 VectorAnimationRenderer::~VectorAnimationRenderer()
60 {
61 }
62
63 void VectorAnimationRenderer::Initialize( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height )
64 {
65   mPlugin.CreateRenderer( url, renderer, width, height );
66 }
67
68 void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
69 {
70   mPlugin.SetSize( width, height );
71 }
72
73 bool VectorAnimationRenderer::StartRender()
74 {
75   return mPlugin.StartRender();
76 }
77
78 void VectorAnimationRenderer::StopRender()
79 {
80   mPlugin.StopRender();
81 }
82
83 void VectorAnimationRenderer::Render( uint32_t frameNumber )
84 {
85   mPlugin.Render( frameNumber );
86 }
87
88 uint32_t VectorAnimationRenderer::GetTotalFrameNumber()
89 {
90   return mPlugin.GetTotalFrameNumber();
91 }
92
93 } // namespace Adaptor
94
95 } // namespace internal
96
97 } // namespace Dali