From: Adeel Kazmi Date: Fri, 5 Jun 2020 14:08:07 +0000 (+0100) Subject: Removed Image (and derived classes) Usage X-Git-Tag: dali_1.9.16~2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-demo.git;a=commitdiff_plain;h=19795807fe34037ad03690e55e3bdf64d7d64412 Removed Image (and derived classes) Usage Change-Id: Ib306cb9bbd910f946e7f9faee06072a6d15f314a --- diff --git a/builder/dali-builder.cpp b/builder/dali-builder.cpp index 433112d..b0e3248 100644 --- a/builder/dali-builder.cpp +++ b/builder/dali-builder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -240,7 +240,7 @@ private: RenderTask defaultTask = taskList.GetTask(0); defaultTask.SetSourceActor( stage.GetRootLayer() ); - defaultTask.SetTargetFrameBuffer( FrameBufferImage() ); + defaultTask.SetFrameBuffer( FrameBuffer() ); } } diff --git a/examples/builder/examples.cpp b/examples/builder/examples.cpp index e0ebc07..6aae5ae 100644 --- a/examples/builder/examples.cpp +++ b/examples/builder/examples.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -411,7 +411,7 @@ public: RenderTask defaultTask = taskList.GetTask(0); defaultTask.SetSourceActor( stage.GetRootLayer() ); - defaultTask.SetTargetFrameBuffer( FrameBufferImage() ); + defaultTask.SetFrameBuffer( FrameBuffer() ); } unsigned int numChildren = layer.GetChildCount(); diff --git a/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp b/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp index 7c7a0f0..bd02a6e 100644 --- a/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp +++ b/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -194,26 +194,6 @@ public: background.SetProperty( Actor::Property::SIZE, stage.GetSize() ); stage.Add( background ); - BufferImage heightBackground = BufferImage::WHITE(); - PixelBuffer* const heightPixel = heightBackground.GetBuffer(); - heightPixel[0] = 0x8f; - heightPixel[1] = 0x8f; - heightPixel[2] = 0x8f; - - BufferImage widthBackground = BufferImage::WHITE(); - PixelBuffer* const widthPixel = widthBackground.GetBuffer(); - widthPixel[0] = 0x4f; - widthPixel[1] = 0x4f; - widthPixel[2] = 0x4f; - - mHeightBox = Toolkit::ImageView::New( heightBackground ); - mHeightBox.SetProperty( DevelActor::Property::OPACITY, 0.2f ); - background.Add( mHeightBox ); - - mWidthBox = Toolkit::ImageView::New( widthBackground ); - mWidthBox.SetProperty( DevelActor::Property::OPACITY, 0.2f ); - background.Add( mWidthBox ); - mDesiredBox = Toolkit::ImageView::New( BORDER_IMAGE ); background.Add( mDesiredBox ); @@ -221,14 +201,6 @@ public: mDesiredBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mDesiredBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) ); - mHeightBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mHeightBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - - mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) ); - mWidthBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mWidthBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); - // Initialize the actor mImageView = Toolkit::ImageView::New( IMAGE_PATHS[ 0 ] ); @@ -697,16 +669,11 @@ private: // Border size needs to be modified to take into account the width of the frame. Vector2 borderScale( ( imageSize + Vector2( BORDER_WIDTH * 2.0f, BORDER_WIDTH * 2.0f ) ) / stage.GetSize() ); mDesiredBox.SetProperty( Actor::Property::SIZE, stage.GetSize() * borderScale ); - - mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) ); - mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) ); } private: Application& mApplication; Toolkit::ImageView mDesiredBox; //< Background rectangle to show requested image size. - Toolkit::ImageView mHeightBox; //< Background horizontal stripe to show requested image height. - Toolkit::ImageView mWidthBox; //< Background vertical stripe to show requested image width. Toolkit::PushButton mFittingModeButton; Toolkit::PushButton mSamplingModeButton; Toolkit::Popup mPopup; diff --git a/examples/text-memory-profiling/text-memory-profiling-example.cpp b/examples/text-memory-profiling/text-memory-profiling-example.cpp index 176ebed..453e579 100644 --- a/examples/text-memory-profiling/text-memory-profiling-example.cpp +++ b/examples/text-memory-profiling/text-memory-profiling-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -247,29 +247,6 @@ public: { Stage stage = Stage::GetCurrent(); - // Render tasks may have been setup last load so remove them - RenderTaskList taskList = stage.GetRenderTaskList(); - if( taskList.GetTaskCount() > 1 ) - { - typedef std::vector Collection; - typedef Collection::iterator ColIter; - Collection tasks; - - for( unsigned int i = 1; i < taskList.GetTaskCount(); ++i ) - { - tasks.push_back( taskList.GetTask(i) ); - } - - for( ColIter iter = tasks.begin(); iter != tasks.end(); ++iter ) - { - taskList.RemoveTask(*iter); - } - - RenderTask defaultTask = taskList.GetTask( 0 ); - defaultTask.SetSourceActor( stage.GetRootLayer() ); - defaultTask.SetTargetFrameBuffer( FrameBufferImage() ); - } - // Delete any existing text labels unsigned int numChildren = mLayer.GetChildCount();