Merge "DALi Version 1.1.42" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 8 Jul 2016 16:52:43 +0000 (09:52 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 8 Jul 2016 16:52:43 +0000 (09:52 -0700)
23 files changed:
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp
automated-tests/src/dali-toolkit/utc-Dali-Builder.cpp
automated-tests/src/dali-toolkit/utc-Dali-CubeTransitionEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-JsonParser.cpp
dali-toolkit/devel-api/builder/json-parser.cpp
dali-toolkit/devel-api/builder/tree-node.cpp
dali-toolkit/devel-api/builder/tree-node.h
dali-toolkit/devel-api/transition-effects/cube-transition-effect.cpp
dali-toolkit/devel-api/transition-effects/cube-transition-effect.h
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp
dali-toolkit/internal/text/multi-language-support-impl.cpp
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.h
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.cpp
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h
dali-toolkit/internal/text/rendering/atlas/atlas-manager-impl.cpp
dali-toolkit/internal/text/rendering/atlas/atlas-manager-impl.h
dali-toolkit/internal/text/rendering/atlas/atlas-manager.cpp
dali-toolkit/internal/text/rendering/atlas/atlas-manager.h
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/transition-effects/cube-transition-effect-impl.cpp
dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h

index 63c89d3..33a8744 100644 (file)
@@ -152,7 +152,7 @@ public:
   void GetFontMetrics( FontId fontId, FontMetrics& metrics ){}
   GlyphIndex GetGlyphIndex( FontId fontId, Character charcode ){return 0;}
   bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal ){return true;}
-  BufferImage CreateBitmap( FontId fontId, GlyphIndex glyphIndex ){return BufferImage();}
+  PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex ){return PixelData();}
   void CreateVectorBlob( FontId fontId, GlyphIndex glyphIndex, VectorBlob*& blob,
                          unsigned int& blobLength, unsigned int& nominalWidth, unsigned int& nominalHeight )
   {
@@ -462,7 +462,7 @@ bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType typ
   return GetImplementation(*this).GetGlyphMetrics( array, size, horizontal );
 }
 
-BufferImage FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
+PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
 {
   return GetImplementation(*this).CreateBitmap( fontId, glyphIndex );
 }
index ebfd376..32946a0 100644 (file)
@@ -78,12 +78,15 @@ int UtcDaliBuilderQuitSignal(void)
       "{"
          "\"stage\":"
          "[{"
-           "\"type\": \"Actor\","
+           "\"type\": \"Layer\","
            "\"size\": [100,100,1],"
            "\"parentOrigin\": \"TOP_LEFT\","
            "\"anchorPoint\": \"TOP_LEFT\","
+           "\"maximumSize\": [100,100],"
+           "\"orientation\": [10,10,10,10],"
+           "\"clippingBox\": [10,10,10,10],"
            "\"signals\": [{"
-             "\"name\": \"touched\","
+             "\"name\": \"touch\","
              "\"action\": \"quit\""
            "}]"
          "}]"
@@ -243,7 +246,7 @@ int UtcDaliBuilderAnimationP(void)
         "    \"size\": [200, 200, 1],"
         "    \"orientation\": [0, 0, 30],"
         "    \"signals\": [{"
-        "      \"name\": \"touched\","
+        "      \"name\": \"touch\","
         "      \"action\": \"play\","
         "      \"animation\": \"animate\""
         "    }]"
@@ -367,7 +370,7 @@ int UtcDaliBuilderAnimationN(void)
         "    \"size\": [200, 200, 1],"
         "    \"orientation\": [0, 0, 30],"
         "    \"signals\": [{"
-        "      \"name\": \"touched\","
+        "      \"name\": \"touch\","
         "      \"action\": \"play\","
         "      \"animation\": \"animate\""
         "    }]"
@@ -440,7 +443,7 @@ int UtcDaliBuilderConstantsP(void)
       "  \"image\": { \"url\": \"dir/{IMAGE_PATH}\" },"
       "  \"sizeWidth\": \"{WIDTH}\","
       "  \"signals\": [{"
-      "    \"name\": \"touched\","
+      "    \"name\": \"touch\","
       "    \"action\": \"quit\""
       "  }]"
       "}]"
@@ -493,26 +496,41 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
       "    \"color\": [1,0,0,1],\n"
       "    \"actors\": {\n"
       "      \"childImage\": {\n"
-      "        \"color\": [0,1,0,1]\n"
+      "        \"color\": \"34\"\n"
       "      }\n"
       "    }\n"
       "  }\n"
       "},\n"
       "\"templates\":\n"
       "{\n"
+      "  \"imageViewTemplate\": { \n"
+      "    \"type\": \"ImageView\",\n"
+      "    \"styles\": [\"imageStyle\"]\n"
+      "  },\n"
       "  \"imageTree\": { \n"
       "    \"type\": \"ImageView\",\n"
       "    \"styles\": [\"imageStyle\"],\n"
       "    \"name\": \"image\",\n"
       "    \"size\": \"{SIZE}\",\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"quit\"\n"
       "    }],\n"
       "    \"actors\": [\n"
       "      {\n"
       "        \"type\":\"ImageView\",\n"
-      "        \"name\":\"childImage\" \n"
+      "        \"name\":\"childImage\", \n"
+      "        \"color\": \n"
+      "          {\n"
+      "            \"r\": 10,\n"
+      "            \"g\": 10,\n"
+      "            \"b\": 10,\n"
+      "            \"a\": 100\n"
+      "          }\n"
+      "      },\n"
+      "      {\n"
+      "        \"type\":\"imageViewTemplate\",\n"
+      "        \"name\":\"childImage2\"\n"
       "      }\n"
       "    ]\n"
       "  }\n"
@@ -530,7 +548,7 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
     " \"color\": [1,0,0,1],\n"
     " \"actors\": {\n"
     "   \"childImage\": {\n"
-    "     \"color\": [0,1,0,1]\n"
+    "     \"color\": \"#344353\"\n"
     "   }\n"
     " }\n"
     "}\n"
@@ -543,7 +561,7 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
     "  \"name\": \"image\",\n"
     "  \"size\": \"{SIZE}\",\n"
     "  \"signals\": [{\n"
-    "    \"name\": \"touched\",\n"
+    "    \"name\": \"touch\",\n"
     "    \"action\": \"quit\"\n"
     "  }],\n"
     "  \"actors\": [\n"
@@ -598,14 +616,14 @@ int UtcDaliBuilderRenderTasksP(void)
       "[\n"
       "  { \n"
       "    \"type\": \"CameraActor\",\n"
-      "    \"name\": \"image\"\n"
+      "    \"name\": \"camera\"\n"
       "  }, \n"
       "  { \n"
       "    \"type\": \"ImageView\",\n"
       "    \"name\": \"image\",\n"
       "    \"size\": [100,100,1],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"quit\"\n"
       "    }],\n"
       "    \"actors\": [\n"
@@ -652,7 +670,7 @@ int UtcDaliBuilderChildActionP(void)
       "      \"name\": \"subActor\"\n"
       "    }],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"hide\",\n"
       "      \"actor\": \"actor\",\n"
       "      \"childActor\": \"subActor\"\n"
@@ -708,7 +726,7 @@ int UtcDaliBuilderSetPropertyActionP(void)
       "      \"name\": \"subActor\"\n"
       "    }],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"set\",\n"
       "      \"actor\": \"subActor\",\n"
       "      \"property\": \"visible\",\n"
@@ -765,7 +783,7 @@ int UtcDaliBuilderGenericActionP(void)
       "      \"name\": \"subActor\"\n"
       "    }],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"hide\"\n"
       "    }]\n"
       "  }]\n"
@@ -819,7 +837,7 @@ int UtcDaliBuilderPropertyNotificationP(void)
       "      \"name\": \"subActor\"\n"
       "    }],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"hide\"\n"
       "    }],\n"
       "    \"notifications\": [{\n"
@@ -877,7 +895,7 @@ int UtcDaliBuilderCustomPropertyP(void)
       "    \"name\": \"image\",\n"
       "    \"size\": [100,100,1],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"quit\"\n"
       "    }],\n"
       "    \"properties\": {\n"
@@ -1010,7 +1028,7 @@ int UtcDaliBuilderLoadFromStringN(void)
            "\"parentOrigin\": \"TOP_LEFT\","
            "\"anchorPoint\": \"TOP_LEFT\","
            "\"signals\": [{"
-             "\"name\": \"touched\","
+             "\"name\": \"touch\","
              "\"action\": \"quit\""
            "}]"
          "}]"
@@ -1057,7 +1075,7 @@ int UtcDaliBuilderAddActorsP(void)
       "      \"visible\": false\n"
       "    }],\n"
       "    \"signals\": [{\n"
