From: SooChan Lim Date: Wed, 2 Sep 2020 10:57:57 +0000 (+0900) Subject: DSBufferRef: do not use DSBufferRefPrivate class X-Git-Tag: accepted/tizen/unified/20200908.003021~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e56386f9004f3dc85d49301badeb4c66300c5373;p=platform%2Fcore%2Fuifw%2Flibds.git DSBufferRef: do not use DSBufferRefPrivate class Change-Id: I4b01742125392d45f4bfe2807d1e14db9732b4fb --- diff --git a/src/DSBuffer/DSBufferRef.cpp b/src/DSBuffer/DSBufferRef.cpp index 2dce15e..01c38cc 100644 --- a/src/DSBuffer/DSBufferRef.cpp +++ b/src/DSBuffer/DSBufferRef.cpp @@ -22,41 +22,23 @@ */ #include "DSBufferRef.h" -#include "DSBufferRefPrivate.h" #include "DSDebugLog.h" namespace display_server { DSBufferRef::DSBufferRef(std::shared_ptr dsBuffer) - : _d_ptr(std::make_unique(this, dsBuffer)) -{} - -DSBufferRef::~DSBufferRef() -{} - -std::shared_ptr DSBufferRef::refDSBufferGet() -{ - DS_GET_PRIV(DSBufferRef); - - return priv->refDSBufferGet(); -} - -DSBufferRefPrivate::DSBufferRefPrivate(DSBufferRef *p_ptr, std::shared_ptr dsBuffer) - : DSObjectPrivate(p_ptr), - __p_ptr(p_ptr), - __dsBuffer(dsBuffer) + : __dsBuffer(dsBuffer) { __dsBuffer->ref(); } -DSBufferRefPrivate::~DSBufferRefPrivate() +DSBufferRef::~DSBufferRef() { - if (__dsBuffer) - __dsBuffer->unref(); + __dsBuffer->unref(); } -std::shared_ptr DSBufferRefPrivate::refDSBufferGet() +std::shared_ptr DSBufferRef::refDSBufferGet() { return __dsBuffer; } diff --git a/src/DSBuffer/DSBufferRef.h b/src/DSBuffer/DSBufferRef.h index b96d016..a56d38c 100644 --- a/src/DSBuffer/DSBufferRef.h +++ b/src/DSBuffer/DSBufferRef.h @@ -25,22 +25,21 @@ #define __DS_BUFFER_REF_H__ #include -#include #include namespace display_server { -class DSBufferRefPrivate; - -class DSBufferRef : public DSObject +class DSBufferRef { -DS_PIMPL_USE_PRIVATE(DSBufferRef); public: explicit DSBufferRef(std::shared_ptr dsBuffer); virtual ~DSBufferRef(); std::shared_ptr refDSBufferGet(); + +private: + std::shared_ptr __dsBuffer; }; } diff --git a/src/DSBuffer/DSBufferRefPrivate.h b/src/DSBuffer/DSBufferRefPrivate.h deleted file mode 100644 index 40f1fb2..0000000 --- a/src/DSBuffer/DSBufferRefPrivate.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -* Copyright © 2020 Samsung Electronics co., Ltd. All Rights Reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a -* copy of this software and associated documentation files (the "Software"), -* to deal in the Software without restriction, including without limitation -* the rights to use, copy, modify, merge, publish, distribute, sublicense, -* and/or sell copies of the Software, and to permit persons to whom the -* Software is furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice (including the next -* paragraph) shall be included in all copies or substantial portions of the -* Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -* DEALINGS IN THE SOFTWARE. -*/ - -#ifndef __DS_BUFFER_REF_PRIVATE_H__ -#define __DS_BUFFER_REF_PRIVATE_H__ - -#include "DSBufferRef.h" - -namespace display_server -{ - -class DSBufferRefPrivate : public DSObjectPrivate -{ - DS_PIMPL_USE_PUBLIC(DSBufferRef); -public: - DSBufferRefPrivate() = delete; - DSBufferRefPrivate(DSBufferRef *p_ptr, std::shared_ptr dsBuffer); - - ~DSBufferRefPrivate(); - - std::shared_ptr refDSBufferGet(); - -private: - std::shared_ptr __dsBuffer; -}; - -} - -#endif diff --git a/src/meson.build b/src/meson.build index 9ebeb3e..b786585 100644 --- a/src/meson.build +++ b/src/meson.build @@ -9,7 +9,6 @@ libds_srcs = [ 'DSBuffer/DSBufferManagerPrivate.h', 'DSBuffer/DSBufferRef.cpp', 'DSBuffer/DSBufferRef.h', - 'DSBuffer/DSBufferRefPrivate.h', 'DSCallback/DSCallback.h', 'DSCanvas/DSCanvas.cpp', 'DSCompositor/DSCompositor.cpp',