Changeset 142837 in webkit


Ignore:
Timestamp:
Feb 13, 2013 5:56:52 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Coordinated Graphics: a long page is scaled vertically while loading.
https://bugs.webkit.org/show_bug.cgi?id=109645

Patch by Huang Dongsung <luxtella@company100.net> on 2013-02-13
Reviewed by Noam Rosenthal.

When loading http://www.w3.org/TR/xpath-datamodel/, Coordinated Graphics draws
vertically scaled contents. It is because there is the difference between the
size of a layer and the size of CoordinatedBackingStore.

Currently, CoordinatedGraphicsScene notifies the size to CoordinatedBackingStore
at the moment of creating, updating and removing a tile. However, it is not
necessary to send tile-related messages when the size of layer is changed.
So this patch resets the size of CoordinatedBackingStore when receiving the
message that is created when the size is changed: SyncLayerState.

There is no current way to reliably test flicker issues.

  • platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp: Add m_pendingSize to set m_size at the moment of flushing. After http://webkit.org/b/108294, m_pendingSize will be removed because the bug makes CoordinatedGraphicsScene execute all messages at the moment of flushing.

(WebCore::CoordinatedBackingStore::setSize):
(WebCore::CoordinatedBackingStore::commitTileOperations):

  • platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:

(CoordinatedBackingStore):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:

(WebCore::CoordinatedGraphicsScene::prepareContentBackingStore):
(WebCore::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
(WebCore::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
(WebCore::CoordinatedGraphicsScene::createTile):
(WebCore::CoordinatedGraphicsScene::removeTile):
(WebCore::CoordinatedGraphicsScene::updateTile):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142834 r142837  
     12013-02-13  Huang Dongsung  <luxtella@company100.net>
     2
     3        Coordinated Graphics: a long page is scaled vertically while loading.
     4        https://bugs.webkit.org/show_bug.cgi?id=109645
     5
     6        Reviewed by Noam Rosenthal.
     7
     8        When loading http://www.w3.org/TR/xpath-datamodel/, Coordinated Graphics draws
     9        vertically scaled contents. It is because there is the difference between the
     10        size of a layer and the size of CoordinatedBackingStore.
     11
     12        Currently, CoordinatedGraphicsScene notifies the size to CoordinatedBackingStore
     13        at the moment of creating, updating and removing a tile. However, it is not
     14        necessary to send tile-related messages when the size of layer is changed.
     15        So this patch resets the size of CoordinatedBackingStore when receiving the
     16        message that is created when the size is changed: SyncLayerState.
     17
     18        There is no current way to reliably test flicker issues.
     19
     20        * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
     21          Add m_pendingSize to set m_size at the moment of flushing.
     22          After http://webkit.org/b/108294, m_pendingSize will be removed
     23          because the bug makes CoordinatedGraphicsScene execute all messages at
     24          the moment of flushing.
     25        (WebCore::CoordinatedBackingStore::setSize):
     26        (WebCore::CoordinatedBackingStore::commitTileOperations):
     27        * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
     28        (CoordinatedBackingStore):
     29        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
     30        (WebCore::CoordinatedGraphicsScene::prepareContentBackingStore):
     31        (WebCore::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
     32        (WebCore::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
     33        (WebCore::CoordinatedGraphicsScene::createTile):
     34        (WebCore::CoordinatedGraphicsScene::removeTile):
     35        (WebCore::CoordinatedGraphicsScene::updateTile):
     36
    1372013-02-13  Kentaro Hara  <haraken@chromium.org>
    238
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp

    r142595 r142837  
    104104void CoordinatedBackingStore::setSize(const FloatSize& size)
    105105{
    106     m_size = size;
     106    m_pendingSize = size;
    107107}
    108108
     
    175175void CoordinatedBackingStore::commitTileOperations(TextureMapper* textureMapper)
    176176{
     177    if (!m_pendingSize.isZero()) {
     178        m_size = m_pendingSize;
     179        m_pendingSize = FloatSize();
     180    }
     181
    177182    HashSet<uint32_t>::iterator tilesToRemoveEnd = m_tilesToRemove.end();
    178183    for (HashSet<uint32_t>::iterator it = m_tilesToRemove.begin(); it != tilesToRemoveEnd; ++it)
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h

    r142366 r142837  
    7878    CoordinatedBackingStoreTileMap m_tiles;
    7979    HashSet<uint32_t> m_tilesToRemove;
     80    // FIXME: m_pendingSize should be removed after the following bug is fixed: https://bugs.webkit.org/show_bug.cgi?id=108294
     81    FloatSize m_pendingSize;
    8082    FloatSize m_size;
    8183    float m_scale;
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp

    r142595 r142837  
    394394
    395395    createBackingStoreIfNeeded(graphicsLayer);
     396    resetBackingStoreSizeToLayerSize(graphicsLayer);
    396397}
    397398
     
    402403
    403404    RefPtr<CoordinatedBackingStore> backingStore(CoordinatedBackingStore::create());
    404     backingStore->setSize(graphicsLayer->size());
    405405    m_backingStores.add(graphicsLayer, backingStore);
    406406    toGraphicsLayerTextureMapper(graphicsLayer)->setBackingStore(backingStore);
     
    421421    ASSERT(backingStore);
    422422    backingStore->setSize(graphicsLayer->size());
     423    m_backingStoresWithPendingBuffers.add(backingStore);
    423424}
    424425
     
    429430    ASSERT(backingStore);
    430431    backingStore->createTile(tileID, scale);
    431     resetBackingStoreSizeToLayerSize(layer);
    432432}
    433433
     
    440440
    441441    backingStore->removeTile(tileID);
    442     resetBackingStoreSizeToLayerSize(layer);
    443442    m_backingStoresWithPendingBuffers.add(backingStore);
    444443}
     
    454453
    455454    backingStore->updateTile(tileID, update.sourceRect, update.tileRect, it->value, update.offset);
    456     resetBackingStoreSizeToLayerSize(layer);
    457455    m_backingStoresWithPendingBuffers.add(backingStore);
    458456}
Note: See TracChangeset for help on using the changeset viewer.