-      "      \"name\": \"touched\",\n"
+      "      \"name\": \"touch\",\n"
       "      \"action\": \"hide\",\n"
       "      \"actor\": \"actor\",\n"
       "      \"childActor\": \"subActor\"\n"
index e759409..5efd46d 100644 (file)
@@ -23,6 +23,7 @@
 #include <dali-toolkit/devel-api/transition-effects/cube-transition-cross-effect.h>
 #include <dali-toolkit/devel-api/transition-effects/cube-transition-fold-effect.h>
 #include <dali-toolkit/devel-api/transition-effects/cube-transition-wave-effect.h>
+#include <dali/devel-api/adaptor-framework/bitmap-loader.h>
 #include <dali/public-api/images/buffer-image.h>
 
 
@@ -77,14 +78,14 @@ void Wait(ToolkitTestApplication& application, float durationToPass)
 class TransitionCompletedCallback : public Dali::ConnectionTracker
 {
 public:
-  TransitionCompletedCallback( bool& signalReceived, CubeTransitionEffect& effect, Image& image )
+  TransitionCompletedCallback( bool& signalReceived, CubeTransitionEffect& effect, Texture& image )
   : mSignalVerified( signalReceived ),
     mCurrentEffect( effect ),
     mActorTransitTo( image )
   {
   }
 
-  void Callback( CubeTransitionEffect effect, Image image )
+  void Callback( CubeTransitionEffect effect, Texture image )
   {
     tet_infoline( "Verifying TransitionCompletedSignal" );
 
@@ -101,7 +102,7 @@ public:
 
   bool&                  mSignalVerified;
   CubeTransitionEffect&  mCurrentEffect;
-  Image&                 mActorTransitTo;
+  Texture&               mActorTransitTo;
 };
 
 } // namespace
@@ -257,13 +258,13 @@ int UtcDaliCubeTransitionEffectGetRoot(void)
 
   unsigned int totalNum = NUM_ROWS*NUM_COLUMNS;
 
-  Image image = BufferImage::New( 40, 40 ) ;
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
 
   CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
   waveEffect.SetSize( VIEW_AREA_SIZE );
   Stage::GetCurrent().Add( waveEffect );
-  waveEffect.SetCurrentImage( image );
-  waveEffect.SetTargetImage( image );
+  waveEffect.SetCurrentTexture( texture );
+  waveEffect.SetTargetTexture( texture );
 
   application.SendNotification();
   application.Render();
@@ -289,7 +290,7 @@ int UtcDaliCubeTransitionEffectIsTransitioning(void)
   tet_infoline(" UtcDaliCubeTransitionEffectIsTransiting ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image image = BufferImage::New( 40, 40 ) ;
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
 
   CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
   waveEffect.SetSize( VIEW_AREA_SIZE );
@@ -299,8 +300,8 @@ int UtcDaliCubeTransitionEffectIsTransitioning(void)
   waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
   DALI_TEST_CHECK( !waveEffect.IsTransitioning() );
 
-  waveEffect.SetCurrentImage( image );
-  waveEffect.SetTargetImage( image );
+  waveEffect.SetCurrentTexture( texture );
+  waveEffect.SetTargetTexture( texture );
   //transition is started
   waveEffect.StartTransition();
   DALI_TEST_CHECK( waveEffect.IsTransitioning() );
@@ -316,8 +317,8 @@ int UtcDaliCubeTransitionEffectIsTransitioning(void)
   crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
   DALI_TEST_CHECK( !crossEffect.IsTransitioning() );
 
-  crossEffect.SetCurrentImage( image );
-  crossEffect.SetTargetImage( image );
+  crossEffect.SetCurrentTexture( texture );
+  crossEffect.SetTargetTexture( texture );
   //transition is started
   crossEffect.StartTransition(false);
   DALI_TEST_CHECK( crossEffect.IsTransitioning() );
@@ -332,8 +333,8 @@ int UtcDaliCubeTransitionEffectIsTransitioning(void)
   foldEffect.SetTransitionDuration( TRANSITION_DURATION );
   DALI_TEST_CHECK( !foldEffect.IsTransitioning() );
 
-  foldEffect.SetCurrentImage( image );
-  foldEffect.SetTargetImage( image );
+  foldEffect.SetCurrentTexture( texture );
+  foldEffect.SetTargetTexture( texture );
   //transition is started
   foldEffect.StartTransition(true);
   DALI_TEST_CHECK(foldEffect.IsTransitioning() );
@@ -345,17 +346,17 @@ int UtcDaliCubeTransitionEffectIsTransitioning(void)
 }
 
 //Test common codes in base class
-int UtcDaliCubeTransitionEffectSetCurrentImage(void)
+int UtcDaliCubeTransitionEffectSetCurrentTexture(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliCubeTransitionEffectSetCurrentImage ");
+  tet_infoline(" UtcDaliCubeTransitionEffectSetCurrentTexture ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image image = BufferImage::New( 40, 40 ) ;
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
 
   CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
   waveEffect.SetSize( VIEW_AREA_SIZE );
-  waveEffect.SetCurrentImage( image );
+  waveEffect.SetCurrentTexture( texture );
 
   Stage::GetCurrent().Add( waveEffect );
 
@@ -384,20 +385,19 @@ int UtcDaliCubeTransitionEffectSetCurrentImage(void)
 }
 
 //Test common codes in base class
-int UtcDaliCubeTransitionEffectSetTargetImage(void)
+int UtcDaliCubeTransitionEffectSetTargetTexture(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliCubeTransitionEffectSetTargetImage ");
+  tet_infoline(" UtcDaliCubeTransitionEffectSetTargetTexture ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image image = BufferImage::New( 30, 30 );
-
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
   CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
   waveEffect.SetSize( VIEW_AREA_SIZE );
   Stage::GetCurrent().Add( waveEffect );
 
-  waveEffect.SetCurrentImage( image );
-  waveEffect.SetTargetImage( image );
+  waveEffect.SetCurrentTexture( texture );
+  waveEffect.SetTargetTexture( texture );
 
   Stage::GetCurrent().Add( waveEffect );
 
@@ -430,13 +430,18 @@ int UtcDaliCubeTransitionWaveEffectStartTransition(void)
   tet_infoline(" UtcDaliCubeTransitionWaveEffectStartTransition ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image image = ResourceImage::New( "Image.jpg" );
+
+  BitmapLoader loader = BitmapLoader::New( "Image.jpg" );
+  loader.Load();
+  PixelData pixelData = loader.GetPixelData();
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() );
+  texture.Upload( pixelData );
 
   CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
   waveEffect.SetSize( VIEW_AREA_SIZE );
   waveEffect.SetTransitionDuration( TRANSITION_DURATION );
   waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
-  waveEffect.SetCurrentImage( image );
+  waveEffect.SetCurrentTexture( texture );
 
   Stage::GetCurrent().Add( waveEffect );
 
@@ -448,27 +453,27 @@ int UtcDaliCubeTransitionWaveEffectStartTransition(void)
   Actor cube = waveEffect.GetChildAt(0).GetChildAt(0);
 
   //check the cube rotation value and color values just before the end of different transitions
-  waveEffect.SetTargetImage( image );
+  waveEffect.SetTargetTexture( texture );
   Wait( application, TRANSITION_BEFORE_END_DURATION );
   DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90,  Vector3::YAXIS), EPISILON, TEST_LOCATION  );
   DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
 
-  waveEffect.SetTargetImage( image );
+  waveEffect.SetTargetTexture( texture );
   waveEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
   Wait( application, TRANSITION_BEFORE_END_DURATION );
   DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90,  Vector3::YAXIS), EPISILON, TEST_LOCATION  );
   DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
 
-  waveEffect.SetTargetImage( image );
+  waveEffect.SetTargetTexture( texture );
   waveEffect.StartTransition(false);
   Wait( application, TRANSITION_BEFORE_END_DURATION );
   DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90,  Vector3::YAXIS), EPISILON, TEST_LOCATION  );
   DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
 
-  waveEffect.SetTargetImage( image );
+  waveEffect.SetTargetTexture( texture );
   waveEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
   Wait( application, TRANSITION_BEFORE_END_DURATION );
   DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90,  Vector3::YAXIS), EPISILON, TEST_LOCATION  );
@@ -483,14 +488,19 @@ int UtcDaliCubeTransitionCrossEffectStartTransition(void)
   tet_infoline(" UtcDaliCubeTransitionCrossEffectStartTransition ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image image = ResourceImage::New( "Image.jpg" );
+
+  BitmapLoader loader = BitmapLoader::New( "Image.jpg" );
+  loader.Load();
+  PixelData pixelData = loader.GetPixelData();
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() );
+  texture.Upload( pixelData );
 
   CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
   crossEffect.SetSize( VIEW_AREA_SIZE );
   crossEffect.SetTransitionDuration( TRANSITION_DURATION );
   crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
