Remove TIZEN_RECORDING_SURFACE_SET and TIZEN_RECORDING_SURFACE_PAINT_THREAD
authorGyuyoung Kim <gyuyoung.kim@samsung.com>
Fri, 12 Apr 2013 01:37:44 +0000 (10:37 +0900)
committerGerrit Code Review <gerrit2@kim11>
Tue, 23 Apr 2013 07:50:35 +0000 (16:50 +0900)
- Those patches are not used anymore

Change-Id: Iddc417c7a59683dcceb571169754e2b9250950b9

29 files changed:
Source/WTF/wtf/Platform.h
Source/WebCore/page/Frame.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/platform/graphics/TiledBackingStore.cpp
Source/WebCore/platform/graphics/TiledBackingStore.h
Source/WebCore/platform/graphics/TiledBackingStoreClient.h
Source/WebKit2/PlatformTizen.cmake
Source/WebKit2/UIProcess/API/C/efl/tizen/WKPageTizen.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.cpp
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/cairo/RecordingSurfaceSetCairo.cpp [deleted file]
Source/WebKit2/WebProcess/WebPage/cairo/RecordingSurfaceSetCairo.h [deleted file]
Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp
Source/WebKit2/WebProcess/WebPage/efl/tizen/TiledBackingStoreRemoteTileTizen.cpp
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h

index 1ec61a5..1a0496c 100644 (file)
@@ -616,16 +616,6 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/
 #define ENABLE_TIZEN_GSTREAMER_VIDEO 1 /* Kwangyong Choi : Fixed media control display when using gstreamer video */
 #define ENABLE_TIZEN_GSTREAMER_AUDIO 1 /* Keonho Kim : Audio session manager for media element */
 
-#if USE(TILED_BACKING_STORE) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
-#define ENABLE_TIZEN_RECORDING_SURFACE_SET 0 /* Hyunki Baik(hyunki.baik@samsung.com) : recording surface features for WK2 */
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-#define ENABLE_TIZEN_RECORDING_SURFACE_PAINT_THREAD 0 /* Hyunki Baik(hyunki.baik@samsung.com), Hyeonji Kim(hyeonji.kim@samsung.com) : enable paint thread for parallelization in WK2 */
-#endif
-#else
-#define ENABLE_TIZEN_RECORDING_SURFACE_SET 0 /* Hyunki Baik(hyunki.baik@samsung.com) : recording surface features for WK2 */
-#define ENABLE_TIZEN_RECORDING_SURFACE_PAINT_THREAD 0 /* Hyunki Baik(hyunki.baik@samsung.com), Hyeonji Kim(hyeonji.kim@samsung.com) : enable paint thread for parallelization in WK2 */
-#endif
-
 #define ENABLE_TIZEN_PREFERENCE 1 /* Eunmi Lee(eunmi15.lee@samsung.com) : for slp specific preferences */
 #define ENABLE_TIZEN_LOAD_REMOTE_IMAGES 1 /* Dongjae Kim(dongjae1.kim@samsung.com) : for tizen remode image load setting */
 
