1 #ifndef __DALI_INTERNAL_NATIVE_IMAGE_H__
2 #define __DALI_INTERNAL_NATIVE_IMAGE_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/images/native-image.h>
23 #include <dali/internal/event/images/image-impl.h>
32 typedef IntrusivePtr<NativeImage> NativeImagePtr;
35 * @copydoc Dali::NativeImage
37 class NativeImage : public Image
42 * Creates object by using native resources
43 * the maximum size of the image is limited by GL_MAX_TEXTURE_SIZE
44 * @param [in] nativeImageInterface An reference to the object of the interface implementation.
45 * @return a pointer to a newly created object.
47 static NativeImagePtr New( NativeImageInterface& nativeImageInterface );
50 * @copydoc Dali::NativeImage::CreateGlTexture
52 void CreateGlTexture();
62 * A reference counted object may only be deleted by calling Unreference()
64 virtual ~NativeImage();
67 } // namespace Internal
70 * Helper methods for public API.
72 inline Internal::NativeImage& GetImplementation(Dali::NativeImage& image)
74 DALI_ASSERT_ALWAYS( image && "Image handle is empty" );
76 BaseObject& handle = image.GetBaseObject();
78 return static_cast<Internal::NativeImage&>(handle);
81 inline const Internal::NativeImage& GetImplementation(const Dali::NativeImage& image)
83 DALI_ASSERT_ALWAYS( image && "Image handle is empty" );
85 const BaseObject& handle = image.GetBaseObject();
87 return static_cast<const Internal::NativeImage&>(handle);
91 #endif // __DALI_INTERNAL_NATIVE_IMAGE_H__