-  crossEffect.SetCurrentImage( image );
-  crossEffect.SetTargetImage( image );
+  crossEffect.SetCurrentTexture( texture );
+  crossEffect.SetTargetTexture( texture );
 
   Stage::GetCurrent().Add( crossEffect );
 
@@ -510,7 +520,7 @@ int UtcDaliCubeTransitionCrossEffectStartTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
 
 
-  crossEffect.SetTargetImage( image );
+  crossEffect.SetTargetTexture( texture );
   crossEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
   Wait( application, TRANSITION_BEFORE_END_DURATION );
   DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90,  Vector3::YAXIS), EPISILON, TEST_LOCATION );
@@ -519,7 +529,7 @@ int UtcDaliCubeTransitionCrossEffectStartTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
 
 
-  crossEffect.SetTargetImage( image );
+  crossEffect.SetTargetTexture( texture );
   crossEffect.StartTransition(false);
   Wait( application, TRANSITION_BEFORE_END_DURATION );
   DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90,  Vector3::YAXIS), EPISILON, TEST_LOCATION  );
@@ -527,7 +537,7 @@ int UtcDaliCubeTransitionCrossEffectStartTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
 
-  crossEffect.SetTargetImage( image );
+  crossEffect.SetTargetTexture( texture );
   crossEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
   Wait( application, TRANSITION_BEFORE_END_DURATION );
   DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90,  Vector3::YAXIS), EPISILON, TEST_LOCATION );
@@ -543,13 +553,12 @@ int UtcDaliCubeTransitionFoldEffectStartTransition(void)
   tet_infoline(" UtcDaliCubeTransitionFoldEffectStartTransition ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image image = BufferImage::New( 30, 30 );
-
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
   CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
   foldEffect.SetSize( VIEW_AREA_SIZE );
   foldEffect.SetTransitionDuration( TRANSITION_DURATION );
-  foldEffect.SetCurrentImage( image );
-  foldEffect.SetTargetImage( image );
+  foldEffect.SetCurrentTexture( texture );
+  foldEffect.SetTargetTexture( texture );
 
   Stage::GetCurrent().Add( foldEffect );
 
@@ -568,7 +577,7 @@ int UtcDaliCubeTransitionFoldEffectStartTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
 
-  foldEffect.SetTargetImage( image );
+  foldEffect.SetTargetTexture( texture );
   foldEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
   Wait( application, TRANSITION_BEFORE_END_DURATION );
   DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90,  Vector3::YAXIS), EPISILON, TEST_LOCATION  );
@@ -577,7 +586,7 @@ int UtcDaliCubeTransitionFoldEffectStartTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
 
 
-  foldEffect.SetTargetImage( image );
+  foldEffect.SetTargetTexture( texture );
   foldEffect.StartTransition(false);
   Wait( application, TRANSITION_BEFORE_END_DURATION );
   DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90,  Vector3::YAXIS), EPISILON, TEST_LOCATION  );
@@ -585,7 +594,7 @@ int UtcDaliCubeTransitionFoldEffectStartTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(),FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
 
-  foldEffect.SetTargetImage( image );
+  foldEffect.SetTargetTexture( texture );
   foldEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
   Wait( application, TRANSITION_BEFORE_END_DURATION );
   DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90,  Vector3::YAXIS), EPISILON, TEST_LOCATION  );
@@ -601,9 +610,9 @@ int UtcDaliCubeTransitionEffectSignalTransitionCompleted(void)
   tet_infoline(" UtcDaliCubeTransitionEffectSignalTransitionCompleted ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image firstImage = BufferImage::New( 30, 30 );
-  Image secondImage = BufferImage::New( 20, 20 );
-  Image thirdImage = BufferImage::New( 40, 40 );
+  Texture firstTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 30, 30 );
+  Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 );
+  Texture thirdTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
 
   CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
   waveEffect.SetSize( VIEW_AREA_SIZE );
@@ -624,61 +633,61 @@ int UtcDaliCubeTransitionEffectSignalTransitionCompleted(void)
 
   bool signalVerified = false;
   CubeTransitionEffect currentEffect;
-  Image actorTransitTo;
+  Texture actorTransitTo;
   TransitionCompletedCallback callback(signalVerified, currentEffect, actorTransitTo);
   waveEffect.TransitionCompletedSignal().Connect( &callback, &TransitionCompletedCallback::Callback );
   crossEffect.TransitionCompletedSignal().Connect( &callback, &TransitionCompletedCallback::Callback );
   foldEffect.TransitionCompletedSignal().Connect( &callback, &TransitionCompletedCallback::Callback );
 
-  //check that the wave effect is used to transit to secondImage
+  //check that the wave effect is used to transit to secondTexture
   currentEffect = waveEffect;
-  actorTransitTo = secondImage;
-  waveEffect.SetCurrentImage( firstImage );
-  waveEffect.SetTargetImage( secondImage );
+  actorTransitTo = secondTexture;
+  waveEffect.SetCurrentTexture( firstTexture );
+  waveEffect.SetTargetTexture( secondTexture );
   waveEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
   Wait( application, TRANSITION_DURATION );
   DALI_TEST_CHECK(callback.mSignalVerified);
   callback.Reset();
 
-  //check that the wave effect is used to transit to thirdImage
-  actorTransitTo = thirdImage;
-  waveEffect.SetTargetImage( thirdImage );
+  //check that the wave effect is used to transit to thirdTexture
+  actorTransitTo = thirdTexture;
+  waveEffect.SetTargetTexture( thirdTexture );
   waveEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
   Wait( application, TRANSITION_DURATION );
   DALI_TEST_CHECK(callback.mSignalVerified);
   callback.Reset();
 
-  //check that the cross effect is used to transit to secondImage
+  //check that the cross effect is used to transit to secondTexture
   currentEffect = crossEffect;
-  actorTransitTo = secondImage;
-  crossEffect.SetCurrentImage( thirdImage );
-  crossEffect.SetTargetImage( secondImage );
+  actorTransitTo = secondTexture;
+  crossEffect.SetCurrentTexture( thirdTexture );
+  crossEffect.SetTargetTexture( secondTexture );
   crossEffect.StartTransition(true);
   Wait( application, TRANSITION_DURATION );
   DALI_TEST_CHECK(callback.mSignalVerified);
   callback.Reset();
 
-  //check that the cross effect is used to transit to firstImage
-  actorTransitTo = firstImage;
-  crossEffect.SetTargetImage( firstImage );
+  //check that the cross effect is used to transit to firstTexture
+  actorTransitTo = firstTexture;
+  crossEffect.SetTargetTexture( firstTexture );
   crossEffect.StartTransition(false);
   Wait( application, TRANSITION_DURATION );
   DALI_TEST_CHECK(callback.mSignalVerified);
   callback.Reset();
 
-  //check that the fold effect is used to transit to secondImage
+  //check that the fold effect is used to transit to secondTexture
   currentEffect = foldEffect;
-  actorTransitTo = secondImage;
-  foldEffect.SetCurrentImage( firstImage );
-  foldEffect.SetTargetImage( secondImage );
+  actorTransitTo = secondTexture;
+  foldEffect.SetCurrentTexture( firstTexture );
+  foldEffect.SetTargetTexture( secondTexture );
   foldEffect.StartTransition();
   Wait( application, TRANSITION_DURATION );
   DALI_TEST_CHECK( callback.mSignalVerified );
   callback.Reset();
 
-  //check that the fold effect is used to transit to thirdImage
-  actorTransitTo = thirdImage;
-  foldEffect.SetTargetImage( thirdImage );
+  //check that the fold effect is used to transit to thirdTexture
+  actorTransitTo = thirdTexture;
+  foldEffect.SetTargetTexture( thirdTexture );
   foldEffect.StartTransition( false );
   Wait( application, TRANSITION_DURATION );
   DALI_TEST_CHECK( callback.mSignalVerified );
@@ -691,8 +700,8 @@ int UtcDaliCubeTransitionEffectPauseResumeTransition(void)
   tet_infoline(" UtcDaliCubeTransitionEffectPauseResumeTransition ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image firstImage = BufferImage::New( 30, 30 );
-  Image secondImage = BufferImage::New( 20, 20 );
+  Texture firstTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 30, 30 );
+  Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 );
 
   CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
   waveEffect.SetSize( VIEW_AREA_SIZE );
@@ -713,16 +722,16 @@ int UtcDaliCubeTransitionEffectPauseResumeTransition(void)
 
   bool signalVerified = false;
   CubeTransitionEffect currentEffect;
