Commit 19795807fe34037ad03690e55e3bdf64d7d64412

Authored by Adeel Kazmi
1 parent 32e49d30

Removed Image (and derived classes) Usage

Change-Id: Ib306cb9bbd910f946e7f9faee06072a6d15f314a
builder/dali-builder.cpp
1 1 /*
2   - * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  2 + * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3 3 *
4 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 5 * you may not use this file except in compliance with the License.
... ... @@ -240,7 +240,7 @@ private:
240 240  
241 241 RenderTask defaultTask = taskList.GetTask(0);
242 242 defaultTask.SetSourceActor( stage.GetRootLayer() );
243   - defaultTask.SetTargetFrameBuffer( FrameBufferImage() );
  243 + defaultTask.SetFrameBuffer( FrameBuffer() );
244 244 }
245 245 }
246 246  
... ...
examples/builder/examples.cpp
1 1 /*
2   - * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  2 + * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3 3 *
4 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 5 * you may not use this file except in compliance with the License.
... ... @@ -411,7 +411,7 @@ public:
411 411  
412 412 RenderTask defaultTask = taskList.GetTask(0);
413 413 defaultTask.SetSourceActor( stage.GetRootLayer() );
414   - defaultTask.SetTargetFrameBuffer( FrameBufferImage() );
  414 + defaultTask.SetFrameBuffer( FrameBuffer() );
415 415 }
416 416  
417 417 unsigned int numChildren = layer.GetChildCount();
... ...
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
1 1 /*
2   - * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  2 + * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3 3 *
4 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 5 * you may not use this file except in compliance with the License.
... ... @@ -194,26 +194,6 @@ public:
194 194 background.SetProperty( Actor::Property::SIZE, stage.GetSize() );
195 195 stage.Add( background );
196 196  
197   - BufferImage heightBackground = BufferImage::WHITE();
198   - PixelBuffer* const heightPixel = heightBackground.GetBuffer();
199   - heightPixel[0] = 0x8f;
200   - heightPixel[1] = 0x8f;
201   - heightPixel[2] = 0x8f;
202   -
203   - BufferImage widthBackground = BufferImage::WHITE();
204   - PixelBuffer* const widthPixel = widthBackground.GetBuffer();
205   - widthPixel[0] = 0x4f;
206   - widthPixel[1] = 0x4f;
207   - widthPixel[2] = 0x4f;
208   -
209   - mHeightBox = Toolkit::ImageView::New( heightBackground );
210   - mHeightBox.SetProperty( DevelActor::Property::OPACITY, 0.2f );
211   - background.Add( mHeightBox );
212   -
213   - mWidthBox = Toolkit::ImageView::New( widthBackground );
214   - mWidthBox.SetProperty( DevelActor::Property::OPACITY, 0.2f );
215   - background.Add( mWidthBox );
216   -
217 197 mDesiredBox = Toolkit::ImageView::New( BORDER_IMAGE );
218 198 background.Add( mDesiredBox );
219 199  
... ... @@ -221,14 +201,6 @@ public:
221 201 mDesiredBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
222 202 mDesiredBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
223 203  
224   - mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) );
225   - mHeightBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
226   - mHeightBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
227   -
228   - mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) );
229   - mWidthBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
230   - mWidthBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
231   -
232 204 // Initialize the actor
233 205 mImageView = Toolkit::ImageView::New( IMAGE_PATHS[ 0 ] );
234 206  
... ... @@ -697,16 +669,11 @@ private:
697 669 // Border size needs to be modified to take into account the width of the frame.
698 670 Vector2 borderScale( ( imageSize + Vector2( BORDER_WIDTH * 2.0f, BORDER_WIDTH * 2.0f ) ) / stage.GetSize() );
699 671 mDesiredBox.SetProperty( Actor::Property::SIZE, stage.GetSize() * borderScale );
700   -
701   - mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) );
702   - mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) );
703 672 }
704 673  
705 674 private:
706 675 Application& mApplication;
707 676 Toolkit::ImageView mDesiredBox; //< Background rectangle to show requested image size.
708   - Toolkit::ImageView mHeightBox; //< Background horizontal stripe to show requested image height.
709   - Toolkit::ImageView mWidthBox; //< Background vertical stripe to show requested image width.
710 677 Toolkit::PushButton mFittingModeButton;
711 678 Toolkit::PushButton mSamplingModeButton;
712 679 Toolkit::Popup mPopup;
... ...
examples/text-memory-profiling/text-memory-profiling-example.cpp
1 1 /*
2   - * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  2 + * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3 3 *
4 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 5 * you may not use this file except in compliance with the License.
... ... @@ -247,29 +247,6 @@ public:
247 247 {
248 248 Stage stage = Stage::GetCurrent();
249 249  
250   - // Render tasks may have been setup last load so remove them
251   - RenderTaskList taskList = stage.GetRenderTaskList();
252   - if( taskList.GetTaskCount() > 1 )
253   - {
254   - typedef std::vector<RenderTask> Collection;
255   - typedef Collection::iterator ColIter;
256   - Collection tasks;
257   -
258   - for( unsigned int i = 1; i < taskList.GetTaskCount(); ++i )
259   - {
260   - tasks.push_back( taskList.GetTask(i) );
261   - }
262   -
263   - for( ColIter iter = tasks.begin(); iter != tasks.end(); ++iter )
264   - {
265   - taskList.RemoveTask(*iter);
266   - }
267   -
268   - RenderTask defaultTask = taskList.GetTask( 0 );
269   - defaultTask.SetSourceActor( stage.GetRootLayer() );
270   - defaultTask.SetTargetFrameBuffer( FrameBufferImage() );
271   - }
272   -
273 250 // Delete any existing text labels
274 251 unsigned int numChildren = mLayer.GetChildCount();
275 252  
... ...