DALi Version 2.1.5
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / texture-upload-observer.cpp
index 8ffd35f..6e18175 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
 // CLASS HEADER
 #include "texture-upload-observer.h"
 
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/visuals/texture-manager-impl.h>
+
 namespace Dali
 {
-
 namespace Toolkit
 {
+TextureUploadObserver::TextureInformation::TextureInformation(ReturnType returnType, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied)
+: returnType(returnType),
+  textureId(textureId),
+  textureSet(textureSet),
+  useAtlasing(useAtlasing),
+  atlasRect(atlasRect),
+  preMultiplied(preMultiplied),
+  pixelBuffer(),
+  url()
+{
+}
+
+TextureUploadObserver::TextureInformation::TextureInformation(ReturnType returnType, Devel::PixelBuffer pixelBuffer, const std::string& url, bool preMultiplied)
+: returnType(returnType),
+  textureId(Internal::TextureManager::INVALID_TEXTURE_ID),
+  textureSet(),
+  useAtlasing(false),
+  atlasRect(Vector4::ZERO),
+  preMultiplied(preMultiplied),
+  pixelBuffer(pixelBuffer),
+  url(url)
+{
+}
 
 TextureUploadObserver::TextureUploadObserver()
 {
@@ -30,9 +55,9 @@ TextureUploadObserver::TextureUploadObserver()
 
 TextureUploadObserver::~TextureUploadObserver()
 {
-  if( !mDestructionSignal.Empty() )
+  if(!mDestructionSignal.Empty())
   {
-    mDestructionSignal.Emit( this );
+    mDestructionSignal.Emit(this);
   }
 }
 
@@ -41,7 +66,6 @@ TextureUploadObserver::DestructionSignalType& TextureUploadObserver::Destruction
   return mDestructionSignal;
 }
 
-
 } // namespace Toolkit
 
 } // namespace Dali