Title: [89153] trunk/Source/_javascript_Core
Revision
89153
Author
[email protected]
Date
2011-06-17 11:58:31 -0700 (Fri, 17 Jun 2011)

Log Message

2011-06-17  Raphael Kubo da Costa  <[email protected]>

        Reviewed by Eric Seidel.

        [EFL] Add some OwnPtr specializations for EFL types.
        For now there are specializations for Ecore_Evas and Evas_Object.
        https://bugs.webkit.org/show_bug.cgi?id=62877

        * wtf/CMakeListsEfl.txt:
        * wtf/OwnPtrCommon.h:
        * wtf/efl/OwnPtrEfl.cpp: Added.
        (WTF::deleteOwnedPtr):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (89152 => 89153)


--- trunk/Source/_javascript_Core/ChangeLog	2011-06-17 18:52:56 UTC (rev 89152)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-06-17 18:58:31 UTC (rev 89153)
@@ -1,3 +1,16 @@
+2011-06-17  Raphael Kubo da Costa  <[email protected]>
+
+        Reviewed by Eric Seidel.
+
+        [EFL] Add some OwnPtr specializations for EFL types.
+        For now there are specializations for Ecore_Evas and Evas_Object.
+        https://bugs.webkit.org/show_bug.cgi?id=62877
+
+        * wtf/CMakeListsEfl.txt:
+        * wtf/OwnPtrCommon.h:
+        * wtf/efl/OwnPtrEfl.cpp: Added.
+        (WTF::deleteOwnedPtr):
+
 2011-06-17  Joone Hur  <[email protected]>
 
         Reviewed by Martin Robinson.

Modified: trunk/Source/_javascript_Core/wtf/CMakeListsEfl.txt (89152 => 89153)


--- trunk/Source/_javascript_Core/wtf/CMakeListsEfl.txt	2011-06-17 18:52:56 UTC (rev 89152)
+++ trunk/Source/_javascript_Core/wtf/CMakeListsEfl.txt	2011-06-17 18:58:31 UTC (rev 89153)
@@ -8,6 +8,7 @@
 
 LIST(APPEND WTF_SOURCES
     efl/MainThreadEfl.cpp
+    efl/OwnPtrEfl.cpp
 
     OSAllocatorPosix.cpp
     ThreadIdentifierDataPthreads.cpp
@@ -39,10 +40,14 @@
 
 LIST(APPEND WTF_LINK_FLAGS
     ${ECORE_LDFLAGS}
+    ${ECORE_EVAS_LDFLAGS}
+    ${EVAS_LDFLAGS}
 )
 
 LIST(APPEND WTF_INCLUDE_DIRECTORIES
     ${ECORE_INCLUDE_DIRS}
+    ${ECORE_EVAS_INCLUDE_DIRS}
+    ${EVAS_INCLUDE_DIRS}
     ${ICU_INCLUDE_DIRS}
     ${_javascript_CORE_DIR}/wtf/unicode/
 )

Modified: trunk/Source/_javascript_Core/wtf/OwnPtrCommon.h (89152 => 89153)


--- trunk/Source/_javascript_Core/wtf/OwnPtrCommon.h	2011-06-17 18:52:56 UTC (rev 89152)
+++ trunk/Source/_javascript_Core/wtf/OwnPtrCommon.h	2011-06-17 18:58:31 UTC (rev 89153)
@@ -50,6 +50,11 @@
 typedef struct IMemSpace IMemSpace;
 #endif
 
+#if PLATFORM(EFL)
+typedef struct _Ecore_Evas Ecore_Evas;
+typedef struct _Evas_Object Evas_Object;
+#endif
+
 namespace WTF {
 
     template <typename T> inline void deleteOwnedPtr(T* ptr)
@@ -79,6 +84,11 @@
     void deleteOwnedPtr(IMemSpace*);
 #endif
 
+#if PLATFORM(EFL)
+    void deleteOwnedPtr(Ecore_Evas*);
+    void deleteOwnedPtr(Evas_Object*);
+#endif
+
 } // namespace WTF
 
 #endif // WTF_OwnPtrCommon_h

Added: trunk/Source/_javascript_Core/wtf/efl/OwnPtrEfl.cpp (0 => 89153)


--- trunk/Source/_javascript_Core/wtf/efl/OwnPtrEfl.cpp	                        (rev 0)
+++ trunk/Source/_javascript_Core/wtf/efl/OwnPtrEfl.cpp	2011-06-17 18:58:31 UTC (rev 89153)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2011 ProFUSION embedded systems
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "OwnPtr.h"
+
+#include <Ecore_Evas.h>
+#include <Evas.h>
+
+namespace WTF {
+
+void deleteOwnedPtr(Ecore_Evas* ptr)
+{
+    if (ptr)
+        ecore_evas_free(ptr);
+}
+
+void deleteOwnedPtr(Evas_Object* ptr)
+{
+    evas_object_del(ptr);
+}
+
+}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to