Title: [140746] trunk/Source/WebKit2
Revision
140746
Author
[email protected]
Date
2013-01-24 16:11:26 -0800 (Thu, 24 Jan 2013)

Log Message

Coordinated Graphics: remove SurfaceUpdateInfo::encode/decode
https://bugs.webkit.org/show_bug.cgi?id=107794

Patch by Jae Hyun Park <[email protected]> on 2013-01-24
Reviewed by Anders Carlsson.

We want to remove the dependency on CoreIPC from SurfaceUpdateInfo
because we will extract Coordinated Graphics from WK2. Since
SurfaceUpdateInfo is only used in Coordinated Graphics, this patch
moves it to Shared/CoordinatedGraphics, and removes CoreIPC
dependency.

No new tests, no change in behavior.

* CMakeLists.txt:
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC):
(CoreIPC::::decode):
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
(WebKit):
* Shared/CoordinatedGraphics/SurfaceUpdateInfo.h: Renamed from Source/WebKit2/Shared/SurfaceUpdateInfo.h.
(WebKit):
(SurfaceUpdateInfo):
(WebKit::SurfaceUpdateInfo::SurfaceUpdateInfo):
* Shared/SurfaceUpdateInfo.cpp: Removed.
* Target.pri:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit2/CMakeLists.txt (140745 => 140746)


--- trunk/Source/WebKit2/CMakeLists.txt	2013-01-25 00:00:45 UTC (rev 140745)
+++ trunk/Source/WebKit2/CMakeLists.txt	2013-01-25 00:11:26 UTC (rev 140746)
@@ -161,7 +161,6 @@
     Shared/SessionState.cpp
     Shared/ShareableBitmap.cpp
     Shared/StatisticsData.cpp
-    Shared/SurfaceUpdateInfo.cpp
     Shared/UpdateInfo.cpp
     Shared/VisitedLinkTable.cpp
     Shared/WebBackForwardListItem.cpp

Modified: trunk/Source/WebKit2/ChangeLog (140745 => 140746)


--- trunk/Source/WebKit2/ChangeLog	2013-01-25 00:00:45 UTC (rev 140745)
+++ trunk/Source/WebKit2/ChangeLog	2013-01-25 00:11:26 UTC (rev 140746)
@@ -1,3 +1,32 @@
+2013-01-24  Jae Hyun Park  <[email protected]>
+
+        Coordinated Graphics: remove SurfaceUpdateInfo::encode/decode
+        https://bugs.webkit.org/show_bug.cgi?id=107794
+
+        Reviewed by Anders Carlsson.
+
+        We want to remove the dependency on CoreIPC from SurfaceUpdateInfo
+        because we will extract Coordinated Graphics from WK2. Since
+        SurfaceUpdateInfo is only used in Coordinated Graphics, this patch
+        moves it to Shared/CoordinatedGraphics, and removes CoreIPC
+        dependency.
+
+        No new tests, no change in behavior.
+
+        * CMakeLists.txt:
+        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
+        (CoreIPC::::encode):
+        (CoreIPC):
+        (CoreIPC::::decode):
+        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
+        (WebKit):
+        * Shared/CoordinatedGraphics/SurfaceUpdateInfo.h: Renamed from Source/WebKit2/Shared/SurfaceUpdateInfo.h.
+        (WebKit):
+        (SurfaceUpdateInfo):
+        (WebKit::SurfaceUpdateInfo::SurfaceUpdateInfo):
+        * Shared/SurfaceUpdateInfo.cpp: Removed.
+        * Target.pri:
+
 2013-01-24  Anders Carlsson  <[email protected]>
 
         More StorageAreaProxy cleanup

Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp (140745 => 140746)


--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp	2013-01-25 00:00:45 UTC (rev 140745)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp	2013-01-25 00:11:26 UTC (rev 140746)
@@ -30,6 +30,7 @@
 
 #if USE(COORDINATED_GRAPHICS)
 #include "CoordinatedLayerInfo.h"
