From: JungJik Lee Date: Sat, 13 Apr 2013 08:39:52 +0000 (+0900) Subject: Revert "Update tile partially" X-Git-Tag: 2.1_release~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ecd907661d540b6b08a1e022ccd74710cd8cfa9;p=framework%2Fweb%2Fwebkit-efl.git Revert "Update tile partially" [Title] Revert "Update tile partially" [Issue#] N/A [Problem] Drawing images without clipping in StoryAlbum. [Cause] N/A [Solution] Revert the patch. This reverts commit 2f997258449b738de6096d8749c1acfd32f90260. --- diff --git a/Source/WebKit2/WebProcess/WebPage/efl/tizen/PlatformSurfacePoolTizen.cpp b/Source/WebKit2/WebProcess/WebPage/efl/tizen/PlatformSurfacePoolTizen.cpp index c6ce2a4..7051b51 100644 --- a/Source/WebKit2/WebProcess/WebPage/efl/tizen/PlatformSurfacePoolTizen.cpp +++ b/Source/WebKit2/WebProcess/WebPage/efl/tizen/PlatformSurfacePoolTizen.cpp @@ -132,14 +132,6 @@ SharedPlatformSurfaceTizen* PlatformSurfacePoolTizen::acquirePlatformSurface(con return 0; } -SharedPlatformSurfaceTizen* PlatformSurfacePoolTizen::acquirePlatformSurfaceByID(int platformSurfaceId) -{ - PlatformSurfaceMap::iterator foundSurface = m_platformSurfaces.find(platformSurfaceId); - if (foundSurface == m_platformSurfaces.end()) - return 0; - return foundSurface->second->m_SharedPlatformSurfaceTizen.get(); -} - void PlatformSurfacePoolTizen::freePlatformSurfaceByTileID(int tileID) { int platformSurfaceId = 0; diff --git a/Source/WebKit2/WebProcess/WebPage/efl/tizen/PlatformSurfacePoolTizen.h b/Source/WebKit2/WebProcess/WebPage/efl/tizen/PlatformSurfacePoolTizen.h index b5ba35e..2d37190 100644 --- a/Source/WebKit2/WebProcess/WebPage/efl/tizen/PlatformSurfacePoolTizen.h +++ b/Source/WebKit2/WebProcess/WebPage/efl/tizen/PlatformSurfacePoolTizen.h @@ -50,7 +50,6 @@ public : PlatformSurfacePoolTizen(); ~PlatformSurfacePoolTizen(); SharedPlatformSurfaceTizen* acquirePlatformSurface(const WebCore::IntSize&, int tileID); - SharedPlatformSurfaceTizen* acquirePlatformSurfaceByID(int platformSurfaceId); void freePlatformSurface(int platformSurfaceId); void freePlatformSurfaceByTileID(int tileID); void removePlatformSurface(int platformSurfaceId); diff --git a/Source/WebKit2/WebProcess/WebPage/efl/tizen/TiledBackingStoreRemoteTileTizen.cpp b/Source/WebKit2/WebProcess/WebPage/efl/tizen/TiledBackingStoreRemoteTileTizen.cpp index 2f40b2c..27fcb5f 100644 --- a/Source/WebKit2/WebProcess/WebPage/efl/tizen/TiledBackingStoreRemoteTileTizen.cpp +++ b/Source/WebKit2/WebProcess/WebPage/efl/tizen/TiledBackingStoreRemoteTileTizen.cpp @@ -49,13 +49,6 @@ TiledBackingStoreRemoteTileTizen::TiledBackingStoreRemoteTileTizen(TiledBackingS { } -static inline bool needUpdateBackBufferPartially(const IntRect& entireRect, const IntRect& dirtyRect) -{ - if (entireRect.size() != dirtyRect.size()) - return true; - return false; -} - Vector TiledBackingStoreRemoteTileTizen::updateBackBuffer() { if (!isDirty()) @@ -70,7 +63,7 @@ Vector TiledBackingStoreRemoteTileTizen::updateBackBuffer() needToCreateTile = true; } - if (!m_tiledBackingStoreRemoteTileBufferTizen->drawPlatformSurface(m_tiledBackingStore->tileSize(), m_dirtyRect, m_ID)) + if (!m_tiledBackingStoreRemoteTileBufferTizen->drawPlatformSurface(m_tiledBackingStore->tileSize(), m_rect, m_ID)) return Vector(); updateInfo.updateRect = m_rect; @@ -112,58 +105,7 @@ void TiledBackingStoreRemoteTileTizen::review() m_client->createTile(m_ID, updateInfo, m_rect); } -bool TiledBackingStoreRemoteTileBufferTizen::copyPreviousFrame(void* dst, int platformSurfaceID, const IntRect& wholeRect, const IntRect& clipRect) -{ - SharedPlatformSurfaceTizen* backupSurface; - unsigned int offset; - void* src; - - PlatformSurfacePoolTizen* platformSurfacePool = WebProcess::shared().platformSurfacePool(); - if(!platformSurfacePool) - return false; - - backupSurface = platformSurfacePool->acquirePlatformSurfaceByID(platformSurfaceID); - if (!backupSurface) - return false; - - if (!backupSurface->lockSurface()) - return false; - - if (!backupSurface->querySurface((int*)&src)) { - backupSurface->unlockSurface(); - return false; - } - - // upper side - if (clipRect.y() -wholeRect.y() > 0) - memcpy(dst, src, 4 * wholeRect.width() * (clipRect.y() -wholeRect.y())); - - if (wholeRect.width() - clipRect.width() > 0) { - offset = 4 * (clipRect.y() - wholeRect.y()) * wholeRect.width(); - for (int i = 0; i < clipRect.height(); i++) { - // left side - if (clipRect.x() - wholeRect.x() > 0) - memcpy(dst + offset, src + offset, 4 * (clipRect.x() - wholeRect.x())); - - // right side - if (wholeRect.x() + wholeRect.width() - clipRect.x() - clipRect.width() > 0) - memcpy(dst + offset + 4 * (clipRect.x() + clipRect.width() - wholeRect.x()), - src + offset + 4 * (clipRect.x() + clipRect.width() - wholeRect.x()), - 4 * (wholeRect.x() + wholeRect.width() - clipRect.x() - clipRect.width())); - offset += 4 * wholeRect.width(); - } - } - // lower side - if (wholeRect.y() + wholeRect.height() - clipRect.y() - clipRect.height() > 0) { - offset = 4 * wholeRect.width() * (clipRect.y() + clipRect.height() - wholeRect.y()); - memcpy(dst + offset, src + offset, - 4 * wholeRect.width() * (wholeRect.y() + wholeRect.height() - clipRect.y() - clipRect.height())); - } - backupSurface->unlockSurface(); - return true; -} - -bool TiledBackingStoreRemoteTileBufferTizen::drawPlatformSurface(const IntSize& size, const IntRect& dirtyRect, int tileID) +bool TiledBackingStoreRemoteTileBufferTizen::drawPlatformSurface(const IntSize& size, const IntRect& dirty, int tileID) { PlatformSurfacePoolTizen* platformSurfacePool = WebProcess::shared().platformSurfacePool(); if(!platformSurfacePool) @@ -197,12 +139,6 @@ bool TiledBackingStoreRemoteTileBufferTizen::drawPlatformSurface(const IntSize& #endif graphicsContext->clearRect(WebCore::FloatRect(WebCore::FloatPoint(0, 0), sharedPlatformSurface->size())); - IntRect paintRect = m_rect; - if (needUpdateBackBufferPartially(m_rect, dirtyRect) && m_platformSurfaceID > 0) { - if (copyPreviousFrame(m_eglImgData, m_platformSurfaceID, IntRect(m_rect.location(), sharedPlatformSurface->size()), dirtyRect)) - paintRect = dirtyRect; - } - #if ENABLE(TIZEN_RECORDING_SURFACE_SET) if (m_tiledBackingStore->client()->recordingSurfaceSetEnableGet()) { m_tiledBackingStore->client()->tiledBackingStorePaint(graphicsContext.get(), m_rect); @@ -211,7 +147,7 @@ bool TiledBackingStoreRemoteTileBufferTizen::drawPlatformSurface(const IntSize& { 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(paintRect)); + m_tiledBackingStore->client()->tiledBackingStorePaint(graphicsContext.get(), m_tiledBackingStore->mapToContents(dirty)); } m_platformSurfaceID = sharedPlatformSurface->id(); diff --git a/Source/WebKit2/WebProcess/WebPage/efl/tizen/TiledBackingStoreRemoteTileTizen.h b/Source/WebKit2/WebProcess/WebPage/efl/tizen/TiledBackingStoreRemoteTileTizen.h index bedbd49..c039949 100644 --- a/Source/WebKit2/WebProcess/WebPage/efl/tizen/TiledBackingStoreRemoteTileTizen.h +++ b/Source/WebKit2/WebProcess/WebPage/efl/tizen/TiledBackingStoreRemoteTileTizen.h @@ -49,7 +49,6 @@ public: void resize(const WebCore::IntSize& size) { m_rect.setSize(size); } IntSize platformSurfaceSize() { return m_platformSurfaceSize; } private: - bool copyPreviousFrame(void* dst, int platformSurfaceID, const IntRect& wholeRect, const IntRect& clipRect); int m_platformSurfaceID; IntSize m_platformSurfaceSize; unsigned char* m_eglImgData; @@ -73,6 +72,7 @@ public: private: TiledBackingStoreRemoteTileTizen(TiledBackingStoreRemoteTileClient*, WebCore::TiledBackingStore*, const Coordinate&); + OwnPtr m_tiledBackingStoreRemoteTileBufferTizen; };