index 5be36a9..3166180 100644 (file)
@@ -255,13 +255,7 @@ namespace WebCore {
         virtual IntRect tiledBackingStoreContentsRect();
         virtual IntRect tiledBackingStoreVisibleRect();
         virtual Color tiledBackingStoreBackgroundColor() const;
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-        virtual bool recordingSurfaceSetEnableGet() { return false; }
-        virtual void dirtyRectInvalidate() {}
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-        virtual void scheduleUpdateTileBuffersAsync() {}
-#endif
-#endif
+
         OwnPtr<TiledBackingStore> m_tiledBackingStore;
 #endif
 
index 5aa15e7..2d8bbb9 100644 (file)
@@ -164,9 +164,6 @@ Page::Page(PageClients& pageClients)
 #endif
     , m_displayID(0)
     , m_isCountingRelevantRepaintedObjects(false)
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    , m_recordingSurfaceSetEnable(false)
-#endif
 #ifndef NDEBUG
     , m_isPainting(false)
 #endif
index 00f3ad9..93a9122 100644 (file)
@@ -351,11 +351,6 @@ namespace WebCore {
         void suspendActiveDOMObjectsAndAnimations();
         void resumeActiveDOMObjectsAndAnimations();
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-        bool m_recordingSurfaceSetEnable;
-        bool recordingSurfaceSetEnableGet() { return m_recordingSurfaceSetEnable; }
-#endif
-
 #ifndef NDEBUG
         void setIsPainting(bool painting) { m_isPainting = painting; }
         bool isPainting() const { return m_isPainting; }
index c4cd2df..2f11f88 100644 (file)
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-#include <wtf/Threading.h>
-#endif
-
 enum LayerTreeAsTextBehaviorFlags {
     LayerTreeAsTextBehaviorNormal = 0,
     LayerTreeAsTextDebug = 1 << 0, // Dump extra debugging info like layer addresses.
@@ -191,11 +187,7 @@ protected:
 // GraphicsLayer is an abstraction for a rendering surface with backing store,
 // which may have associated transformation and animations.
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-class GraphicsLayer : public ThreadSafeRefCounted<GraphicsLayer> {
-#else
 class GraphicsLayer {
-#endif
     WTF_MAKE_NONCOPYABLE(GraphicsLayer); WTF_MAKE_FAST_ALLOCATED;
 public:
     static PassOwnPtr<GraphicsLayer> create(GraphicsLayerClient*);
index 3570358..12e5440 100755 (executable)
@@ -125,63 +125,11 @@ void TiledBackingStore::invalidate(const IntRect& contentsDirtyRect)
         }
     }
 
-#if !ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
     startTileBufferUpdateTimer();
-#else
-    if (m_client->recordingSurfaceSetEnableGet() == false)
-        startTileBufferUpdateTimer();
-#endif
-}
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-void TiledBackingStore::updateTileBuffersBegin()
-{
-    if (!m_client->tiledBackingStoreUpdatesAllowed() || m_contentsFrozen)
-        return;
-
-    m_client->dirtyRectInvalidate();
-
-    m_client->tiledBackingStorePaintBegin();
-    m_dirtyTiles.clear();
-    TileMap::iterator end = m_tiles.end();
-    for (TileMap::iterator it = m_tiles.begin(); it != end; ++it) {
-        if (!it->second->isDirty())
-            continue;
-        m_dirtyTiles.append(it->second);
-    }
-
-    m_contentsInvalid = true;
 }
-#endif
 
 void TiledBackingStore::updateTileBuffers()
 {
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    if (m_client->recordingSurfaceSetEnableGet()) {
-        if (!m_contentsInvalid)
-            return;
-
-        Vector<IntRect> paintedArea;
-        if (m_dirtyTiles.isEmpty()) {
-            m_client->tiledBackingStorePaintEnd(paintedArea);
-            return;
-        }
-
-        // FIXME: In single threaded case, tile back buffers could be updated asynchronously 
-        // one by one and then swapped to front in one go. This would minimize the time spent
-        // blocking on tile updates.
-        unsigned size = m_dirtyTiles.size();
-        for (unsigned n = 0; n < size; ++n) {
-            Vector<IntRect> paintedRects = m_dirtyTiles[n]->updateBackBuffer();
-            paintedArea.append(paintedRects);
-            m_dirtyTiles[n]->swapBackBufferToFront();
-        }
-        m_client->tiledBackingStorePaintEnd(paintedArea);
-
-        return;
-    }
-#endif
-
     if (!m_client->tiledBackingStoreUpdatesAllowed() || m_contentsFrozen)
         return;
 
@@ -464,18 +412,8 @@ void TiledBackingStore::createTiles()
     requiredTileCount -= tilesToCreateCount;
 
     // Paint the content of the newly created tiles or resized tiles.
-#if !ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
     if (tilesToCreateCount || didResizeTiles)
         updateTileBuffers();
-#else
-    if (m_client->recordingSurfaceSetEnableGet()) {
-        if (tilesToCreateCount || didResizeTiles)
-            m_client->scheduleUpdateTileBuffersAsync();
-    } else {
-        if (tilesToCreateCount || didResizeTiles)
-            updateTileBuffers();
-    }
-#endif
 
     // Re-call createTiles on a timer to cover the visible area with the newest shortest distance.
     if (requiredTileCount)
@@ -712,14 +650,7 @@ void TiledBackingStore::startTileBufferUpdateTimer()
 
 void TiledBackingStore::tileBufferUpdateTimerFired(Timer<TiledBackingStore>*)
 {
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    if (m_client->recordingSurfaceSetEnableGet())
-        m_client->scheduleUpdateTileBuffersAsync();
-    else
-        updateTileBuffers();
-#else
     updateTileBuffers();
-#endif
 }
 
 void TiledBackingStore::startBackingStoreUpdateTimer()
index 532566e..f314d13 100644 (file)
@@ -55,11 +55,6 @@ public:
     void setContentsFrozen(bool);
 
     void updateTileBuffers();
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    void startTileBufferUpdateTimer();
-    void updateTileBuffersBegin();
-    void setContentsInvalid(bool invalid) { m_contentsInvalid = invalid; }
-#endif
 
     void invalidate(const IntRect& dirtyRect);
     void paint(GraphicsContext*, const IntRect&);
@@ -92,9 +87,7 @@ public:
     void reviewTiles();
 #endif
 private:
-#if !ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
     void startTileBufferUpdateTimer();
-#endif
     void startBackingStoreUpdateTimer();
 
     void tileBufferUpdateTimerFired(Timer<TiledBackingStore>*);
@@ -140,11 +133,6 @@ private:
     double m_tileCreationDelay;
     float m_coverAreaMultiplier;
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    Vector<RefPtr<Tile> > m_dirtyTiles;
-    bool m_contentsInvalid;
-#endif
-
 #if ENABLE(TIZEN_WEBKIT2_PRE_RENDERING_WITH_DIRECTIVITY)
     float m_trajectoryVectorScalar;
 #endif
index 03423ae..0493571 100755 (executable)
@@ -37,13 +37,6 @@ public:
     virtual IntRect tiledBackingStoreContentsRect() = 0;
     virtual IntRect tiledBackingStoreVisibleRect() = 0;
     virtual Color tiledBackingStoreBackgroundColor() const = 0;
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    virtual bool recordingSurfaceSetEnableGet() = 0;
-    virtual void dirtyRectInvalidate() = 0;
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    virtual void scheduleUpdateTileBuffersAsync() = 0;
-#endif
-#endif
 #if ENABLE(TIZEN_WEBKIT2_DEBUG_BORDERS)
     virtual bool drawTileInfo() const { return false; }
 #endif
index c3b86a6..8ed35d8 100755 (executable)
@@ -147,7 +147,6 @@ LIST(APPEND WebKit2StaticForDebug_SOURCES
     WebProcess/WebCoreSupport/efl/tizen/WebDragClientTizen.cpp
     WebProcess/WebCoreSupport/efl/tizen/WebErrorsTizen.cpp
 
-    WebProcess/WebPage/cairo/RecordingSurfaceSetCairo.cpp
     WebProcess/WebPage/efl/tizen/LinkMagnifier.cpp
     WebProcess/WebPage/efl/tizen/PlatformSurfacePoolTizen.cpp
     WebProcess/WebPage/efl/tizen/ScreenReader.cpp
index 01499fb..31d03ce 100644 (file)
@@ -49,13 +49,6 @@ void WKPageGetSnapshotPdfFile(WKPageRef page, WKSize surfaceSize, WKSize content
 #endif
 }
 
-void WKPageRecordingSurfaceSetEnable(WKPageRef page, bool enable)
-{
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    toImpl(page)->recordingSurfaceSetEnableSet(enable);
-#endif
-}
-
 WKStringRef WKPageContextMenuCopyAbsoluteLinkURLString(WKPageRef page)
 {
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
index 8a64478..48af0a6 100755 (executable)
@@ -3669,16 +3669,6 @@ Ewk_History* ewk_view_history_get(Evas_Object* ewkView)
     return ewkHistoryCreate(WKPageGetBackForwardList(toAPI(page)));
 }
 
-Eina_Bool ewk_view_recording_surface_enable_set(Evas_Object* ewkView, Eina_Bool enable)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-
-    WKPageRecordingSurfaceSetEnable(toAPI(impl->pageProxy.get()), enable);
-
-    return true;
-}
-
 Eina_Bool ewk_view_notification_closed(Evas_Object* ewkView, Eina_List* ewkNotifications)
 {
 #if ENABLE(TIZEN_NOTIFICATIONS)
index bc286e5..d396158 100755 (executable)
@@ -1200,17 +1200,6 @@ EAPI Ewk_Hit_Test* ewk_view_hit_test_new(Evas_Object* o, int x, int y, int hit_t
  */
 EAPI Ewk_History* ewk_view_history_get(Evas_Object* o);
 
-/**
- * Requests to set recording surface.
- *
- * @param o view object to set recording surface
- * @param enable @c EINA_TRUE to enable recording surface
- *        @c EINA_FALSE to disable
- *
- * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
- */
-EINA_DEPRECATED EAPI Eina_Bool ewk_view_recording_surface_enable_set(Evas_Object* o, Eina_Bool enable);
-
 /*
  * Notify that notification is closed.
  *
index 08fbadb..da2456b 100755 (executable)
@@ -884,10 +884,6 @@ public:
 #endif
 
     void printMainFrame();
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-void recordingSurfaceSetEnableSet(bool enable);
-#endif
     
 #if ENABLE(TIZEN_REGISTER_PROTOCOL_HANDLER)
     void registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title);
index 4e858f1..d985c96 100755 (executable)
@@ -415,16 +415,6 @@ WebHitTestResult::Data WebPageProxy::hitTestResultAtPoint(const IntPoint& point,
 }
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-void WebPageProxy::recordingSurfaceSetEnableSet(bool enable)
-{
-    if (!isValid())
-        return;
-
-    process()->send(Messages::WebPage::RecordingSurfaceSetEnableSet(enable), m_pageID, 0);
-}
-#endif
-
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
 void WebPageProxy::hideContextMenu()
 {
index 453ef05..9aabda5 100755 (executable)
@@ -427,11 +427,6 @@ void WebFrameLoaderClient::dispatchDidStartProvisionalLoad()
     if (!webPage)
         return;
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    webPage->drawingArea()->recordingSurfaceSetLoadStartSet();
-    webPage->setRecordingSurfaceLoadStart(true);
-#endif
-
 #if ENABLE(FULLSCREEN_API)
     if (m_frame->coreFrame()->document()->webkitIsFullScreen())
         webPage->fullScreenManager()->close();
@@ -565,11 +560,6 @@ void WebFrameLoaderClient::dispatchDidFinishLoad()
     if (!webPage)
         return;
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    webPage->drawingArea()->recordingSurfaceSetLoadFinishedSet(true);
-    webPage->setRecordingSurfaceLoadFinish(true);
-#endif
-
     RefPtr<APIObject> userData;
 
     // Notify the bundle client.
index 9f9c87d..554f240 100644 (file)
 #include <wtf/Noncopyable.h>
 #include <wtf/PassOwnPtr.h>
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-#include <wtf/Threading.h>
-#endif
-
 namespace CoreIPC {
     class ArgumentDecoder;
     class Connection;
     class MessageID;
 }
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-#include "PlatformContextCairo.h"
-#include <cairo.h>
-#endif
-
 namespace WebCore {
     class GraphicsLayer;
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    class GraphicsContext;
-    class PlatformContextCairo;
-#endif
 }
 
 namespace WebKit {
@@ -67,11 +54,7 @@ struct WebPageCreationParameters;
 struct WindowGeometry;
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-class DrawingArea : public ThreadSafeRefCounted<DrawingArea> {
-#else
 class DrawingArea {
-#endif
     WTF_MAKE_NONCOPYABLE(DrawingArea);
 
 public:
@@ -124,11 +107,6 @@ public:
     virtual void scheduleChildWindowGeometryUpdate(const WindowGeometry&) = 0;
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    virtual void recordingSurfaceSetLoadStartSet() { }
-    virtual void recordingSurfaceSetLoadFinishedSet(bool isFinishLoad) { }
-#endif
-
 #if ENABLE(TIZEN_LAYER_FLUSH_THROTTLING)
     virtual void didStartProgress() {}
     virtual void didFinishProgress() {}
index 5267752..954fd4d 100644 (file)
@@ -99,9 +99,6 @@ LayerTreeCoordinator::LayerTreeCoordinator(WebPage* webPage)
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
     , m_suspendedJavaScript(false)
 #endif
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    , m_compositedContentLayersCount(0)
-#endif
 #if ENABLE(TIZEN_ONESHOT_DRAWING_SYNCHRONIZATION)
     , m_needsOneShotDrawingSynchronization(false)
 #endif
@@ -122,11 +119,6 @@ LayerTreeCoordinator::LayerTreeCoordinator(WebPage* webPage)
     m_layerTreeContext.webLayerID = toWebGraphicsLayer(webRootLayer)->id();
 
     m_nonCompositedContentLayer = GraphicsLayer::create(this);
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    WebGraphicsLayer* webNonCompositedLayer = toWebGraphicsLayer(m_nonCompositedContentLayer.get());
-    webNonCompositedLayer->setNonCompositedLayer(true);
-#endif
-
     toWebGraphicsLayer(m_rootLayer.get())->setWebGraphicsLayerClient(this);
 #ifndef NDEBUG
     m_nonCompositedContentLayer->setName("LayerTreeCoordinator non-composited content");
@@ -204,10 +196,6 @@ void LayerTreeCoordinator::setRootCompositingLayer(WebCore::GraphicsLayer* graph
     // Add the accelerated layer tree hierarchy.
     if (graphicsLayer)
         m_nonCompositedContentLayer->addChild(graphicsLayer);
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    m_compositedContentLayersCount = compositedContentLayersCount(m_nonCompositedContentLayer.get());
-#endif
 }
 
 void LayerTreeCoordinator::invalidate()
@@ -391,10 +379,6 @@ void LayerTreeCoordinator::attachLayer(WebGraphicsLayer* layer)
 
     layer->setContentsScale(m_contentsScale);
     layer->adjustVisibleRect();
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    m_compositedContentLayersCount = compositedContentLayersCount(m_nonCompositedContentLayer.get());
-#endif
 }
 
 void LayerTreeCoordinator::detachLayer(WebGraphicsLayer* layer)
@@ -403,10 +387,6 @@ void LayerTreeCoordinator::detachLayer(WebGraphicsLayer* layer)
     m_shouldSyncFrame = true;
     m_webPage->send(Messages::LayerTreeCoordinatorProxy::DeleteCompositingLayer(layer->id()));
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    m_compositedContentLayersCount = compositedContentLayersCount(m_nonCompositedContentLayer.get());
-#endif
-
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
     m_compositedContentLayers.remove(layer->id());
 #endif
@@ -861,54 +841,6 @@ void LayerTreeCoordinator::removePlatformSurface(int layerID, int platformSurfac
 }
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-bool LayerTreeCoordinator::recordingSurfaceSetEnableGet()
-{
-    return recordingSurfaceAllowed() && m_webPage->recordingSurfaceEnabled();
-}
-
-bool LayerTreeCoordinator::recordingSurfaceSetLoadStartGet()
-{
-    if (m_webPage->recordingSurfaceLoadStart()) {
-        m_webPage->setRecordingSurfaceLoadStart(false);
-        return true;
-    }
-    return false;
-}
-
-bool LayerTreeCoordinator::recordingSurfaceSetLoadFinishedGet()
-{
-    if (m_webPage->recordingSurfaceLoadFinish()) {
-        m_webPage->setRecordingSurfaceLoadFinish(false);
-        return true;
-    }
-    return false;
-}
-
-bool LayerTreeCoordinator::recordingSurfaceAllowed()
-{
-    if (m_compositedContentLayersCount > 0)
-        return false;
-
-    return true;
-}
-
-int LayerTreeCoordinator::compositedContentLayersCount(GraphicsLayer* layer)
-{
-    int count = 0;
-    int contentType = toWebGraphicsLayer(layer)->contentType();
-
-    if (contentType == WebLayerInfo::Canvas3DContentType || contentType == WebLayerInfo::MediaContentType || contentType == WebLayerInfo::Canvas2DContentType)
-        count = 1;
-
-    const Vector<GraphicsLayer*>& childLayers = layer->children();
-    for (int i = 0; i < childLayers.size(); ++i)
-        count += compositedContentLayersCount(childLayers[i]);
-
-    return count;
-}
-#endif
-
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION_ON_UI_SIDE)
 void LayerTreeCoordinator::setVisibleContentsRectAndTrajectoryVectorForLayer(int layerID, const WebCore::IntRect& visibleRect, const WebCore::FloatPoint& trajectoryVector)
 {
index 94ec95e..ce8de42 100644 (file)
@@ -100,12 +100,6 @@ public:
     virtual void scheduleAnimation() OVERRIDE;
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    virtual bool recordingSurfaceSetEnableGet();
-    virtual bool recordingSurfaceSetLoadStartGet();
-    virtual bool recordingSurfaceSetLoadFinishedGet();
-#endif
-
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
     virtual void freePlatformSurface(int layerID, int platformSurfaceId);
     virtual void freePlatformSurfaceByTileID(int tileID);
@@ -158,10 +152,6 @@ private:
     void lockAnimations();
     void unlockAnimations();
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    bool recordingSurfaceAllowed();
-    int compositedContentLayersCount(GraphicsLayer*);
-#endif
 #if ENABLE(TIZEN_LAYER_FLUSH_THROTTLING)
     void setDeferLayerFlush(bool deferLayerFlushEnabled);
     float deferredLayerFlushDelay();
@@ -219,10 +209,6 @@ private:
     HashSet<uint32_t> m_compositedContentCanvas2DLayers;
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    int m_compositedContentLayersCount;
-#endif
-
 #if ENABLE(TIZEN_ONESHOT_DRAWING_SYNCHRONIZATION)
     bool m_needsOneShotDrawingSynchronization;
 #endif
index 05f6c13..4938a37 100755 (executable)
@@ -41,10 +41,6 @@ using namespace WebKit;
 
 namespace WebCore {
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-static const double cSemaphoreWaitTime = std::numeric_limits<double>::max(); // infinite time value for BinarySemaphore
-#endif
-
 static HashMap<WebLayerID, WebGraphicsLayer*>& layerByIDMap()
 {
     static HashMap<WebLayerID, WebGraphicsLayer*> globalMap;
@@ -143,18 +139,6 @@ WebGraphicsLayer::WebGraphicsLayer(GraphicsLayerClient* client)
     m_layerInfo.isRootLayer = false;
     m_layerInfo.contentType = WebKit::WebLayerInfo::HTMLContentType;
 #endif
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    m_recordingSurfaceSet = new RecordingSurfaceSet();
-    m_recordingSurfaceSetStatus = RecordingSurfaceSetInit;
-    m_recordingSurfaceSetIsReplaying = false;
-    m_changedZoomSet = false;
-    m_nonCompositedLayer = false;
-    m_dirtyRects.clear();
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    m_waitForSyncSemaphore.signal();
-#endif
-#endif
 }
 
 WebGraphicsLayer::~WebGraphicsLayer()
@@ -483,151 +467,6 @@ void WebGraphicsLayer::setReplicatedByLayer(GraphicsLayer* layer)
     didChangeLayerState();
 }
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-IntRect WebGraphicsLayer::dirtyUnionRect()
-{
-    return m_dirtyUnionRect;
-}
-
-void WebGraphicsLayer::setDirtyUnionRect(const IntRect& rect)
-{
-    m_dirtyUnionRect = rect;
-}
-
-void WebGraphicsLayer::uniteDirtyUnionRect(const IntRect& rect)
-{
-    m_dirtyUnionRect.unite(rect);
-}
-
-void WebGraphicsLayer::setDirtyRect(const IntRect& rect)
-{
-    IntRect contentRect(0, 0, size().width(), size().height());
-
-    if (rect.isEmpty() || contentRect.isEmpty())
-        return;
-
-    IntRect dirtyRect(intersection(rect, contentRect));
-    unsigned size = m_dirtyRects.size();
-    if (size) {
-        for (int index = size - 1; index > 0; index--) {
-            if (m_dirtyRects[index].contains(dirtyRect))
-                return;
-        }
-    }
-    m_dirtyRects.append(dirtyRect);
-}
-
-void WebGraphicsLayer::dirtyRectInvalidate()
-{
-    unsigned size = m_dirtyRects.size();
-
-    for (size_t index = 0; index < size; index++)
-        m_mainBackingStore->invalidate(m_dirtyRects[index]);
-}
-
-void WebGraphicsLayer::setNonCompositedLayer(bool isNonCompositedLayer)
-{
-    m_nonCompositedLayer = isNonCompositedLayer;
-}
-
-bool WebGraphicsLayer::recordingSurfaceSetEnableGet()
-{
-    if (m_webGraphicsLayerClient)
-        if (m_webGraphicsLayerClient->recordingSurfaceSetEnableGet() && m_nonCompositedLayer)
-            return true;
-
-    return false;
-}
-
-bool WebGraphicsLayer::recordingSurfaceSetLoadStartGet()
-{
-    if (m_webGraphicsLayerClient)
-        return m_webGraphicsLayerClient->recordingSurfaceSetLoadStartGet();
-    return false;
-}
-
-bool WebGraphicsLayer::recordingSurfaceSetLoadFinishedGet()
-{
-    if (m_webGraphicsLayerClient)
-        return m_webGraphicsLayerClient->recordingSurfaceSetLoadFinishedGet();
-    return false;
-}
-
-void WebGraphicsLayer::recordingSurfaceSetRebuild(RecordingSurfaceSet* recordingSurfaceSet, float scale)
-{
-    size_t size = recordingSurfaceSet->size();
-
-    for (size_t index = 0; index < size; index++) {
-        if (recordingSurfaceSet->upToDate(index))
-            continue;
-
-        const WebCore::IntRect& rect = recordingSurfaceSet->bounds(index);
-        cairo_rectangle_t extents = {0, 0, static_cast<int>(rect.width() * scale), static_cast<int>(rect.height() * scale)};
-        RefPtr<cairo_surface_t> recordingSurfaceCairo = cairo_recording_surface_create(CAIRO_CONTENT_COLOR_ALPHA, &extents);
-        RefPtr<cairo_t> recordingContextCairo = cairo_create(recordingSurfaceCairo.get());
-
-        OwnPtr<WebCore::GraphicsContext> graphicsContext = adoptPtr(new GraphicsContext(recordingContextCairo.get()));
-        cairo_save(recordingContextCairo.get());
-        graphicsContext->save();
-        cairo_translate(recordingContextCairo.get(), -static_cast<int>(rect.x() * scale), -static_cast<int>(rect.y() * scale));
-        cairo_scale(recordingContextCairo.get(), scale, scale);
-        graphicsContext->clip(rect);
-        paintGraphicsLayerContents(*graphicsContext.get(), rect);
-        graphicsContext->restore();
-        cairo_restore(recordingContextCairo.get());
-
-        recordingSurfaceSet->setRecordingSurface(index, recordingSurfaceCairo.get(), recordingContextCairo.get(), m_mainBackingStore->tileSize());
-    }
-}
-
-void WebGraphicsLayer::recordingSurfaceSetRecord()
-{
-    IntRect contentRect(0, 0, size().width(), size().height());
-    m_recordingSurfaceSetStatus = RecordingSurfaceSetInit;
-
-    if (recordingSurfaceSetLoadFinishedGet() || recordingSurfaceSetLoadStartGet() || m_changedZoomSet) {
-        m_recordingSurfaceSet->clear();
-        m_recordingSurfaceSet->add(contentRect, m_contentsScale);
-    } else {
-        unsigned size = m_dirtyRects.size();
-        for (unsigned n = 0; n < size; n++)
-            m_recordingSurfaceSet->add(m_dirtyRects[n], m_contentsScale);
-    }
-
-    recordingSurfaceSetRebuild(m_recordingSurfaceSet, m_contentsScale);
-    m_recordingSurfaceSetStatus = RecordingSurfaceSetComplete;
-    m_changedZoomSet = false;
-    m_dirtyRects.clear();
-}
-
-void WebGraphicsLayer::recordingSurfaceSetReplay(WebCore::GraphicsContext& graphicsContext, const WebCore::IntRect& rect)
-{
-    if (m_recordingSurfaceSetStatus == RecordingSurfaceSetComplete) {
-        RefPtr<cairo_t> cairoContext = ((WebCore::PlatformContextCairo *)graphicsContext.platformContext())->cr();
-        m_recordingSurfaceSet->draw(cairoContext.get(), rect);
-    }
-}
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-void WebGraphicsLayer::updateTileBuffers()
-{
-    m_mainBackingStore->updateTileBuffers();
-    m_waitForSyncSemaphore.signal();
-}
-
-void WebGraphicsLayer::scheduleUpdateTileBuffersAsync()
-{
-    if (m_mainBackingStore->contentsFrozen() || !tiledBackingStoreUpdatesAllowed())
-        return;
-
-    m_waitForSyncSemaphore.wait(cSemaphoreWaitTime);
-    m_mainBackingStore->setContentsInvalid(false);
-    m_mainBackingStore->updateTileBuffersBegin();
-    WebProcess::shared().paintThreadWorkQueue()->dispatch(bind(&WebGraphicsLayer::updateTileBuffers, this));
-}
-#endif
-#endif
-
 void WebGraphicsLayer::setNeedsDisplay()
 {
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
@@ -641,22 +480,6 @@ void WebGraphicsLayer::setNeedsDisplay()
 
 void WebGraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect)
 {
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    if (recordingSurfaceSetEnableGet()) {
-        setDirtyRect(IntRect(rect));
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-        if (m_mainBackingStore)
-            m_mainBackingStore->startTileBufferUpdateTimer();
-#else
-        if (m_mainBackingStore)
-            m_mainBackingStore->invalidate(IntRect(rect));
-        didChangeLayerState();
-#endif
-        return;
-    }
-#endif
-
     if (m_mainBackingStore)
         m_mainBackingStore->invalidate(IntRect(rect));
     didChangeLayerState();
@@ -846,14 +669,6 @@ void WebGraphicsLayer::syncCompositingStateForThisLayerOnly()
 
 void WebGraphicsLayer::tiledBackingStorePaintBegin()
 {
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    if (recordingSurfaceSetEnableGet() && m_mainBackingStore) {
-        if (m_dirtyRects.isEmpty())
-            return;
-
-        recordingSurfaceSetRecord();
-    }
-#endif
 }
 
 void WebGraphicsLayer::setRootLayer(bool isRoot)
@@ -864,18 +679,8 @@ void WebGraphicsLayer::setRootLayer(bool isRoot)
 
 void WebGraphicsLayer::setVisibleContentRectTrajectoryVector(const FloatPoint& trajectoryVector)
 {
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    if (recordingSurfaceSetEnableGet())
-        m_waitForSyncSemaphore.wait(cSemaphoreWaitTime);
-#endif
-
     if (m_mainBackingStore)
         m_mainBackingStore->coverWithTilesIfNeeded(trajectoryVector);
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    if (recordingSurfaceSetEnableGet())
-        m_waitForSyncSemaphore.signal();
-#endif
 }
 
 void WebGraphicsLayer::setContentsScale(float scale)
@@ -897,16 +702,6 @@ void WebGraphicsLayer::adjustContentsScale()
     if (!m_mainBackingStore || m_mainBackingStore->contentsScale() == effectiveContentsScale())
         return;
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    if (recordingSurfaceSetEnableGet()) {
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-        m_waitForSyncSemaphore.wait(cSemaphoreWaitTime);
-#endif
-        m_changedZoomSet = true;
-        recordingSurfaceSetRecord();
-    }
-#endif
-
     // Between creating the new backing store and painting the content,
     // we do not want to drop the previous one as that might result in
     // briefly seeing flickering as the old tiles may be dropped before
@@ -917,11 +712,6 @@ void WebGraphicsLayer::adjustContentsScale()
     m_previousBackingStore->removeAllNonVisibleTiles();
 
     createBackingStore();
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    if (recordingSurfaceSetEnableGet())
-        m_waitForSyncSemaphore.signal();
-#endif
 }
 
 void WebGraphicsLayer::createBackingStore()
@@ -945,24 +735,9 @@ void WebGraphicsLayer::tiledBackingStorePaint(GraphicsContext* context, const In
     if (rect.isEmpty())
         return;
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    if (recordingSurfaceSetEnableGet()) {
-        recordingSurfaceSetReplay(*context, rect);
-        return;
-    }
-#endif
-
     paintGraphicsLayerContents(*context, rect);
 }
 
-void WebGraphicsLayer::tiledBackingStorePaintEnd(const Vector<IntRect>& updatedRects)
-{
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    if (recordingSurfaceSetEnableGet())
-        didChangeLayerState();
-#endif
-}
-
 bool WebGraphicsLayer::tiledBackingStoreUpdatesAllowed() const
 {
     if (!m_inUpdateMode)
@@ -1110,17 +885,7 @@ void WebGraphicsLayer::updateContentBuffers()
     if (!m_mainBackingStore)
         createBackingStore();
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    if (recordingSurfaceSetEnableGet()) {
-        m_waitForSyncSemaphore.wait(cSemaphoreWaitTime);
-        m_waitForSyncSemaphore.signal();
-
-        scheduleUpdateTileBuffersAsync();
-    } else
-        m_mainBackingStore->updateTileBuffers();
-#else
     m_mainBackingStore->updateTileBuffers();
-#endif
     m_inUpdateMode = false;
 
     // The previous backing store is kept around to avoid flickering between
@@ -1132,12 +897,6 @@ void WebGraphicsLayer::updateContentBuffers()
 
 void WebGraphicsLayer::purgeBackingStores()
 {
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    if (recordingSurfaceSetEnableGet()) {
-        m_waitForSyncSemaphore.wait(cSemaphoreWaitTime);
-        m_waitForSyncSemaphore.signal();
-    }
-#endif
     m_mainBackingStore.clear();
     m_previousBackingStore.clear();
 
index 59c0e73..044468c 100755 (executable)
 #include <WebCore/RunLoop.h>
 #include <wtf/text/StringHash.h>
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-#include "../WebPage/cairo/RecordingSurfaceSetCairo.h"
-#endif
-
 #if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
 #include <wtf/threads/BinarySemaphore.h>
 #endif
@@ -60,9 +56,6 @@ class TileCutOffInfo;
 }
 
 namespace WebKit {
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-class RecordingSurfaceSet;
-#endif
 
 class WebGraphicsLayerClient {
 public:
@@ -94,12 +87,6 @@ public:
     virtual void syncFixedLayers() = 0;
     virtual PassOwnPtr<WebCore::GraphicsContext> beginContentUpdate(const WebCore::IntSize&, ShareableBitmap::Flags, ShareableSurface::Handle&, WebCore::IntPoint&) = 0;
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    virtual bool recordingSurfaceSetEnableGet() = 0;
-    virtual bool recordingSurfaceSetLoadStartGet() = 0;
-    virtual bool recordingSurfaceSetLoadFinishedGet() = 0;
-#endif
-
 #if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
     virtual bool isGLAccelerationMode() const = 0;
 #endif
@@ -222,11 +209,6 @@ public:
     virtual bool drawTileInfo() const;
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    virtual IntRect dirtyUnionRect();
-    void setNonCompositedLayer(bool);
-#endif
-
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
     void setVisibleRect(const IntRect& rect) { m_visibleRect = rect; }
     void setIsOverflow(const bool b);
@@ -307,37 +289,6 @@ private:
     OwnPtr<WebCore::TiledBackingStore> m_previousBackingStore;
     float m_contentsScale;
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    bool recordingSurfaceSetEnableGet();
-    bool recordingSurfaceSetLoadStartGet();
-    bool recordingSurfaceSetLoadFinishedGet();
-    void recordingSurfaceSetRecord();
-    void recordingSurfaceSetReplay(WebCore::GraphicsContext&, const WebCore::IntRect&);
-    void recordingSurfaceSetRebuild(WebKit::RecordingSurfaceSet*, float scale);
-    void setDirtyUnionRect(const IntRect& rect);
-    void uniteDirtyUnionRect(const IntRect& rect);
-    void setDirtyRect(const IntRect& rect);
-    void dirtyRectInvalidate();
-
-    enum RecordingSurfaceSetStatus {
-        RecordingSurfaceSetInit,
-        RecordingSurfaceSetComplete
-    };
-
-    bool m_nonCompositedLayer;
-    IntRect m_dirtyUnionRect;
-    bool m_changedZoomSet;
-    bool m_recordingSurfaceSetIsReplaying;
-    RecordingSurfaceSetStatus m_recordingSurfaceSetStatus;
-    WebKit::RecordingSurfaceSet* m_recordingSurfaceSet;
-    Vector<WebCore::IntRect> m_dirtyRects;
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    void updateTileBuffers();
-    void scheduleUpdateTileBuffersAsync();
-    WTF::BinarySemaphore m_waitForSyncSemaphore;
-#endif
-#endif
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
     IntRect m_visibleRect;
 #endif
index acd7f5f..4c844f1 100755 (executable)
@@ -298,12 +298,6 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
 #if ENABLE(PAGE_VISIBILITY_API)
     , m_visibilityState(WebCore::PageVisibilityStateVisible)
 #endif
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    , m_recordingSurfaceSetEnable(false)
-    , m_recordingSurfaceSetLoadStart(false)
-    , m_recordingSurfaceSetLoadFinished(false)
-    , m_recordingSurfaceSetSettings(false)
-#endif
 #if ENABLE(TIZEN_SYNC_REQUEST_ANIMATION_FRAME)
     , m_suspendedAnimationController(false)
 #endif
@@ -823,25 +817,9 @@ void WebPage::sendClose()
 
 void WebPage::loadURL(const String& url, const SandboxExtension::Handle& sandboxExtensionHandle)
 {
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    recordingSurfaceSetEnableURL(url);
-#endif
     loadURLRequest(ResourceRequest(KURL(KURL(), url)), sandboxExtensionHandle);
 }
 
- #if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-void WebPage::recordingSurfaceSetEnableURL(const String& url)
-{
-    if (m_recordingSurfaceSetSettings && strstr(url.utf8().data(), "bubblemark.com")) {
-        m_recordingSurfaceSetEnable = true;
-        m_page->m_recordingSurfaceSetEnable = true;
-    } else {
-        m_recordingSurfaceSetEnable = false;
-        m_page->m_recordingSurfaceSetEnable = false;
-    }
-}
-#endif
-
 void WebPage::loadURLRequest(const ResourceRequest& request, const SandboxExtension::Handle& sandboxExtensionHandle)
 {
     SendStopResponsivenessTimer stopper(this);
index aa35650..0466ca4 100755 (executable)
@@ -313,18 +313,6 @@ public:
 
     void drawPageOverlay(WebCore::GraphicsContext&, const WebCore::IntRect&);
     void layoutIfNeeded();
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    void recordingSurfaceSetEnableSet(bool enable);
-    void recordingSurfaceSetEnableURL(const String&);
-
-    bool recordingSurfaceEnabled() { return m_recordingSurfaceSetEnable; }
-
-    void setRecordingSurfaceLoadStart(bool enable) { m_recordingSurfaceSetLoadStart = enable; }
-    bool recordingSurfaceLoadStart() { return m_recordingSurfaceSetLoadStart; }
-
-    void setRecordingSurfaceLoadFinish(bool enable) { m_recordingSurfaceSetLoadFinished = enable; }
-    bool recordingSurfaceLoadFinish() { return m_recordingSurfaceSetLoadFinished; }
-#endif
 
     // -- Called from WebCore clients.
 #if PLATFORM(MAC)
@@ -1129,12 +1117,6 @@ private:
 #if ENABLE(PAGE_VISIBILITY_API)
     WebCore::PageVisibilityState m_visibilityState;
 #endif
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    bool m_recordingSurfaceSetEnable;
-    bool m_recordingSurfaceSetLoadStart;
-    bool m_recordingSurfaceSetLoadFinished;
-    bool m_recordingSurfaceSetSettings;
-#endif
 #if ENABLE(TIZEN_SYNC_REQUEST_ANIMATION_FRAME)
     bool m_suspendedAnimationController;
 #endif
index b0abe26..4b376c3 100755 (executable)
@@ -373,10 +373,6 @@ messages -> WebPage {
     GetFocusedInputElementDataList() -> (Vector<WTF::String> options)
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    RecordingSurfaceSetEnableSet(bool enable)
-#endif
-
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
     SelectClosestWord(WebCore::IntPoint point, bool isStartedTextSelectionFromOutside) -> (bool result)
     SetLeftSelection(WebCore::IntPoint point) -> (bool result)
diff --git a/Source/WebKit2/WebProcess/WebPage/cairo/RecordingSurfaceSetCairo.cpp b/Source/WebKit2/WebProcess/WebPage/cairo/RecordingSurfaceSetCairo.cpp
deleted file mode 100644 (file)
index 92d35e3..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-   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.
-*/
-
-#include "config.h"
-#include "RecordingSurfaceSetCairo.h"
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-
-using namespace WebCore;
-
-namespace WebKit {
-
-static const float maxAdditionalArea = 0.65; // Limit the additional Recording surfaces area
-static const int maxAdditionalRecordingSurfaces = 32; // Limit the maximum number of Recording surfaces
-
-RecordingSurfaceSet::RecordingSurfaceSet()
-{
-    m_baseArea = m_additionalArea = 0;
-}
-
-RecordingSurfaceSet::~RecordingSurfaceSet()
-{
-    clear();
-}
-
-void RecordingSurfaceSet::add(const WebCore::IntRect& rect, const float scale)
-{
-    bool makeNewBase = false;
-    RecordingSurface* first = m_recordingSurfaces.begin();
-    RecordingSurface* last = m_recordingSurfaces.end();
-
-    if (!m_recordingSurfaces.size())
-        makeNewBase = true;
-
-    WebCore::IntRect area = rect;
-    for (RecordingSurface* working = first; working != last; working++) {
-        bool remove = false;
-
-        if (!working->m_base && area.intersects(working->m_area)) {
-            WebCore::IntRect intersectRect = area;
-            intersectRect.intersect(working->m_area);
-            if (working->m_area.width() * working->m_area.height() * maxAdditionalArea < intersectRect.width() * intersectRect.height())
-                remove = true;
-        }
-
-        if (working->m_base) {
-            WebCore::IntRect baseArea = working->m_area;
-            if (area.contains(baseArea)) {
-                remove = true;
-                makeNewBase = true;
-            }
-        }
-
-        if (remove) {
-            WebCore::IntRect currentArea = working->m_area;
-            if (working->m_base)
-                m_baseArea -= currentArea.width() * currentArea.height();
-            else
-                m_additionalArea -= currentArea.width() * currentArea.height();
-
-            area.unite(currentArea);
-            working->m_area = IntRect();
-
-            cairo_surface_destroy(working->m_recordingSurface);
-            cairo_destroy(working->m_recordingContext);
-            working->m_recordingSurface = 0;
-            working->m_recordingContext = 0;
-        }
-    }
-
-    RecordingSurface recordingSurface = {area, IntSize(0, 0), 0, 0, scale, makeNewBase};
-    m_recordingSurfaces.append(recordingSurface);
-
-    if (makeNewBase)
-        m_baseArea += area.width() * area.height();
-    else
-        m_additionalArea += area.width() * area.height();
-
-    last = m_recordingSurfaces.end();
-    first = m_recordingSurfaces.begin();
-
-    if ((last - first > maxAdditionalRecordingSurfaces) || (m_baseArea > 0 && (m_baseArea * maxAdditionalArea <= m_additionalArea))) {
-        for (RecordingSurface* working = m_recordingSurfaces.begin(); working != m_recordingSurfaces.end(); working++) {
-            if (!working->m_base)
-                working->m_area = IntRect();
-
-            cairo_surface_destroy(working->m_recordingSurface);
-            cairo_destroy(working->m_recordingContext);
-            working->m_recordingSurface = 0;
-            working->m_recordingContext = 0;
-        }
-        m_additionalArea = 0;
-    }
-
-    RecordingSurface* list = first;
-    for (RecordingSurface* working = first; working != last; working++) {
-         if (working && working->m_area.isEmpty())
-            continue;
-        *list++ = *working;
-    }
-    m_recordingSurfaces.shrink(list - first);
-}
-
-void RecordingSurfaceSet::add(const RecordingSurface* temp)
-{
-    RecordingSurface recordingSurface = *temp;
-    m_recordingSurfaces.append(recordingSurface);
-}
-
-void RecordingSurfaceSet::clear()
-{
-    RecordingSurface* last = m_recordingSurfaces.end();
-    for (RecordingSurface* working = m_recordingSurfaces.begin(); working != last; working++) {
-        if (working->m_recordingSurface) {
-            cairo_surface_destroy(working->m_recordingSurface);
-            cairo_destroy(working->m_recordingContext);
-        }
-    }
-    m_recordingSurfaces.clear();
-    m_baseArea = m_additionalArea = 0;
-}
-
-bool RecordingSurfaceSet::draw(cairo_t* cairoContext, const WebCore::IntRect& rect)
-{
-    RecordingSurface* first = m_recordingSurfaces.begin();
-    RecordingSurface* last = m_recordingSurfaces.end();
-    RecordingSurface* working;
-    float scale;
-
-    for (working = last; working != first; ) {
-        --working;
-        scale = working->m_scale;
-
-        WebCore::IntRect scaledRect(static_cast<int>(working->m_area.x() * scale), static_cast<int>(working->m_area.y() * scale), static_cast<int>(working->m_area.width() * scale), static_cast<int>(working->m_area.height() * scale));
-        if (scaledRect.contains(rect)) {
-            first = working;
-            break;
-        }
-    }
-
-    for (working = first; working < last; working++) {
-        cairo_save(cairoContext);
-        scale = working->m_scale;
-
-        WebCore::IntRect scaledRect(static_cast<int>(working->m_area.x() * scale), static_cast<int>(working->m_area.y() * scale), static_cast<int>(working->m_area.width() * scale), static_cast<int>(working->m_area.height() * scale));
-        WebCore::IntRect intersectRect = scaledRect;
-
-        intersectRect.intersect(rect);
-
-        if (intersectRect.isEmpty())
-            continue;
-
-        cairo_set_operator(cairoContext, CAIRO_OPERATOR_SOURCE);
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
-        cairo_translate(cairoContext, -((intersectRect.x() - scaledRect.x())) + (intersectRect.x() % working->m_tileSize.width()), -((intersectRect.y() - scaledRect.y())) + (intersectRect.y() % working->m_tileSize.height()));
-#else
-        cairo_translate(cairoContext, -((intersectRect.x() - scaledRect.x())), -((intersectRect.y() - scaledRect.y())));
-#endif
-        cairo_rectangle(cairoContext, intersectRect.x() - scaledRect.x(), intersectRect.y() - scaledRect.y(), intersectRect.width(), intersectRect.height());
-        cairo_clip(cairoContext);
-        cairo_set_source_surface(cairoContext, working->m_recordingSurface, 0, 0);
-        cairo_paint(cairoContext);
-        cairo_restore(cairoContext);
-    }
-    return true;
-}
-
-void RecordingSurfaceSet::setRecordingSurface(size_t index, cairo_surface_t* recordingSurfaceCairo, cairo_t* recordingContextCairo, WebCore::IntSize tileSize)
-{
-    m_recordingSurfaces[index].m_recordingSurface = recordingSurfaceCairo;
-    m_recordingSurfaces[index].m_recordingContext = recordingContextCairo;
-    m_recordingSurfaces[index].m_tileSize = tileSize;
-}
-
-} // namespace WebKit
-
-#endif
diff --git a/Source/WebKit2/WebProcess/WebPage/cairo/RecordingSurfaceSetCairo.h b/Source/WebKit2/WebProcess/WebPage/cairo/RecordingSurfaceSetCairo.h
deleted file mode 100644 (file)
index e86ca6e..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-   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 RecordingSurfaceSetCairo_h
-#define RecordingSurfaceSetCairo_h
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-
-#include <WebCore/Region.h>
-#include <cairo.h>
-
-namespace WebCore {
-class Region;
-class IntRect;
-class IntSize;
-}
-
-namespace WebKit {
-
-class RecordingSurfaceSet {
-
-public:
-    RecordingSurfaceSet();
-    ~RecordingSurfaceSet();
-    void add(const WebCore::IntRect&, const float scale);
-    bool draw(cairo_t* cairoContext, const WebCore::IntRect&);
-    void clear();
-    void setRecordingSurface(size_t, cairo_surface_t* recordingSurfaceCairo, cairo_t* recordingContextCairo, WebCore::IntSize tileSize);
-    const WebCore::IntRect& bounds(size_t i) const { return m_recordingSurfaces[i].m_area; }
-    bool upToDate(size_t i) const { return m_recordingSurfaces[i].m_recordingSurface != 0; }
-    size_t size() const { return m_recordingSurfaces.size(); }
-
-private:
-    struct RecordingSurface {
-        WebCore::IntRect m_area;
-        WebCore::IntSize m_tileSize;
-        cairo_surface_t* m_recordingSurface;
-        cairo_t* m_recordingContext;
-        float m_scale;
-        bool m_base : 8;
-    };
-
-    float m_baseArea;
-    float m_additionalArea;
-    void add(const RecordingSurface* temp);
-    WTF::Vector<RecordingSurface> m_recordingSurfaces;
-};
-
-} // namespace WebKit
-#endif
-#endif
index 383c515..383049d 100755 (executable)
@@ -967,13 +967,6 @@ void WebPage::setStorageQuotaBytes(uint32_t quota)
 }
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-void WebPage::recordingSurfaceSetEnableSet(bool enable)
-{
-    m_recordingSurfaceSetSettings = enable;
-}
-#endif
-
 #if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
 void WebPage::setClipboardDataForPaste(const String& data, const String& type)
 {
index 27fcb5f..106e0bc 100644 (file)
@@ -139,16 +139,9 @@ bool TiledBackingStoreRemoteTileBufferTizen::drawPlatformSurface(const IntSize&
 #endif
     graphicsContext->clearRect(WebCore::FloatRect(WebCore::FloatPoint(0, 0), sharedPlatformSurface->size()));
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    if (m_tiledBackingStore->client()->recordingSurfaceSetEnableGet()) {
-        m_tiledBackingStore->client()->tiledBackingStorePaint(graphicsContext.get(), m_rect);
-    } else
-#endif
-    {
-        graphicsContext->translate(-m_rect.x(), -m_rect.y());
-        graphicsContext->scale(FloatSize(m_tiledBackingStore->contentsScale(), m_tiledBackingStore->contentsScale()));
-        m_tiledBackingStore->client()->tiledBackingStorePaint(graphicsContext.get(), m_tiledBackingStore->mapToContents(dirty));
-    }
+    graphicsContext->translate(-m_rect.x(), -m_rect.y());
+    graphicsContext->scale(FloatSize(m_tiledBackingStore->contentsScale(), m_tiledBackingStore->contentsScale()));
+    m_tiledBackingStore->client()->tiledBackingStorePaint(graphicsContext.get(), m_tiledBackingStore->mapToContents(dirty));
 
     m_platformSurfaceID = sharedPlatformSurface->id();
     m_platformSurfaceSize = sharedPlatformSurface->size();
index 5e9accd..86f9711 100644 (file)
@@ -240,10 +240,6 @@ void WebProcess::initialize(CoreIPC::Connection::Identifier serverIdentifier, Ru
     connection()->setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(true);
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    m_paintThreadWorkQueue = new WorkQueue("PaintThreadWorkQueue");
-#endif
-
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
     m_platformSurfacePool = adoptPtr(new PlatformSurfacePoolTizen());
 #endif
index dcb9ddd..259f676 100755 (executable)
@@ -188,10 +188,6 @@ public:
     WebSoupRequestManager& soupRequestManager() { return m_soupRequestManager; }
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    WorkQueue* paintThreadWorkQueue() const { return m_paintThreadWorkQueue; }
-#endif
-
 #if ENABLE(TIZEN_SOUP_CACHE_DIRECTORY_SET)
     void setSoupDataDirectory(const String& soupDataDirectory);
 #endif
@@ -364,9 +360,6 @@ private:
     QNetworkAccessManager* m_networkAccessManager;
 #endif
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    WorkQueue* m_paintThreadWorkQueue;
-#endif
     HashMap<uint64_t, WebFrame*> m_frameMap;
 
     HashSet<String, CaseFoldingHash> m_mimeTypesWithCustomRepresentations;