1 #ifndef __DALI_INTERNAL_INDICATOR_BUFFER_H__
2 #define __DALI_INTERNAL_INDICATOR_BUFFER_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>
25 #include <native-bitmap-buffer-impl.h>
26 #include <adaptor-impl.h>
36 class NativeBitmapBuffer;
37 class IndicatorBuffer;
39 typedef IntrusivePtr<IndicatorBuffer> IndicatorBufferPtr;
42 * The IndicatorBuffer class uses the best available implementation for rendering indicator data.
43 * On platforms where EglImage is available it uses either SharedGlBuffer or NativeImageSource, on older
44 * platforms it falls back to using a bitmap buffer based solution.
46 class IndicatorBuffer : public RefObject
53 IndicatorBuffer( Adaptor* adaptor, unsigned int width, unsigned int height, Pixel::Format pixelFormat );
56 * Copy bitmap data to pixel buffer.
57 * @param src bitmap data source
58 * @param size size of bitmap data
59 * @return true if successful, false otherwise
61 bool UpdatePixels( const unsigned char *src, size_t size );
64 * Returns the NativeImage used internally
65 * @return the NativeImage used internally
67 NativeImageInterface& GetNativeImage() const;
70 * Set currently used Adaptor
73 void SetAdaptor( Adaptor* adaptor );
76 NativeImageInterfacePtr mNativeImage; ///< Image buffer created for shared file copy
78 NativeBitmapBufferPtr mBitmapBuffer; ///< Image buffer created for shared file copy if extension not available
84 Pixel::Format mPixelFormat;
91 #endif // __DALI_INTERNAL_INDICATOR_H__