-  Image actorTransitTo;
+  Texture actorTransitTo;
   TransitionCompletedCallback callback(signalVerified, currentEffect, actorTransitTo);
   waveEffect.TransitionCompletedSignal().Connect( &callback, &TransitionCompletedCallback::Callback );
   crossEffect.TransitionCompletedSignal().Connect( &callback, &TransitionCompletedCallback::Callback );
   foldEffect.TransitionCompletedSignal().Connect( &callback, &TransitionCompletedCallback::Callback );
 
   currentEffect = waveEffect;
-  actorTransitTo = secondImage;
-  waveEffect.SetCurrentImage( firstImage );
-  waveEffect.SetTargetImage( secondImage );
+  actorTransitTo = secondTexture;
+  waveEffect.SetCurrentTexture( firstTexture );
+  waveEffect.SetTargetTexture( secondTexture );
   // start transition; transit for 0.5*duration; pause for 0.5*duration;
   // resume for 0.25*duration; pause for 0.25*duration; resume for another 0.25*duration;
   // only until now the transition finished signal can be received
@@ -744,9 +753,9 @@ int UtcDaliCubeTransitionEffectPauseResumeTransition(void)
   callback.Reset();
 
   currentEffect = crossEffect;
-  actorTransitTo = firstImage;
-  crossEffect.SetCurrentImage( secondImage );
-  crossEffect.SetTargetImage( firstImage );
+  actorTransitTo = firstTexture;
+  crossEffect.SetCurrentTexture( secondTexture );
+  crossEffect.SetTargetTexture( firstTexture );
   // start transition; transit for 0.25*duration; pause for 0.2*duration;
   // resume for 0.5*duration; pause for 0.2*duration; resume for another 0.25*duration;
   // only until now the transition finished signal can be received
@@ -768,9 +777,9 @@ int UtcDaliCubeTransitionEffectPauseResumeTransition(void)
   callback.Reset();
 
   currentEffect = foldEffect;
-  actorTransitTo = secondImage;
-  foldEffect.SetCurrentImage( firstImage );
-  foldEffect.SetTargetImage( secondImage );
+  actorTransitTo = secondTexture;
+  foldEffect.SetCurrentTexture( firstTexture );
+  foldEffect.SetTargetTexture( secondTexture );
   // start transition; transit for 0.5*duration; pause for 0.5*duration;
   // resume for 0.25*duration; pause for 0.25*duration; resume for another 0.25*duration;
   // only until now the transition finished signal can be received
@@ -798,15 +807,15 @@ int UtcDaliCubeTransitionWaveEffectStopTransition(void)
   tet_infoline(" UtcDaliCubeTransitionWaveEffectStopTransition ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image firstImage = BufferImage::New( 30, 30 );
-  Image secondImage = BufferImage::New( 20, 20 );
+  Texture firstTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 30, 30 );
+  Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 );
 
   CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
   waveEffect.SetSize( VIEW_AREA_SIZE );
   waveEffect.SetTransitionDuration( TRANSITION_DURATION );
   waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
-  waveEffect.SetCurrentImage( firstImage );
-  waveEffect.SetTargetImage( secondImage );
+  waveEffect.SetCurrentTexture( firstTexture );
+  waveEffect.SetTargetTexture( secondTexture );
 
   Stage::GetCurrent().Add( waveEffect );
 
@@ -826,7 +835,7 @@ int UtcDaliCubeTransitionWaveEffectStopTransition(void)
   DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
 
-  waveEffect.SetTargetImage( firstImage );
+  waveEffect.SetTargetTexture( firstTexture );
   waveEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
   Wait( application, TRANSITION_DURATION*0.4f );
   waveEffect.StopTransition();
@@ -836,7 +845,7 @@ int UtcDaliCubeTransitionWaveEffectStopTransition(void)
   DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
 
-  waveEffect.SetTargetImage( secondImage );
+  waveEffect.SetTargetTexture( secondTexture );
   waveEffect.StartTransition(false);
   Wait( application, TRANSITION_DURATION*0.6f );
   waveEffect.StopTransition();
@@ -846,7 +855,7 @@ int UtcDaliCubeTransitionWaveEffectStopTransition(void)
   DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
 
-  waveEffect.SetTargetImage( firstImage );
+  waveEffect.SetTargetTexture( firstTexture );
   waveEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
   Wait( application, TRANSITION_DURATION*0.8f );
   waveEffect.StopTransition();
@@ -864,15 +873,15 @@ int UtcDaliCubeTransitionCrossEffectStopTransition(void)
   tet_infoline(" UtcDaliCubeTransitionCrossEffectStopTransition ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image firstImage = BufferImage::New( 30, 30 );
-  Image secondImage = BufferImage::New( 20, 20 );
+  Texture firstTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 30, 30 );
+  Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 );
 
   CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
   crossEffect.SetSize( VIEW_AREA_SIZE );
   crossEffect.SetTransitionDuration( TRANSITION_DURATION );
   crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
-  crossEffect.SetCurrentImage( firstImage );
-  crossEffect.SetTargetImage( secondImage );
+  crossEffect.SetCurrentTexture( firstTexture );
+  crossEffect.SetTargetTexture( secondTexture );
 
   Stage::GetCurrent().Add( crossEffect );
 
@@ -894,7 +903,7 @@ int UtcDaliCubeTransitionCrossEffectStopTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
 
-  crossEffect.SetTargetImage( firstImage );
+  crossEffect.SetTargetTexture( firstTexture );
   crossEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
   Wait( application, TRANSITION_DURATION*0.4f );
   crossEffect.StopTransition();
@@ -905,7 +914,7 @@ int UtcDaliCubeTransitionCrossEffectStopTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
 
-  crossEffect.SetTargetImage( secondImage );
+  crossEffect.SetTargetTexture( secondTexture );
   crossEffect.StartTransition(false);
   Wait( application, TRANSITION_DURATION*0.6f );
   crossEffect.StopTransition();
@@ -916,7 +925,7 @@ int UtcDaliCubeTransitionCrossEffectStopTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
 
-  crossEffect.SetTargetImage( firstImage );
+  crossEffect.SetTargetTexture( firstTexture );
   crossEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
   Wait( application, TRANSITION_DURATION*0.8f );
   crossEffect.StopTransition();
@@ -935,14 +944,14 @@ int UtcDaliCubeTransitionFoldEffectStopTransition(void)
   tet_infoline(" UtcDaliCubeTransitionFoldEffectStopTransition ");
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-  Image firstImage = BufferImage::New( 30, 30 );
-  Image secondImage = BufferImage::New( 20, 20 );
+  Texture firstTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 30, 30 );
+  Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 );
 
   CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
   foldEffect.SetSize( VIEW_AREA_SIZE );
   foldEffect.SetTransitionDuration( TRANSITION_DURATION );
-  foldEffect.SetCurrentImage( firstImage );
-  foldEffect.SetTargetImage( secondImage );
+  foldEffect.SetCurrentTexture( firstTexture );
+  foldEffect.SetTargetTexture( secondTexture );
 
   Stage::GetCurrent().Add( foldEffect );
 
@@ -965,7 +974,7 @@ int UtcDaliCubeTransitionFoldEffectStopTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
 
-  foldEffect.SetTargetImage( firstImage );
+  foldEffect.SetTargetTexture( firstTexture );
   foldEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
   Wait( application, TRANSITION_DURATION*0.4f );
   foldEffect.StopTransition();
@@ -976,7 +985,7 @@ int UtcDaliCubeTransitionFoldEffectStopTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
 
-  foldEffect.SetTargetImage( secondImage );
+  foldEffect.SetTargetTexture( secondTexture );
   foldEffect.StartTransition(false);
   Wait( application, TRANSITION_DURATION*0.6f );
   foldEffect.StopTransition();
@@ -987,7 +996,7 @@ int UtcDaliCubeTransitionFoldEffectStopTransition(void)
   DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
   DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
 
-  foldEffect.SetTargetImage( firstImage );
+  foldEffect.SetTargetTexture( firstTexture );
   foldEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
   Wait( application, TRANSITION_DURATION*0.8f );
   foldEffect.StopTransition();
index 1fafb16..258add1 100644 (file)
@@ -216,6 +216,13 @@ int UtcDaliJsonParserMethod01(void)
   DALI_TEST_CHECK( std::string((*iterObject).first) == std::string("key" ));
   DALI_TEST_CHECK( std::string(((*iterObject).second).GetString()) == std::string("value"));
 
+  ++iter;
+  DALI_TEST_CHECK(!( iter != root->CEnd() ));
+
+  ++iter; // Go past the end
+
+  iter++; // Use the other operator using the post increment operator
+
   tet_result(TET_PASS);
   END_TEST;
 }
