From bd2ff7b0bc5c4b73bb49a1f5f759e07f5c48e58d Mon Sep 17 00:00:00 2001 From: Yoonsang Lee Date: Tue, 13 Jan 2015 19:32:36 +0900 Subject: [PATCH] Recover PixmapImage::GetPixmap() without any parameters (no build break) Change-Id: I5521d11379c3f26088f86a56bc030e6815072377 --- adaptors/public-api/adaptor-framework/pixmap-image.cpp | 5 +++++ adaptors/public-api/adaptor-framework/pixmap-image.h | 7 +++++++ adaptors/wayland/pixmap-image-impl-wl.cpp | 6 ++++++ adaptors/wayland/pixmap-image-impl.h | 5 +++++ adaptors/x11/pixmap-image-impl-x.cpp | 6 ++++++ adaptors/x11/pixmap-image-impl.h | 4 ++++ 6 files changed, 33 insertions(+) diff --git a/adaptors/public-api/adaptor-framework/pixmap-image.cpp b/adaptors/public-api/adaptor-framework/pixmap-image.cpp index e4b16eb..fcc8715 100644 --- a/adaptors/public-api/adaptor-framework/pixmap-image.cpp +++ b/adaptors/public-api/adaptor-framework/pixmap-image.cpp @@ -34,6 +34,11 @@ PixmapImagePtr PixmapImage::New( unsigned int width, unsigned int height, ColorD return image; } +Any PixmapImage::GetPixmap() +{ + return mImpl->GetPixmap(); +} + PixmapImagePtr PixmapImage::New( Any pixmap ) { PixmapImagePtr image = new PixmapImage(0, 0, COLOR_DEPTH_DEFAULT, pixmap); diff --git a/adaptors/public-api/adaptor-framework/pixmap-image.h b/adaptors/public-api/adaptor-framework/pixmap-image.h index e0425a7..4960a65 100644 --- a/adaptors/public-api/adaptor-framework/pixmap-image.h +++ b/adaptors/public-api/adaptor-framework/pixmap-image.h @@ -85,6 +85,13 @@ public: static PixmapImagePtr New( Any pixmap ); /** + * @brief Retrieve the internal pixmap + * + * @return pixmap any object containing the internal pixmap + */ + Any GetPixmap(); + + /** * @brief Get a copy of the pixels used by PixmapImage. * * This is only supported for 24 bit RGB and 32 bit RGBA internal formats diff --git a/adaptors/wayland/pixmap-image-impl-wl.cpp b/adaptors/wayland/pixmap-image-impl-wl.cpp index 70a6423..86d7c51 100644 --- a/adaptors/wayland/pixmap-image-impl-wl.cpp +++ b/adaptors/wayland/pixmap-image-impl-wl.cpp @@ -78,6 +78,12 @@ PixmapImage::~PixmapImage() { } +Any PixmapImage::GetPixmap() const +{ + DALI_ASSERT_ALWAYS( false && "PixmapImage::GetPixmap() is not supported for Wayland." ); + return Any(); +} + bool PixmapImage::GetPixels(std::vector& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const { return false; diff --git a/adaptors/wayland/pixmap-image-impl.h b/adaptors/wayland/pixmap-image-impl.h index 86120ff..7ef1fed 100644 --- a/adaptors/wayland/pixmap-image-impl.h +++ b/adaptors/wayland/pixmap-image-impl.h @@ -55,6 +55,11 @@ public: Any pixmap); /** + * @copydoc Dali::PixmapImage::GetPixmap() + */ + Any GetPixmap() const; + + /** * @copydoc Dali::PixmapImage::GetPixels() */ bool GetPixels(std::vector &pixbuf, unsigned int &width, unsigned int &height, Pixel::Format& pixelFormat ) const; diff --git a/adaptors/x11/pixmap-image-impl-x.cpp b/adaptors/x11/pixmap-image-impl-x.cpp index c200b64..3f96cc6 100644 --- a/adaptors/x11/pixmap-image-impl-x.cpp +++ b/adaptors/x11/pixmap-image-impl-x.cpp @@ -136,6 +136,12 @@ PixmapImage::~PixmapImage() } } +Any PixmapImage::GetPixmap() const +{ + // return ecore x11 type + return Any(mPixmap); +} + bool PixmapImage::GetPixels(std::vector& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const { DALI_ASSERT_DEBUG(sizeof(unsigned) == 4); diff --git a/adaptors/x11/pixmap-image-impl.h b/adaptors/x11/pixmap-image-impl.h index bd47110..215323d 100644 --- a/adaptors/x11/pixmap-image-impl.h +++ b/adaptors/x11/pixmap-image-impl.h @@ -54,6 +54,10 @@ public: unsigned int height, Dali::PixmapImage::ColorDepth depth, Any pixmap); + /** + * @copydoc Dali::PixmapImage::GetPixmap() + */ + Any GetPixmap() const; /** * @copydoc Dali::PixmapImage::GetPixels() -- 2.7.4