2 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include "texture-upload-observer.h"
22 #include <dali-toolkit/internal/texture-manager/texture-manager-type.h> // for INVALUD_TEXTURE_ID
28 TextureUploadObserver::TextureInformation::TextureInformation(ReturnType returnType, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied)
29 : returnType(returnType),
31 textureSet(textureSet),
32 useAtlasing(useAtlasing),
34 preMultiplied(preMultiplied),
40 TextureUploadObserver::TextureInformation::TextureInformation(ReturnType returnType, Devel::PixelBuffer pixelBuffer, const std::string& url, bool preMultiplied)
41 : returnType(returnType),
42 textureId(Internal::TextureManagerType::INVALID_TEXTURE_ID),
45 atlasRect(Vector4::ZERO),
46 preMultiplied(preMultiplied),
47 pixelBuffer(pixelBuffer),
52 TextureUploadObserver::TextureInformation::TextureInformation(ReturnType returnType, int32_t textureId, uint32_t frameCount, uint32_t interval)
53 : returnType(returnType),
57 atlasRect(Vector4::ZERO),
61 frameCount(frameCount),
66 TextureUploadObserver::TextureUploadObserver()
70 TextureUploadObserver::~TextureUploadObserver()
72 if(!mDestructionSignal.Empty())
74 mDestructionSignal.Emit(this);
78 TextureUploadObserver::DestructionSignalType& TextureUploadObserver::DestructionSignal()
80 return mDestructionSignal;
83 } // namespace Toolkit