@@ -623,6 +630,7 @@ int UtcDaliJsonParserMethod08(void)
   DALI_TEST_CHECK(1  == parser.GetErrorLineNumber());
   DALI_TEST_CHECK(53 == parser.GetErrorPosition());
   DALI_TEST_CHECK(11 == parser.GetErrorColumn());
+  DALI_TEST_CHECK("Missing Value" == parser.GetErrorDescription());
 
   tet_result(TET_PASS);
   END_TEST;
@@ -756,3 +764,62 @@ int UtcDaliJsonParserMerge1(void)
 
   END_TEST;
 }
+
+int UtcDaliJsonParserDownCast(void)
+{
+  BaseHandle handle = JsonParser::New();
+  JsonParser parser = JsonParser::DownCast( handle );
+  DALI_TEST_CHECK( parser );
+  END_TEST;
+}
+
+int UtcDaliJsonParserTreeNodeCount(void)
+{
+  std::string s1( ReplaceQuotes("                                       \
+{                                                                       \
+  'styles':                                                             \
+  {                                                                     \
+    'button':                                                           \
+    {                                                                   \
+      'backgroundColor':[0.8, 0.0, 1.0, 1.0],                           \
+      'foregroundColor':[1, 1, 1, 1]                                    \
+    }                                                                   \
+  }                                                                     \
+}                                                                       \
+"));
+
+  JsonParser parser = JsonParser::New();
+  parser.Parse( s1 );
+
+  const TreeNode* treeNode = parser.GetRoot();
+  DALI_TEST_EQUALS(1, treeNode->Count("styles"), TEST_LOCATION );
+  DALI_TEST_EQUALS(0, treeNode->Count("random"), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliJsonParserTreeNodeFind(void)
+{
+  std::string s1( ReplaceQuotes("\
+{                                         \
+  'string':'value2',                      \
+  'integer':2,                            \
+  'float':2.3,                            \
+  'boolean':true,                         \
+  'nil':null,                             \
+  'array':[1,2,3],                        \
+  'object':{'key':'value'}                \
+}                                         \
+"));
+
+  JsonParser parser = JsonParser::New();
+  parser.Parse( s1 );
+
+  const TreeNode* treeNode = parser.GetRoot();
+  const TreeNode* childNode = treeNode->Find("string");
+  DALI_TEST_CHECK( childNode );
+  const TreeNode* sameNode = childNode->Find("string");
+  DALI_TEST_EQUALS( sameNode, childNode, TEST_LOCATION );
+
+  END_TEST;
+}
index 5e8c0ae..6bcb108 100644 (file)
@@ -54,7 +54,7 @@ JsonParser::~JsonParser()
 {
 }
 
-JsonParser DownCast( BaseHandle handle )
+JsonParser JsonParser::DownCast( BaseHandle handle )
 {
   return JsonParser( dynamic_cast<Internal::JsonParser*>(handle.GetObjectPtr()) );
 }
index 8515280..302c7a2 100644 (file)
@@ -182,11 +182,6 @@ TreeNode::KeyNodePair TreeNode::ConstIterator::operator *()
   return KeyNodePair(mNode->mName, *mNode);
 }
 
-TreeNode::KeyNodePair TreeNode::ConstIterator::operator ->()
-{
-  return KeyNodePair(mNode->mName, *mNode);
-}
-
 bool TreeNode::ConstIterator::operator!=( const TreeNode::ConstIterator& rhs ) const
 {
   return mNode != rhs.mNode;
index 6da465a..3e47aea 100644 (file)
@@ -105,11 +105,6 @@ public:
      * pointer semantics
      */
     KeyNodePair operator*();
-
-    /*
-     * pointer semantics
-     */
-    KeyNodePair operator->();
   private:
     TreeNode* mNode;
   };
index de78244..6cd9de4 100644 (file)
@@ -76,14 +76,14 @@ bool CubeTransitionEffect::IsTransitioning()
   return GetImpl(*this).IsTransitioning();
 }
 
-void CubeTransitionEffect::SetCurrentImage( Image image )
+void CubeTransitionEffect::SetCurrentTexture( Texture texture )
 {
-  GetImpl(*this).SetCurrentImage( image );
+  GetImpl(*this).SetCurrentTexture( texture );
 }
 
-void CubeTransitionEffect::SetTargetImage( Image image )
+void CubeTransitionEffect::SetTargetTexture( Texture texture )
 {
-  GetImpl(*this).SetTargetImage( image );
+  GetImpl(*this).SetTargetTexture( texture );
 }
 
 void CubeTransitionEffect::StartTransition( bool toNextImage )
index 05546a9..198d352 100644 (file)
@@ -21,6 +21,9 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 
+// EXTERNAL INCLUDES
+#include <dali/devel-api/rendering/texture.h>
+
 namespace Dali
 {
 
@@ -135,17 +138,17 @@ public:
   bool IsTransitioning();
 
   /**
-   * Set the current image to transition from
+   * Set the current texture to transition from
    * if using this same effect continually, only need to set once
-   * @param[in] image The current image
+   * @param[in] texture The current texture
    */
-  void SetCurrentImage(Image image);
+  void SetCurrentTexture( Texture texture );
 
   /**
-   * Set the target image to transit to
-   * @param[in] image The new Image showing on stage
+   * Set the target texture to transit to
+   * @param[in] texture The new Texture showing on stage
    */
-  void SetTargetImage(Image image);
+  void SetTargetTexture( Texture texture );
 
   /**
    * Activate the transition animation with horizontally left/right panGesture
@@ -184,13 +187,13 @@ public:
 public: //Signal
 
   //Transition animation completed signal
-  typedef Signal< void ( CubeTransitionEffect, Image ) > TransitionCompletedSignalType;
+  typedef Signal< void ( CubeTransitionEffect, Texture ) >  TransitionCompletedSignalType;
 
   /**
    * Signal emitted when the transition has completed animation
    * A callback of the following type may be connected
    * @code
-   *   void YourCallbackName( CubeTransitionEffect cubeEffect, Image currentImage );
+   *   void YourCallbackName( CubeTransitionEffect cubeEffect, Texture currentTexture );
    * @endcode
    * @return The Signal to connect to.
    */
index 30e84a9..dc00a3c 100644 (file)
@@ -722,32 +722,6 @@ std::string Button::GetSelectedImageFilename() const
   return std::string();
 }
 
-std::string Button::GetBackgroundImageFilename() const
-{
-  if( mBackgroundContent )
-  {
-    ResourceImage image = ResourceImage::DownCast( mBackgroundContent );
-    if( image )
-    {
-      return image.GetUrl();
-    }
-  }
-  return std::string();
-}
-
-std::string Button::GetSelectedBackgroundImageFilename() const
-{
-  if( mSelectedBackgroundContent )
-  {
-    ResourceImage image = ResourceImage::DownCast( mSelectedBackgroundContent );
-    if( image )
-    {
-      return image.GetUrl();
-    }
-  }
-  return std::string();
-}
-
 std::string Button::GetDisabledImageFilename() const
 {
   if( mDisabledContent )
@@ -761,32 +735,6 @@ std::string Button::GetDisabledImageFilename() const
   return std::string();
 }
 