+#include "SurfaceUpdateInfo.h"
 #include "WebCoreArgumentCoders.h"
 #include <WebCore/Animation.h>
 #include <WebCore/Color.h>
@@ -822,6 +823,16 @@
     return SimpleArgumentCoder<CoordinatedLayerInfo>::decode(decoder, coordinatedLayerInfo);
 }
 
+void ArgumentCoder<SurfaceUpdateInfo>::encode(ArgumentEncoder& encoder, const SurfaceUpdateInfo& surfaceUpdateInfo)
+{
+    SimpleArgumentCoder<SurfaceUpdateInfo>::encode(encoder, surfaceUpdateInfo);
+}
+
+bool ArgumentCoder<SurfaceUpdateInfo>::decode(ArgumentDecoder* decoder, SurfaceUpdateInfo& surfaceUpdateInfo)
+{
+    return SimpleArgumentCoder<SurfaceUpdateInfo>::decode(decoder, surfaceUpdateInfo);
+}
+
 } // namespace CoreIPC
 
 #endif // USE(COORDINATED_GRAPHICS)

Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h (140745 => 140746)


--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h	2013-01-25 00:00:45 UTC (rev 140745)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h	2013-01-25 00:11:26 UTC (rev 140746)
@@ -54,6 +54,7 @@
 
 namespace WebKit {
 struct CoordinatedLayerInfo;
+class SurfaceUpdateInfo;
 }
 
 namespace CoreIPC {
@@ -114,6 +115,11 @@
     static bool decode(ArgumentDecoder*, WebKit::CoordinatedLayerInfo&);
 };
 
+template<> struct ArgumentCoder<WebKit::SurfaceUpdateInfo> {
+    static void encode(ArgumentEncoder&, const WebKit::SurfaceUpdateInfo&);
+    static bool decode(ArgumentDecoder*, WebKit::SurfaceUpdateInfo&);
+};
+
 } // namespace CoreIPC
 
 #endif // USE(COORDINATED_GRAPHICS)

Copied: trunk/Source/WebKit2/Shared/CoordinatedGraphics/SurfaceUpdateInfo.h (from rev 140745, trunk/Source/WebKit2/Shared/SurfaceUpdateInfo.h) (0 => 140746)


--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/SurfaceUpdateInfo.h	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/SurfaceUpdateInfo.h	2013-01-25 00:11:26 UTC (rev 140746)
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
+
+ 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 SurfaceUpdateInfo_h
+#define SurfaceUpdateInfo_h
+
+#if USE(COORDINATED_GRAPHICS)
+
+#include <WebCore/IntRect.h>
+#include <wtf/Noncopyable.h>
+
+namespace WebKit {
+
+class SurfaceUpdateInfo {
+    WTF_MAKE_NONCOPYABLE(SurfaceUpdateInfo);
+
+public:
+    SurfaceUpdateInfo() { }
+
+    // The rect to be updated.
+    WebCore::IntRect updateRect;
+
+    // The page scale factor used to render this update.
+    float scaleFactor;
+
+    // The id of the update atlas including the shareable bitmap containing the updates.
+    uint32_t atlasID;
+
+    // The offset in the bitmap where the rendered contents are.
+    WebCore::IntPoint surfaceOffset;
+};
+
+} // namespace WebKit
+
+#endif // USE(COORDINATED_GRAPHICS)
+
+#endif // SurfaceUpdateInfo_h

Deleted: trunk/Source/WebKit2/Shared/SurfaceUpdateInfo.cpp (140745 => 140746)


