1 #ifndef __DALI_INTERNAL_TEXTURE_FACTORY_H__
2 #define __DALI_INTERNAL_TEXTURE_FACTORY_H__
5 * Copyright (c) 2014 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/object/ref-object.h>
23 #include <dali/public-api/images/native-image-interface.h>
24 #include <dali/internal/render/gl-resources/texture-cache.h>
28 class NativeImageInterface;
40 namespace TextureFactory
43 * Creates a new texture object from a Bitmap
44 * @param[in] bitmap The Bitmap
45 * @param[in] context The GL context
46 * @return A newly allocated texture
48 Internal::Texture* NewBitmapTexture( Integration::Bitmap* const bitmap,
50 ResourcePolicy::Discardable discardPolicy );
53 * Creates a new bitmap texture object of the given dimensions.
54 * @param[in] width The width (pixels)
55 * @param[in] height The height (pixels)
56 * @param[in] pixelFormat The pixel format
57 * @param[in] clearPixels True if the pixel data should be cleared first
58 * @param[in] context The GL context
60 Internal::Texture* NewBitmapTexture( unsigned int width,
62 Pixel::Format pixelFormat,
65 ResourcePolicy::Discardable discardPolicy );
68 * Creates a texture object from a native image (eg.: EGLImage).
69 * @param[in] nativeImage The native image to load
70 * @param[in] context The GL context
71 * @return A newly allocated texture
73 Internal::Texture* NewNativeImageTexture( NativeImageInterface& nativeImage, Context& context );
76 * @copydoc FrameBufferTexture::FrameBufferTexture
77 * @return A newly allocated texture
79 Internal::Texture* NewFrameBufferTexture( unsigned int width,
81 Pixel::Format pixelFormat,
85 * @copydoc FrameBufferTexture::FrameBufferTexture
86 * @return A newly allocated texture
88 Internal::Texture* NewFrameBufferTexture( NativeImageInterfacePtr nativeImage, Context& context );
92 } // namespace Internal
96 #endif // __DALI_INTERNAL_TEXTURE_FACTORY_H__