DSBuffer: add getNativeBuffer on DSBUffer interface 61/241561/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 2 Jul 2020 03:39:35 +0000 (12:39 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 09:45:19 +0000 (18:45 +0900)
Change-Id: I2707aa6043cf1ff3d0e236d5a27e1d81aa5453fe

src/DSBuffer/DSBufferTBMImpl.cpp
src/DSBuffer/DSBufferTBMImpl.h
src/DSBuffer/IDSBuffer.h

index 93555d5..00d9ce2 100644 (file)
@@ -20,6 +20,11 @@ DSBufferTBMImpl::~DSBufferTBMImpl()
        tbm_surface_destroy(__tsurface);
 }
 
+void *DSBufferTBMImpl::getNativeBuffer()
+{
+       return (void *)__tsurface;
+}
+
 tbm_format DSBufferTBMImpl::getTBMFormat(IDSBuffer::Format &format)
 {
        tbm_format tformat = 0; // what is the error format?
index ce2a37e..7cba1bc 100644 (file)
@@ -13,6 +13,8 @@ public:
        DSBufferTBMImpl(int width, int height, IDSBuffer::Format format);
        ~DSBufferTBMImpl();
 
+       void *getNativeBuffer() override;
+
        static tbm_format getTBMFormat(IDSBuffer::Format &format);
 private:
        int __width;
index 2e40f4c..d25e281 100644 (file)
@@ -13,6 +13,8 @@ public:
 
 public:
        virtual ~IDSBuffer() = default;
+
+       virtual void *getNativeBuffer() = 0;
 };
 
 }