--- trunk/Source/WebKit2/Shared/SurfaceUpdateInfo.cpp	2013-01-25 00:00:45 UTC (rev 140745)
+++ trunk/Source/WebKit2/Shared/SurfaceUpdateInfo.cpp	2013-01-25 00:11:26 UTC (rev 140746)
@@ -1,49 +0,0 @@
-/*
- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
-
- 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.
- */
-
-#include "config.h"
-#include "SurfaceUpdateInfo.h"
-
-#include "WebCoreArgumentCoders.h"
-
-namespace WebKit {
-
-void SurfaceUpdateInfo::encode(CoreIPC::ArgumentEncoder& encoder) const
-{
-    encoder.encode(updateRect);
-    encoder.encode(scaleFactor);
-    encoder.encode(atlasID);
-    encoder.encode(surfaceOffset);
-}
-
-bool SurfaceUpdateInfo::decode(CoreIPC::ArgumentDecoder* decoder, SurfaceUpdateInfo& result)
-{
-    if (!decoder->decode(result.updateRect))
-        return false;
-    if (!decoder->decode(result.scaleFactor))
-        return false;
-    if (!decoder->decode(result.atlasID))
-        return false;
-    if (!decoder->decode(result.surfaceOffset))
-        return false;
-
-    return true;
-}
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit2/Shared/SurfaceUpdateInfo.h (140745 => 140746)


--- trunk/Source/WebKit2/Shared/SurfaceUpdateInfo.h	2013-01-25 00:00:45 UTC (rev 140745)
+++ trunk/Source/WebKit2/Shared/SurfaceUpdateInfo.h	2013-01-25 00:11:26 UTC (rev 140746)
@@ -1,57 +0,0 @@
-/*
- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
-
- 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 SurfaceUpdateInfo_h
-#define SurfaceUpdateInfo_h
-
-#include <WebCore/IntRect.h>
-#include <wtf/Noncopyable.h>
-
-namespace CoreIPC {
-class ArgumentDecoder;
-class ArgumentEncoder;
-}
-
-namespace WebKit {
-
-class SurfaceUpdateInfo {
-    WTF_MAKE_NONCOPYABLE(SurfaceUpdateInfo);
-
-public:
-    SurfaceUpdateInfo() { }
-
-    void encode(CoreIPC::ArgumentEncoder&) const;
-    static bool decode(CoreIPC::ArgumentDecoder*, SurfaceUpdateInfo&);
-
-    // The rect to be updated.
-    WebCore::IntRect updateRect;
-
-    // The page scale factor used to render this update.
-    float scaleFactor;
-
-    // The id of the update atlas including the shareable bitmap containing the updates.
-    uint32_t atlasID;
-
-    // The offset in the bitmap where the rendered contents are.
-    WebCore::IntPoint surfaceOffset;
-};
-
-} // namespace WebKit
-
-#endif // UpdateInfo_h

Modified: trunk/Source/WebKit2/Target.pri (140745 => 140746)


--- trunk/Source/WebKit2/Target.pri	2013-01-25 00:00:45 UTC (rev 140745)
+++ trunk/Source/WebKit2/Target.pri	2013-01-25 00:11:26 UTC (rev 140746)
@@ -99,7 +99,6 @@
     Shared/SessionState.h \
     Shared/StatisticsData.h \
     Shared/StringPairVector.h \
-    Shared/SurfaceUpdateInfo.h \
     Shared/UpdateInfo.h \
     Shared/UserMessageCoders.h \
     Shared/VisitedLinkTable.h \
@@ -137,6 +136,7 @@
     Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h \
     Shared/CoordinatedGraphics/CoordinatedLayerInfo.h \
     Shared/CoordinatedGraphics/CoordinatedSurface.h \
+    Shared/CoordinatedGraphics/SurfaceUpdateInfo.h \
     Shared/CoordinatedGraphics/WebCoordinatedSurface.h \
     Shared/CoordinatedGraphics/WebCustomFilterProgram.h \
     Shared/Plugins/Netscape/NetscapePluginModule.h \
@@ -474,7 +474,6 @@
     Shared/SecurityOriginData.cpp \
     Shared/SessionState.cpp \
     Shared/StatisticsData.cpp \
-    Shared/SurfaceUpdateInfo.cpp \
     Shared/UpdateInfo.cpp \
     Shared/VisitedLinkTable.cpp \
     Shared/WebBackForwardListItem.cpp \
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to