(Vector) Add a signal for texture uploading
[platform/core/uifw/dali-adaptor.git] / dali / internal / vector-animation / common / vector-animation-renderer-impl.cpp
1 /*
2  * Copyright (c) 2019 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 )
64 {
65   mPlugin.Initialize( url );
66 }
67
68 void VectorAnimationRenderer::SetRenderer( Dali::Renderer renderer )
69 {
70   mPlugin.SetRenderer( renderer );
71 }
72
73 void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
74 {
75   mPlugin.SetSize( width, height );
76 }
77
78 bool VectorAnimationRenderer::Render( uint32_t frameNumber )
79 {
80   return mPlugin.Render( frameNumber );
81 }
82
83 uint32_t VectorAnimationRenderer::GetTotalFrameNumber() const
84 {
85   return mPlugin.GetTotalFrameNumber();
86 }
87
88 float VectorAnimationRenderer::GetFrameRate() const
89 {
90   return mPlugin.GetFrameRate();
91 }
92
93 void VectorAnimationRenderer::GetDefaultSize( uint32_t& width, uint32_t& height ) const
94 {
95   mPlugin.GetDefaultSize( width, height );
96 }
97
98 Dali::VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal()
99 {
100   return mPlugin.UploadCompletedSignal();
101 }
102
103 } // namespace Adaptor
104
105 } // namespace internal
106
107 } // namespace Dali