Changeset 142670 in webkit


Ignore:
Timestamp:
Feb 12, 2013 1:59:18 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] CSS animations stop running during zoom
https://bugs.webkit.org/show_bug.cgi?id=109606

Patch by Andrew Lo <anlo@rim.com> on 2013-02-12
Reviewed by Rob Buis.
Internally reviewed by Jakob Petsovits.

Internal PR 286160.
New BackingStore API for suspending/resuming geometry updates.

This is needed because we want to allow render jobs to continue during
zoom, but we don't want to allow geometry updates during zoom.

Prevent scroll/zoom render jobs from being added to the queue if
the tile is outside the expanded content rect.

  • Api/BackingStore.cpp:

(BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
(BlackBerry::WebKit::BackingStorePrivate::suspendGeometryUpdates):
(WebKit):
(BlackBerry::WebKit::BackingStorePrivate::resumeGeometryUpdates):
(BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
(BlackBerry::WebKit::BackingStore::suspendGeometryUpdates):
(BlackBerry::WebKit::BackingStore::resumeGeometryUpdates):

  • Api/BackingStore.h:
  • Api/BackingStore_p.h:

(BackingStorePrivate):

  • WebKitSupport/RenderQueue.cpp:

(BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):

Location:
trunk/Source/WebKit/blackberry
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/BackingStore.cpp

    r142227 r142670  
    206206    : m_suspendScreenUpdateCounterWebKitThread(0)
    207207    , m_suspendBackingStoreUpdates(0)
     208    , m_suspendGeometryUpdates(0)
    208209    , m_resumeOperation(BackingStore::None)
    209210    , m_suspendScreenUpdatesWebKitThread(true)
     
    302303}
    303304
     305void BackingStorePrivate::suspendGeometryUpdates()
     306{
     307    ASSERT(BlackBerry::Platform::webKitThreadMessageClient()->isCurrentThread());
     308
     309    if (m_suspendGeometryUpdates) {
     310        BBLOG(Platform::LogLevelInfo,
     311            "Backingstore geometry already suspended, increasing suspend counter.");
     312    }
     313
     314    ++m_suspendGeometryUpdates;
     315}
     316
    304317void BackingStorePrivate::suspendScreenUpdates()
    305318{
     
    337350
    338351    atomic_sub(&m_suspendBackingStoreUpdates, 1);
     352
     353    dispatchRenderJob();
     354}
     355
     356
     357void BackingStorePrivate::resumeGeometryUpdates()
     358{
     359    ASSERT(BlackBerry::Platform::webKitThreadMessageClient()->isCurrentThread());
     360
     361    ASSERT(m_suspendGeometryUpdates >= 1);
     362    if (m_suspendGeometryUpdates < 1) {
     363        Platform::logAlways(Platform::LogLevelCritical,
     364            "Call mismatch: Backingstore geometry hasn't been suspended, therefore won't resume!");
     365        return;
     366    }
     367
     368    // Set a flag indicating that we're about to resume geometry updates and
     369    // the tile matrix should be updated as a consequence by the first render
     370    // job that happens after this resumption of geometry updates.
     371    if (m_suspendGeometryUpdates == 1)
     372        setTileMatrixNeedsUpdate();
     373
     374    --m_suspendGeometryUpdates;
    339375
    340376    dispatchRenderJob();
     
    768804    }
    769805
    770     if (m_suspendBackingStoreUpdates)
     806    if (m_suspendBackingStoreUpdates || m_suspendGeometryUpdates)
    771807        return;
    772808
     
    24232459}
    24242460
     2461void BackingStore::suspendGeometryUpdates()
     2462{
     2463    d->suspendGeometryUpdates();
     2464}
     2465
     2466void BackingStore::resumeGeometryUpdates()
     2467{
     2468    d->resumeGeometryUpdates();
     2469}
     2470
    24252471void BackingStore::suspendScreenUpdates()
    24262472{
  • trunk/Source/WebKit/blackberry/Api/BackingStore.h

    r142037 r142670  
    6262    void resumeBackingStoreUpdates();
    6363
     64    void suspendGeometryUpdates();
     65    void resumeGeometryUpdates();
     66
    6467    void suspendScreenUpdates();
    6568    void resumeScreenUpdates(BackingStore::ResumeUpdateOperation);
  • trunk/Source/WebKit/blackberry/Api/BackingStore_p.h

    r142137 r142670  
    136136    void resumeBackingStoreUpdates();
    137137
     138    // Suspends all backingstore geometry updates.
     139    void suspendGeometryUpdates();
     140
     141    // Resumes all backingstore geometry updates.
     142    void resumeGeometryUpdates();
     143
    138144    // Suspends all screen updates so that 'blitVisibleContents' is disabled.
    139145    void suspendScreenUpdates();
     
    346352    unsigned m_suspendScreenUpdateCounterWebKitThread;
    347353    unsigned m_suspendBackingStoreUpdates;
     354    unsigned m_suspendGeometryUpdates;
    348355    BackingStore::ResumeUpdateOperation m_resumeOperation;
    349356
  • trunk/Source/WebKit/blackberry/ChangeLog

    r142664 r142670  
     12013-02-12  Andrew Lo  <anlo@rim.com>
     2
     3        [BlackBerry] CSS animations stop running during zoom
     4        https://bugs.webkit.org/show_bug.cgi?id=109606
     5
     6        Reviewed by Rob Buis.
     7        Internally reviewed by Jakob Petsovits.
     8
     9        Internal PR 286160.
     10        New BackingStore API for suspending/resuming geometry updates.
     11
     12        This is needed because we want to allow render jobs to continue during
     13        zoom, but we don't want to allow geometry updates during zoom.
     14
     15        Prevent scroll/zoom render jobs from being added to the queue if
     16        the tile is outside the expanded content rect.
     17
     18        * Api/BackingStore.cpp:
     19        (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
     20        (BlackBerry::WebKit::BackingStorePrivate::suspendGeometryUpdates):
     21        (WebKit):
     22        (BlackBerry::WebKit::BackingStorePrivate::resumeGeometryUpdates):
     23        (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
     24        (BlackBerry::WebKit::BackingStore::suspendGeometryUpdates):
     25        (BlackBerry::WebKit::BackingStore::resumeGeometryUpdates):
     26        * Api/BackingStore.h:
     27        * Api/BackingStore_p.h:
     28        (BackingStorePrivate):
     29        * WebKitSupport/RenderQueue.cpp:
     30        (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
     31
    1322013-02-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
    233
  • trunk/Source/WebKit/blackberry/WebKitSupport/RenderQueue.cpp

    r138441 r142670  
    345345void RenderQueue::addToScrollZoomQueue(const TileIndexList& addedTiles, TileIndexList* alreadyQueuedTiles)
    346346{
     347    Platform::IntRect contentsRect = m_parent->expandedContentsRect();
    347348    for (size_t i = 0; i < addedTiles.size(); ++i) {
    348349        if (alreadyQueuedTiles->contains(addedTiles[i]))
    349350            continue;
     351
     352        Platform::IntRect tileRect(m_parent->frontState()->originOfTile(addedTiles[i]), m_parent->tileSize());
     353        if (!contentsRect.intersects(tileRect)) {
     354#if DEBUG_RENDER_QUEUE
     355                Platform::logAlways(Platform::LogLevelCritical,
     356                    "RenderQueue::addToScrollZoomQueue tile at %s outside of expanded contents rect %s, ignoring.",
     357                    tileRect.toString().c_str(),
     358                    contentsRect.toString().c_str());
     359#endif
     360            continue;
     361        }
    350362
    351363#if DEBUG_RENDER_QUEUE
Note: See TracChangeset for help on using the changeset viewer.