2 * Copyright (c) 2023 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 <dali-toolkit/internal/texture-manager/texture-upload-observer.h>
22 #include <dali-toolkit/internal/texture-manager/texture-manager-type.h> // for INVALUD_TEXTURE_ID
28 TextureUploadObserver::TextureInformation::TextureInformation(const ReturnType returnType, const int32_t textureId, TextureSet textureSet, const bool preMultiplied)
29 : returnType(returnType),
31 textureSet(textureSet),
32 preMultiplied(preMultiplied),
38 TextureUploadObserver::TextureInformation::TextureInformation(const ReturnType returnType, const int32_t textureId, TextureSet textureSet, const std::string& url, const bool preMultiplied)
39 : returnType(returnType),
41 textureSet(textureSet),
42 preMultiplied(preMultiplied),
48 TextureUploadObserver::TextureInformation::TextureInformation(const ReturnType returnType, Devel::PixelBuffer pixelBuffer, const std::string& url, const bool preMultiplied)
49 : returnType(returnType),
50 textureId(Internal::TextureManagerType::INVALID_TEXTURE_ID),
52 preMultiplied(preMultiplied),
53 pixelBuffer(pixelBuffer),
58 TextureUploadObserver::TextureInformation::TextureInformation(const ReturnType returnType, const int32_t textureId, TextureSet textureSet, const uint32_t frameCount, const uint32_t interval, const bool preMultiplied)
59 : returnType(returnType),
61 textureSet(textureSet),
62 preMultiplied(preMultiplied),
65 frameCount(frameCount),
70 TextureUploadObserver::TextureUploadObserver()
74 TextureUploadObserver::~TextureUploadObserver()
76 if(!mDestructionSignal.Empty())
78 mDestructionSignal.Emit(this);
82 TextureUploadObserver::DestructionSignalType& TextureUploadObserver::DestructionSignal()
84 return mDestructionSignal;
87 } // namespace Toolkit