1 #ifndef __DALI_INTERNAL_BITMAP_EXTERNAL_H__
2 #define __DALI_INTERNAL_BITMAP_EXTERNAL_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.
24 #include <dali/internal/event/images/bitmap-packed-pixel.h>
34 * A container for external image data
36 class BitmapExternal : public BitmapPackedPixel
44 * Creates new BitmapExternal instance with pixel buffer pointer and details.
45 * Application has ownership of the buffer, its contents can be modified.
46 * Bitmap stores given size information about the image.
47 * @pre bufferWidth, bufferHeight have to be power of two
48 * @param[in] pixBuf pointer to external pixel buffer
49 * @param[in] width Image width in pixels
50 * @param[in] height Image height in pixels
51 * @param[in] pixelformat pixel format
52 * @param[in] bufferWidth Buffer width in pixels
53 * @param[in] bufferHeight Buffer height in pixels
55 BitmapExternal(Dali::Integration::PixelBuffer* pixBuf,
58 Pixel::Format pixelformat,
59 unsigned int bufferWidth = 0,
60 unsigned int bufferHeight = 0);
63 * This does nothing, data is owned by external application.
65 virtual Dali::Integration::PixelBuffer* ReserveBuffer(Pixel::Format pixelFormat,
68 unsigned int bufferWidth = 0,
69 unsigned int bufferHeight = 0)
75 * Get the pixel buffer
76 * @return The buffer. You can modify its contents.
78 virtual Dali::Integration::PixelBuffer* GetBuffer()
85 * A reference counted object may only be deleted by calling Unreference()
87 virtual ~BitmapExternal();
91 Dali::Integration::PixelBuffer* mExternalData; ///< Externally owned pixel data
94 BitmapExternal(); ///< defined private to prevent use
95 BitmapExternal(const BitmapExternal& other); ///< defined private to prevent use
96 BitmapExternal& operator = (const BitmapExternal& other); ///< defined private to prevent use
98 // Changes scope, should be at end of class
99 DALI_LOG_OBJECT_STRING_DECLARATION;
102 } // namespace Internal
106 #endif // __DALI_INTERNAL_BITMAP_EXTERNAL_H__