Add VisualBase::GetType()
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit-internal / dali-toolkit-test-utils / dummy-visual.cpp
index f5c5aeb..651797e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,19 +28,17 @@ namespace Toolkit
 namespace Internal
 {
 
-typedef IntrusivePtr<VisualFactoryCache> VisualFactoryCachePtr;
-
 DummyVisualPtr DummyVisual::New( const Property::Map& properties )
 {
-  VisualFactoryCachePtr factoryCache = new VisualFactoryCache;
+  VisualFactoryCache* factoryCache = new VisualFactoryCache(false);
 
-  DummyVisualPtr dummyVisualPtr( new DummyVisual( *( factoryCache.Get() ) ) );
+  DummyVisualPtr dummyVisualPtr( new DummyVisual( *factoryCache ) );
 
   return dummyVisualPtr;
 }
 
 DummyVisual::DummyVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::Type::COLOR ),
   mActionCounter( 0 )
 {
 }
@@ -70,7 +68,7 @@ void DummyVisual::DoSetOnStage( Actor& actor )
   // Implement if required
 }
 
-void DummyVisual::OnDoAction( const Property::Index actionName, const Property::Value attributes )
+void DummyVisual::OnDoAction( const Property::Index actionName, const Property::Value& attributes )
 {
   if ( DummyVisual::TEST_ACTION == actionName )
   {