-std::string Button::GetDisabledSelectedImageFilename() const
-{
-  if( mDisabledSelectedContent )
-  {
-    ResourceImage image = ResourceImage::DownCast( mDisabledSelectedContent );
-    if( image )
-    {
-      return image.GetUrl();
-    }
-  }
-  return std::string();
-}
-
-std::string Button::GetDisabledBackgroundImageFilename() const
-{
-  if( mDisabledBackgroundContent )
-  {
-    ResourceImage image = ResourceImage::DownCast( mDisabledBackgroundContent );
-    if( image )
-    {
-      return image.GetUrl();
-    }
-  }
-  return std::string();
-}
-
 bool Button::DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes )
 {
   bool ret = false;
index fc75b7a..56f1efb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -27,6 +27,7 @@
 #include <dali-toolkit/public-api/controls/model3d-view/model3d-view.h>
 #include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/adaptor-framework/file-loader.h>
+#include <dali/devel-api/adaptor-framework/bitmap-loader.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/model3d-view/obj-loader.h>
@@ -43,6 +44,35 @@ namespace Internal
 namespace
 {
 
+// Texture indices are constants.
+enum TextureIndex
+{
+  DIFFUSE_TEXTURE_INDEX,
+  NORMAL_TEXTURE_INDEX,
+  GLOSS_TEXTURE_INDEX
+};
+
+/**
+ * @brief Loads a texture from a file.
+ * @param[in] imageUrl The URL of the file
+ * @return A texture if loading succeeds, an empty handle otherwise
+ */
+Texture LoadTexture( const char* imageUrl )
+{
+  Texture texture;
+  Dali::BitmapLoader loader = Dali::BitmapLoader::New( imageUrl );
+  loader.Load();
+  PixelData pixelData = loader.GetPixelData();
+  if( pixelData )
+  {
+    texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() );
+    texture.Upload( pixelData );
+    texture.GenerateMipmaps();
+  }
+
+  return texture;
+}
+
 // Type registration
 BaseHandle Create()
 {
@@ -265,10 +295,6 @@ void LookAt(Matrix& result, const Vector3& eye, const Vector3& target, const Vec
 Model3dView::Model3dView()
   : Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) )
 {
-  mTexture0Url = "";
-  mTexture1Url = "";
-  mTexture2Url = "";
-
   mIlluminationType = Toolkit::Model3dView::DIFFUSE_WITH_NORMAL_MAP;
 
   mCameraFOV = Math::PI_OVER_180 * 45.f;
@@ -588,41 +614,54 @@ void Model3dView::CreateMaterial()
 void Model3dView::LoadTextures()
 {
   if( !mTextureSet )
-    return ;
-
-  if( (mTexture0Url != "") && (mIlluminationType != Toolkit::Model3dView::DIFFUSE) )
   {
-    std::string imgUrl = mImagesUrl + mTexture0Url;
-
-    //Load textures
-    Image tex0 = ResourceImage::New( imgUrl );
-    if( tex0 )
-    {
-      mTextureSet.SetImage( 0u, tex0 );
-    }
+    return;
   }
 
-  if( (mTexture1Url != "") && (mIlluminationType == Toolkit::Model3dView::DIFFUSE_WITH_NORMAL_MAP) )
+  Sampler sampler = Sampler::New();
+  sampler.SetFilterMode( FilterMode::LINEAR_MIPMAP_LINEAR, FilterMode::LINEAR_MIPMAP_LINEAR );
+
+  // Setup diffuse texture.
+  if( !mTexture0Url.empty() && ( mIlluminationType != Toolkit::Model3dView::DIFFUSE ) )
   {
-    std::string imgUrl = mImagesUrl + mTexture1Url;
+    std::string imageUrl = mImagesUrl + mTexture0Url;
 
     //Load textures
-    Image tex1 = ResourceImage::New( imgUrl );
-    if (tex1)
+    Texture diffuseTexture = LoadTexture( imageUrl.c_str() );
+    if( diffuseTexture )
     {
-      mTextureSet.SetImage( 1u, tex1 );
+      mTextureSet.SetTexture( DIFFUSE_TEXTURE_INDEX, diffuseTexture );
+      mTextureSet.SetSampler( DIFFUSE_TEXTURE_INDEX, sampler );
     }
   }
 
-  if( (mTexture2Url != "") && (mIlluminationType == Toolkit::Model3dView::DIFFUSE_WITH_NORMAL_MAP) )
+  if( mIlluminationType == Toolkit::Model3dView::DIFFUSE_WITH_NORMAL_MAP )
   {
-    std::string imgUrl = mImagesUrl + mTexture2Url;
+    // Setup normal map texture.
+    if( !mTexture1Url.empty() )
+    {
+      std::string imageUrl = mImagesUrl + mTexture1Url;
 
-    //Load textures
-    Image tex2 = ResourceImage::New( imgUrl );
-    if( tex2 )
+      //Load textures
+      Texture normalTexture = LoadTexture( imageUrl.c_str() );
+      if( normalTexture )
+      {
+        mTextureSet.SetTexture( NORMAL_TEXTURE_INDEX, normalTexture );
+        mTextureSet.SetSampler( NORMAL_TEXTURE_INDEX, sampler );
+      }
+    }
+    if( !mTexture2Url.empty() )
     {
-      mTextureSet.SetImage( 2u, tex2 );
+      // Setup gloss map texture.
+      std::string imageUrl = mImagesUrl + mTexture2Url;
+
+      //Load textures
+      Texture glossTexture = LoadTexture( imageUrl.c_str() );
+      if( glossTexture )
+      {
+        mTextureSet.SetTexture( GLOSS_TEXTURE_INDEX, glossTexture );
+        mTextureSet.SetSampler( GLOSS_TEXTURE_INDEX, sampler );
+      }
     }
   }
 }
index 1a72243..8b491b0 100644 (file)
@@ -593,7 +593,7 @@ void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
           if( isValidFont &&
               isEmojiScript )
           {
-            const BufferImage bitmap = fontClient.CreateBitmap( fontId, glyphIndex );
+            const PixelData bitmap = fontClient.CreateBitmap( fontId, glyphIndex );
 
             // For color emojis, the font is valid if the bitmap is RGBA.
             isValidFont = bitmap && ( Pixel::BGRA8888 == bitmap.GetPixelFormat() );
index f40b3a4..8532b93 100644 (file)
@@ -89,7 +89,7 @@ AtlasGlyphManager::AtlasGlyphManager()
 }
 
 void AtlasGlyphManager::Add( const Text::GlyphInfo& glyph,
-                             const BufferImage& bitmap,
+                             const PixelData& bitmap,
                              Dali::Toolkit::AtlasManager::AtlasSlot& slot )
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "Added glyph, font: %d index: %d\n", glyph.fontId, glyph.index );
@@ -97,9 +97,9 @@ void AtlasGlyphManager::Add( const Text::GlyphInfo& glyph,
   if ( mAtlasManager.Add( bitmap, slot ) )
   {
     // A new atlas was created so set the texture set details for the atlas
-    Dali::Atlas atlas = mAtlasManager.GetAtlasContainer( slot.mAtlasId );
+    Dali::Texture atlas = mAtlasManager.GetAtlasContainer( slot.mAtlasId );
     TextureSet textureSet = TextureSet::New();
-    textureSet.SetImage( 0u, atlas );
+    textureSet.SetTexture( 0u, atlas );
     mAtlasManager.SetTextures( slot.mAtlasId, textureSet );
   }
 
index 90210f2..b72b649 100644 (file)
@@ -70,7 +70,7 @@ public:
    * @copydoc Toolkit::AtlasGlyphManager::Add
    */
   void Add( const Text::GlyphInfo& glyph,
-            const BufferImage& bitmap,
+            const PixelData& bitmap,
             Dali::Toolkit::AtlasManager::AtlasSlot& slot );
 
   /**
index abcd391..6858f26 100644 (file)
@@ -69,7 +69,7 @@ AtlasGlyphManager::AtlasGlyphManager(Internal::AtlasGlyphManager *impl)
 }
 
 void AtlasGlyphManager::Add( const Text::GlyphInfo& glyph,
-                             const BufferImage& bitmap,
+                             const PixelData& bitmap,
                              AtlasManager::AtlasSlot& slot )
 {
   GetImplementation(*this).Add( glyph, bitmap, slot );
index 3831589..3ba54de 100644 (file)
@@ -84,7 +84,7 @@ public:
    * @param[out] slot information returned by atlas manager for addition
    */
   void Add( const Text::GlyphInfo& glyph,
-            const BufferImage& bitmap,
+            const PixelData& bitmap,
             AtlasManager::AtlasSlot& slot );
 
   /**
index 8d3ae1b..bc3a70a 100644 (file)
@@ -41,7 +41,6 @@ namespace
   const uint32_t DEFAULT_BLOCK_HEIGHT( 16u );
   const uint32_t SINGLE_PIXEL_PADDING( 1u );
   const uint32_t DOUBLE_PIXEL_PADDING( SINGLE_PIXEL_PADDING << 1 );
-  const uint32_t FILLED_PIXEL( -1 );
   Toolkit::AtlasManager::AtlasSize EMPTY_SIZE;
 }
 
@@ -79,8 +78,7 @@ Toolkit::AtlasManager::AtlasId AtlasManager::CreateAtlas( const Toolkit::AtlasMa
     return 0;
   }
 
-  Dali::Atlas atlas = Dali::Atlas::New( width, height, pixelformat );
-  atlas.Clear( Vector4::ZERO );
+  Dali::Texture atlas = Dali::Texture::New( TextureType::TEXTURE_2D, pixelformat, width, height );
   AtlasDescriptor atlasDescriptor;
   atlasDescriptor.mAtlas = atlas;
   atlasDescriptor.mSize = size;
@@ -88,35 +86,21 @@ Toolkit::AtlasManager::AtlasId AtlasManager::CreateAtlas( const Toolkit::AtlasMa
   atlasDescriptor.mTotalBlocks = ( ( width - 1u ) / blockWidth ) * ( ( height - 1u ) / blockHeight );
   atlasDescriptor.mAvailableBlocks = atlasDescriptor.mTotalBlocks;
 
-  atlasDescriptor.mHorizontalStrip = BufferImage::New( blockWidth, SINGLE_PIXEL_PADDING, pixelformat );
-  atlasDescriptor.mVerticalStrip = BufferImage::New( SINGLE_PIXEL_PADDING, blockHeight - DOUBLE_PIXEL_PADDING, pixelformat );
-
-  PixelBuffer* buffer = atlasDescriptor.mHorizontalStrip.GetBuffer();
-  if( buffer == NULL )
-  {
-    DALI_LOG_ERROR("atlasDescriptor.mHorizontalStrip.GetBuffer() returns NULL\n");
-    return 0;
-  }
-  memset( buffer, 0, atlasDescriptor.mHorizontalStrip.GetBufferSize() );
-
-  buffer = atlasDescriptor.mVerticalStrip.GetBuffer();
-  if( buffer == NULL )
-  {
-    DALI_LOG_ERROR("atlasDescriptor.mVerticalStrip.GetBuffer() returns NULL\n");
-    return 0;
-  }
-  memset( buffer, 0, atlasDescriptor.mVerticalStrip.GetBufferSize() );
-
-  BufferImage filledPixelImage = BufferImage::New( 1u, 1u, pixelformat );
-  buffer = filledPixelImage.GetBuffer();
-  if( buffer == NULL)
-  {
-    DALI_LOG_ERROR("filledPixelImage.GetBuffer() returns NULL\n");
-    return 0;
-  }
-
-  memset( buffer, 0xFF, filledPixelImage.GetBufferSize() );
-  atlas.Upload( filledPixelImage, 0, 0 );
+  unsigned int bufferSize(  blockWidth * SINGLE_PIXEL_PADDING * Dali::Pixel::GetBytesPerPixel(pixelformat) );
+  unsigned char* bufferHorizontalStrip = new unsigned char[bufferSize];
+  memset( bufferHorizontalStrip, 0, bufferSize );
+  atlasDescriptor.mHorizontalStrip = PixelData::New( bufferHorizontalStrip, bufferSize, blockWidth, SINGLE_PIXEL_PADDING, pixelformat, PixelData::DELETE_ARRAY );
+
+  bufferSize = SINGLE_PIXEL_PADDING * (blockHeight - DOUBLE_PIXEL_PADDING) * Dali::Pixel::GetBytesPerPixel(pixelformat);
+  unsigned char* bufferVerticalStrip = new unsigned char[bufferSize];
+  memset( bufferVerticalStrip, 0, bufferSize );
+  atlasDescriptor.mVerticalStrip = PixelData::New( bufferVerticalStrip, bufferSize, SINGLE_PIXEL_PADDING, blockHeight - DOUBLE_PIXEL_PADDING, pixelformat, PixelData::DELETE_ARRAY );
+
+  bufferSize = Dali::Pixel::GetBytesPerPixel(pixelformat);
+  unsigned char* buffer = new unsigned char[bufferSize];
+  memset( buffer, 0xFF, bufferSize );
+  PixelData filledPixelImage = PixelData::New( buffer, bufferSize, 1u, 1u, pixelformat, PixelData::DELETE_ARRAY );
+  atlas.Upload( filledPixelImage, 0u, 0u, 0u, 0u, 1u, 1u );
   mAtlasList.push_back( atlasDescriptor );
   return mAtlasList.size();
 }
@@ -126,7 +110,7 @@ void AtlasManager::SetAddPolicy( Toolkit::AtlasManager::AddFailPolicy policy )
   mAddFailPolicy = policy;
 }
 
-bool AtlasManager::Add( const BufferImage& image,
+bool AtlasManager::Add( const PixelData& image,
                         Toolkit::AtlasManager::AtlasSlot& slot,
                         Toolkit::AtlasManager::AtlasId atlas )
 {
@@ -245,7 +229,7 @@ AtlasManager::SizeType AtlasManager::CheckAtlas( SizeType atlas,
   return result;
 }
 
-void AtlasManager::UploadImage( const BufferImage& image,
+void AtlasManager::UploadImage( const PixelData& image,
                                 const AtlasSlotDescriptor& desc )
 {
   // Get the atlas to upload the image to
@@ -271,25 +255,30 @@ void AtlasManager::UploadImage( const BufferImage& image,
   SizeType height = image.GetHeight();
 
   // Blit image 1 pixel to the right and down into the block to compensate for texture filtering
-  if ( !mAtlasList[ atlas ].mAtlas.Upload( image,
+  if ( !mAtlasList[ atlas ].mAtlas.Upload( image, 0u, 0u,
                                            blockOffsetX + SINGLE_PIXEL_PADDING,
-                                           blockOffsetY + SINGLE_PIXEL_PADDING ) )
+                                           blockOffsetY + SINGLE_PIXEL_PADDING,
+                                           width, height) )
   {
     DALI_LOG_ERROR("Uploading image to Atlas Failed!.\n");
   }
 
   // Blit top strip
-  if ( !mAtlasList[ atlas ].mAtlas.Upload( mAtlasList[ atlas ].mHorizontalStrip,
+  if ( !mAtlasList[ atlas ].mAtlas.Upload( mAtlasList[ atlas ].mHorizontalStrip, 0u, 0u,
                                            blockOffsetX,
-                                           blockOffsetY ) )
+                                           blockOffsetY,
+                                           mAtlasList[ atlas ].mHorizontalStrip.GetWidth(),
+                                           mAtlasList[ atlas ].mHorizontalStrip.GetHeight()) )
   {
     DALI_LOG_ERROR("Uploading top strip to Atlas Failed!\n");
   }
 
   // Blit left strip
-  if ( !mAtlasList[ atlas ].mAtlas.Upload( mAtlasList[ atlas ].mVerticalStrip,
+  if ( !mAtlasList[ atlas ].mAtlas.Upload( mAtlasList[ atlas ].mVerticalStrip, 0u, 0u,
                                            blockOffsetX,
-                                           blockOffsetY + SINGLE_PIXEL_PADDING ) )
+                                           blockOffsetY + SINGLE_PIXEL_PADDING,
+                                           mAtlasList[ atlas ].mVerticalStrip.GetWidth(),
+                                           mAtlasList[ atlas ].mVerticalStrip.GetHeight() ) )
   {
     DALI_LOG_ERROR("Uploading left strip to Atlas Failed!\n");
   }
@@ -297,9 +286,11 @@ void AtlasManager::UploadImage( const BufferImage& image,
   // Blit bottom strip
   if ( blockOffsetY + height + DOUBLE_PIXEL_PADDING <= mAtlasList[ atlas ].mSize.mHeight )
   {
-    if ( !mAtlasList[ atlas ].mAtlas.Upload( mAtlasList[ atlas ].mHorizontalStrip,
+    if ( !mAtlasList[ atlas ].mAtlas.Upload( mAtlasList[ atlas ].mHorizontalStrip, 0u, 0u,
                                              blockOffsetX,
-                                             blockOffsetY + height + SINGLE_PIXEL_PADDING ) )
+                                             blockOffsetY + height + SINGLE_PIXEL_PADDING,
+                                             mAtlasList[ atlas ].mHorizontalStrip.GetWidth(),
+                                             mAtlasList[ atlas ].mHorizontalStrip.GetHeight() ) )
     {
       DALI_LOG_ERROR("Uploading bottom strip to Atlas Failed!.\n");
     }
@@ -308,9 +299,11 @@ void AtlasManager::UploadImage( const BufferImage& image,
   // Blit right strip
   if ( blockOffsetX + width + DOUBLE_PIXEL_PADDING <= mAtlasList[ atlas ].mSize.mWidth )
   {
-    if ( !mAtlasList[ atlas ].mAtlas.Upload( mAtlasList[ atlas ].mVerticalStrip,
+    if ( !mAtlasList[ atlas ].mAtlas.Upload( mAtlasList[ atlas ].mVerticalStrip, 0u, 0u,
                                              blockOffsetX + width + SINGLE_PIXEL_PADDING,
-                                             blockOffsetY + SINGLE_PIXEL_PADDING ) )
+                                             blockOffsetY + SINGLE_PIXEL_PADDING,
+                                             mAtlasList[ atlas ].mVerticalStrip.GetWidth(),
+                                             mAtlasList[ atlas ].mVerticalStrip.GetHeight() ) )
     {
       DALI_LOG_ERROR("Uploading right strip to Atlas Failed!.\n");
     }
@@ -349,10 +342,10 @@ void AtlasManager::GenerateMeshData( ImageId id,
   }
 }
 
-Dali::Atlas AtlasManager::GetAtlasContainer( AtlasId atlas ) const
+Dali::Texture AtlasManager::GetAtlasContainer( AtlasId atlas ) const
 {
   DALI_ASSERT_DEBUG( atlas && atlas <= mAtlasList.size() );
-  Dali::Atlas atlasContainer;
+  Dali::Texture atlasContainer;
   if ( atlas && atlas-- <= mAtlasList.size() )
   {
     atlasContainer = mAtlasList[ atlas ].mAtlas;
index e86bda1..863bba9 100644 (file)
@@ -59,11 +59,11 @@ public:
    */
   struct AtlasDescriptor
   {
-    Dali::Atlas mAtlas;                                                 // atlas image
+    Dali::Texture mAtlas;                                                 // atlas image
     Toolkit::AtlasManager::AtlasSize mSize;                             // size of atlas
     Pixel::Format mPixelFormat;                                         // pixel format used by atlas
-    BufferImage mHorizontalStrip;                                       // Image used to pad upload
-    BufferImage mVerticalStrip;                                         // Image used to pad upload
+    PixelData mHorizontalStrip;                                       // Image used to pad upload
+    PixelData mVerticalStrip;                                         // Image used to pad upload
     TextureSet mTextureSet;                                             // Texture set used for atlas texture
     SizeType mTotalBlocks;                                              // total number of blocks in atlas
     SizeType mAvailableBlocks;                                          // number of blocks available in atlas
@@ -101,7 +101,7 @@ public:
   /**
    * @copydoc Toolkit::AtlasManager::Add
    */
-  bool Add( const BufferImage& image,
+  bool Add( const PixelData& image,
             Toolkit::AtlasManager::AtlasSlot& slot,
             Toolkit::AtlasManager::AtlasId atlas );
 
@@ -121,7 +121,7 @@ public:
   /**
    * @copydoc Toolkit::AtlasManager::GetAtlasContainer
    */
-  Dali::Atlas GetAtlasContainer( AtlasId atlas ) const;
+  Dali::Texture GetAtlasContainer( AtlasId atlas ) const;
 
   /**
    * @copydoc Toolkit::AtlasManager::GetAtlas
@@ -185,7 +185,7 @@ private:
                        SizeType height,
                        Pixel::Format pixelFormat );
 
-  void UploadImage( const BufferImage& image,
+  void UploadImage( const PixelData& image,
                     const AtlasSlotDescriptor& desc );
 
 };
index d28b586..510da05 100644 (file)
@@ -55,7 +55,7 @@ void AtlasManager::SetAddPolicy( AddFailPolicy policy )
   GetImplementation(*this).SetAddPolicy( policy );
 }
 
-bool AtlasManager::Add( const BufferImage& image,
+bool AtlasManager::Add( const PixelData& image,
                         AtlasManager::AtlasSlot& slot,
                         AtlasManager::AtlasId atlas )
 {
@@ -78,7 +78,7 @@ void AtlasManager::GenerateMeshData( ImageId id,
                                              addReference );
 }
 
-Dali::Atlas AtlasManager::GetAtlasContainer( AtlasId atlas ) const
+Dali::Texture AtlasManager::GetAtlasContainer( AtlasId atlas ) const
 {
   return GetImplementation(*this).GetAtlasContainer( atlas );
 }
index df86ac1..5542dd0 100644 (file)
@@ -157,13 +157,13 @@ public:
    *          If an add is made before an atlas is created under this policy,
    *          then a default size atlas will be created
    *
-   * @param[in] image reference to a bitmapimage
+   * @param[in] image PixelData object containing the image data
    * @param[out] slot result of add operation
    * @param[in] atlas optional preferred atlas
    *
    * @return true if a new atlas was created
    */
-  bool Add( const BufferImage& image,
+  bool Add( const PixelData& image,
             AtlasSlot& slot,
             AtlasId atlas = 0 );
 
@@ -196,7 +196,7 @@ public:
    *
    * @return Atlas Handle
    */
-  Dali::Atlas GetAtlasContainer( AtlasId atlas ) const;
+  Dali::Texture GetAtlasContainer( AtlasId atlas ) const;
 
   /**
    * @brief Get the Id of the atlas containing an image
index f2e5596..3ee577f 100644 (file)
@@ -289,7 +289,7 @@ struct AtlasRenderer::Impl
           }
 
           // Create a new image for the glyph
-          BufferImage bitmap = mFontClient.CreateBitmap( glyph.fontId, glyph.index );
+          PixelData bitmap = mFontClient.CreateBitmap( glyph.fontId, glyph.index );
           if( bitmap )
           {
             MaxBlockSize& blockSize = mBlockSizes[currentBlockSize];
index 6d904b5..08bf54d 100644 (file)
@@ -250,9 +250,9 @@ void CubeTransitionEffect::OnStageConnection( int depth )
 
   TextureSet textureSet = TextureSet::New();
 
-  if( mCurrentImage )
+  if( mCurrentTexture )
   {
-    textureSet.SetImage( 0u, mCurrentImage );
+    textureSet.SetTexture( 0u, mCurrentTexture );
   }
   mCurrentRenderer = Renderer::New( geometry, shader );
   mCurrentRenderer.SetTextures( textureSet );
@@ -311,24 +311,25 @@ bool CubeTransitionEffect::IsTransitioning()
   return mIsAnimating;
 }
 
-void CubeTransitionEffect::SetCurrentImage( Image image )
+void CubeTransitionEffect::SetCurrentTexture( Texture texture )
 {
-  mCurrentImage = image;
+  mCurrentTexture = texture;
+
   if( mCurrentRenderer )
   {
     TextureSet textureSet = mCurrentRenderer.GetTextures();
-    textureSet.SetImage( 0u, mCurrentImage );
+    textureSet.SetTexture( 0u, mCurrentTexture);
   }
 }
 
-void CubeTransitionEffect::SetTargetImage( Image image )
+void CubeTransitionEffect::SetTargetTexture( Texture texture )
 {
-  mTargetImage = image;
+  mTargetTexture = texture;
 
   if( mTargetRenderer )
   {
     TextureSet textureSet = mTargetRenderer.GetTextures();
-    textureSet.SetImage( 0u, mTargetImage );
+    textureSet.SetTexture( 0u, mTargetTexture );
   }
 }
 
@@ -355,9 +356,9 @@ void CubeTransitionEffect::StartTransition( Vector2 panPosition, Vector2 panDisp
 
   //create the target renderer
   TextureSet textureSet = TextureSet::New();
-  if( mTargetImage )
+  if( mTargetTexture )
   {
-    textureSet.SetImage( 0u, mTargetImage );
+    textureSet.SetTexture( 0u, mTargetTexture );
   }
   Geometry geometry = mCurrentRenderer.GetGeometry();
   Shader shader( mCurrentRenderer.GetShader() );
@@ -467,13 +468,13 @@ void CubeTransitionEffect::OnTransitionFinished(Animation& source)
 
   std::swap( mCurrentTiles, mTargetTiles );
   std::swap( mCurrentRenderer, mTargetRenderer );
-  std::swap( mCurrentImage, mTargetImage );
+  std::swap( mCurrentTexture, mTargetTexture );
 
   ResetToInitialState();
 
   //Emit signal
   Toolkit::CubeTransitionEffect handle( GetOwner() );
-  mTransitionCompletedSignal.Emit( handle, mCurrentImage );
+  mTransitionCompletedSignal.Emit( handle, mCurrentTexture );
 }
 
 Toolkit::CubeTransitionEffect::TransitionCompletedSignalType& CubeTransitionEffect::TransitionCompletedSignal()
index 35319bf..8d1760e 100644 (file)
@@ -76,14 +76,14 @@ public:
   bool IsTransitioning();
 
   /**
-   * @copydoc Toolkit::CubeTransitionEffect::SetFirstImage
+   * @copydoc Toolkit::CubeTransitionEffect::SetCurrentTexture
    */
-  void SetCurrentImage( Image image );
+  void SetCurrentTexture( Texture texture );
 
   /**
-   * @copydoc Toolkit::CubeTransitionEffect::SetTargetImage
+   * @copydoc Toolkit::CubeTransitionEffect::SetTargetTexture
    */
-  void SetTargetImage( Image image );
+  void SetTargetTexture( Texture texture );
 
   /**
    * @copydoc Toolkit::CubeTransitionEffect::StartTransition(bool)
@@ -214,8 +214,9 @@ protected:
   Renderer                   mCurrentRenderer;
   Renderer                   mTargetRenderer;
 
-  Image                      mCurrentImage;
-  Image                      mTargetImage;
+  Texture                    mCurrentTexture;
+  Texture                    mTargetTexture;
+
   Animation                  mAnimation;
 
   Vector2                    mTileSize;