{
}
-static inline bool needUpdateBackBufferPartially(const IntRect& entireRect, const IntRect& dirtyRect)
-{
- if (entireRect.size() != dirtyRect.size())
- return true;
- return false;
-}
-
Vector<IntRect> TiledBackingStoreRemoteTileTizen::updateBackBuffer()
{
if (!isDirty())
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<IntRect>();
updateInfo.updateRect = m_rect;
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)
#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);
{
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();