Title: [102480] trunk/Source/WebCore
- Revision
- 102480
- Author
- [email protected]
- Date
- 2011-12-09 15:26:38 -0800 (Fri, 09 Dec 2011)
Log Message
[EFL] Add RefPtrEfl specialization for evas_object.
https://bugs.webkit.org/show_bug.cgi?id=73790
Patch by KwangHyuk Kim <[email protected]> on 2011-12-09
Reviewed by Ryosuke Niwa.
As evas_object is also based on reference count, RefPtr is applied for evas_object.
* PlatformEfl.cmake:
* platform/efl/RefPtrEfl.cpp: Added.
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
* platform/efl/RefPtrEfl.h: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (102479 => 102480)
--- trunk/Source/WebCore/ChangeLog 2011-12-09 23:23:23 UTC (rev 102479)
+++ trunk/Source/WebCore/ChangeLog 2011-12-09 23:26:38 UTC (rev 102480)
@@ -1,3 +1,18 @@
+2011-12-09 KwangHyuk Kim <[email protected]>
+
+ [EFL] Add RefPtrEfl specialization for evas_object.
+ https://bugs.webkit.org/show_bug.cgi?id=73790
+
+ Reviewed by Ryosuke Niwa.
+
+ As evas_object is also based on reference count, RefPtr is applied for evas_object.
+
+ * PlatformEfl.cmake:
+ * platform/efl/RefPtrEfl.cpp: Added.
+ (WTF::refIfNotNull):
+ (WTF::derefIfNotNull):
+ * platform/efl/RefPtrEfl.h: Added.
+
2011-12-09 Tony Chang <[email protected]>
REGRESSION(102234): 2-3% layout regression
Modified: trunk/Source/WebCore/PlatformEfl.cmake (102479 => 102480)
--- trunk/Source/WebCore/PlatformEfl.cmake 2011-12-09 23:23:23 UTC (rev 102479)
+++ trunk/Source/WebCore/PlatformEfl.cmake 2011-12-09 23:26:38 UTC (rev 102480)
@@ -43,6 +43,7 @@
platform/efl/PlatformTouchPointEfl.cpp
platform/efl/PlatformWheelEventEfl.cpp
platform/efl/PopupMenuEfl.cpp
+ platform/efl/RefPtrEfl.cpp
platform/efl/RenderThemeEfl.cpp
platform/efl/ScrollViewEfl.cpp
platform/efl/ScrollbarEfl.cpp
Added: trunk/Source/WebCore/platform/efl/RefPtrEfl.cpp (0 => 102480)
--- trunk/Source/WebCore/platform/efl/RefPtrEfl.cpp (rev 0)
+++ trunk/Source/WebCore/platform/efl/RefPtrEfl.cpp 2011-12-09 23:26:38 UTC (rev 102480)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "RefPtrEfl.h"
+
+#include <Evas.h>
+
+namespace WTF {
+
+template<> void refIfNotNull(Evas_Object* ptr)
+{
+ if (LIKELY(!!ptr))
+ evas_object_ref(ptr);
+}
+
+template<> void derefIfNotNull(Evas_Object* ptr)
+{
+ if (LIKELY(!!ptr)) {
+ evas_object_unref(ptr);
+ evas_object_del(ptr);
+ }
+}
+
+}
Added: trunk/Source/WebCore/platform/efl/RefPtrEfl.h (0 => 102480)
--- trunk/Source/WebCore/platform/efl/RefPtrEfl.h (rev 0)
+++ trunk/Source/WebCore/platform/efl/RefPtrEfl.h 2011-12-09 23:26:38 UTC (rev 102480)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef RefPtrEfl_h
+#define RefPtrEfl_h
+
+#include "RefPtr.h"
+
+typedef struct _Evas_Object Evas_Object;
+
+namespace WTF {
+
+template<> void refIfNotNull(Evas_Object* ptr);
+template<> void derefIfNotNull(Evas_Object* ptr);
+
+}
+
+#endif // RefPtrEfl_h
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes