Changeset 126878 in webkit
- Timestamp:
- Aug 28, 2012, 8:12:58 AM (14 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 6 edited
-
Api/BackingStore.cpp (modified) (10 diffs)
-
Api/BackingStore_p.h (modified) (1 diff)
-
Api/WebPage.cpp (modified) (2 diffs)
-
Api/WebPage_p.h (modified) (1 diff)
-
ChangeLog (modified) (1 diff)
-
WebKitSupport/RenderQueue.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/BackingStore.cpp
r126875 r126878 209 209 , m_preferredTileMatrixDimension(Vertical) 210 210 #if USE(ACCELERATED_COMPOSITING) 211 , m_needsDrawLayersOnCommit(false)212 211 , m_isDirectRenderingAnimationMessageScheduled(false) 213 212 #endif … … 391 390 if (immediate) { 392 391 if (render(rect)) { 393 if (!shouldDirectRenderingToWindow() )392 if (!shouldDirectRenderingToWindow() && !m_webPage->d->commitRootLayerIfNeeded()) 394 393 blitVisibleContents(); 395 394 m_webPage->d->m_client->notifyContentRendered(rect); … … 414 413 415 414 if (immediate) { 416 if (render(rect) && !isSuspended() && !shouldDirectRenderingToWindow() )415 if (render(rect) && !isSuspended() && !shouldDirectRenderingToWindow() && !m_webPage->d->commitRootLayerIfNeeded()) 417 416 blitVisibleContents(); 418 417 } else { … … 524 523 525 524 #if USE(ACCELERATED_COMPOSITING) 526 drawLayersOnCommitIfNeeded();525 m_webPage->d->commitRootLayerIfNeeded(); 527 526 #endif 528 527 … … 1148 1147 1149 1148 if (!BlackBerry::Platform::userInterfaceThreadMessageClient()->isCurrentThread()) { 1150 #if USE(ACCELERATED_COMPOSITING)1151 // The blit will draw accelerated compositing layers if necessary1152 m_needsDrawLayersOnCommit = false;1153 #endif1154 1155 1149 BlackBerry::Platform::userInterfaceThreadMessageClient()->dispatchMessage( 1156 1150 BlackBerry::Platform::createMethodCallMessage( … … 1248 1242 1249 1243 if (!BlackBerry::Platform::userInterfaceThreadMessageClient()->isCurrentThread()) { 1250 #if USE(ACCELERATED_COMPOSITING)1251 // The blit will draw accelerated compositing layers if necessary1252 m_needsDrawLayersOnCommit = false;1253 #endif1254 1255 1244 BlackBerry::Platform::userInterfaceThreadMessageClient()->dispatchMessage( 1256 1245 BlackBerry::Platform::createMethodCallMessage( … … 2289 2278 return; 2290 2279 2291 #if USE(ACCELERATED_COMPOSITING)2292 // When committing the pending accelerated compositing layer changes, it's2293 // necessary to draw the new layer appearance. This is normally done as2294 // part of a blit, but if no blit happens because of this rendering, for2295 // example because we're rendering an offscreen rectangle, someone needs to2296 // catch this flag and make sure those layers get drawn.2297 // This is just a complicated way to do2298 // "if (commitRootLayerIfNeeded()) drawLayersOnCommit();"2299 if (m_webPage->d->commitRootLayerIfNeeded())2300 m_needsDrawLayersOnCommit = true;2301 #endif2302 2303 2280 BlackBerry::Platform::Graphics::Drawable* bufferDrawable = 2304 2281 BlackBerry::Platform::Graphics::lockBufferDrawable(targetBuffer); … … 2602 2579 2603 2580 #if USE(ACCELERATED_COMPOSITING) 2604 bool BackingStorePrivate::drawLayersOnCommitIfNeeded()2605 {2606 // Check if rendering caused a commit and we need to redraw the layers2607 if (!m_needsDrawLayersOnCommit)2608 return false;2609 2610 m_needsDrawLayersOnCommit = false;2611 m_webPage->d->drawLayersOnCommit();2612 2613 return true;2614 }2615 2616 2581 void BackingStorePrivate::drawAndBlendLayersForDirectRendering(const Platform::IntRect& dirtyRect) 2617 2582 { … … 2629 2594 2630 2595 // Check if rendering caused a commit and we need to redraw the layers. 2631 m_needsDrawLayersOnCommit = false;2632 2596 if (WebPageCompositorPrivate* compositor = m_webPage->d->compositor()) 2633 2597 compositor->drawLayers(dstRect, untransformedContentsRect); … … 2649 2613 } 2650 2614 2615 void BackingStorePrivate::didRenderContent(const Platform::IntRect& renderedRect) 2616 { 2617 if (isScrollingOrZooming()) 2618 return; 2619 2620 if (!shouldDirectRenderingToWindow()) { 2621 if (!m_webPage->d->needsOneShotDrawingSynchronization()) 2622 blitVisibleContents(); 2623 } else 2624 invalidateWindow(); 2625 2626 m_webPage->client()->notifyContentRendered(renderedRect); 2627 } 2628 2651 2629 BackingStore::BackingStore(WebPage* webPage, BackingStoreClient* client) 2652 2630 : d(new BackingStorePrivate) -
trunk/Source/WebKit/blackberry/Api/BackingStore_p.h
r126485 r126878 335 335 BlackBerry::Platform::Graphics::Buffer* buffer() const; 336 336 337 void didRenderContent(const Platform::IntRect& renderedRect); 338 337 339 static WebPage* s_currentBackingStoreOwner; 338 340 -
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r126871 r126878 5487 5487 5488 5488 #if USE(ACCELERATED_COMPOSITING) 5489 void WebPagePrivate::drawLayersOnCommit()5490 {5491 if (!Platform::userInterfaceThreadMessageClient()->isCurrentThread()) {5492 // This method will only be called when the layer appearance changed due to5493 // animations. And only if we don't need a one shot drawing sync.5494 ASSERT(!needsOneShotDrawingSynchronization());5495 5496 if (!m_webPage->isVisible())5497 return;5498 5499 m_backingStore->d->willDrawLayersOnCommit();5500 5501 Platform::userInterfaceThreadMessageClient()->dispatchMessage(5502 Platform::createMethodCallMessage(&WebPagePrivate::drawLayersOnCommit, this));5503 return;5504 }5505 5506 #if DEBUG_AC_COMMIT5507 Platform::log(Platform::LogLevelCritical, "%s", WTF_PRETTY_FUNCTION);5508 #endif5509 5510 if (!m_backingStore->d->shouldDirectRenderingToWindow())5511 m_backingStore->d->blitVisibleContents();5512 }5513 5514 5489 void WebPagePrivate::scheduleRootLayerCommit() 5515 5490 { … … 5760 5735 } 5761 5736 5762 // If the web page needs layout, the commit will fail. 5763 // No need to draw the layers if nothing changed. 5764 if (commitRootLayerIfNeeded()) 5765 drawLayersOnCommit(); 5737 commitRootLayerIfNeeded(); 5766 5738 } 5767 5739 -
trunk/Source/WebKit/blackberry/Api/WebPage_p.h
r126768 r126878 410 410 // Thread safe. 411 411 void resetCompositingSurface(); 412 void drawLayersOnCommit(); // Including backing store blit.413 412 414 413 // Compositing thread. -
trunk/Source/WebKit/blackberry/ChangeLog
r126875 r126878 1 2012-08-28 Andrew Lo <anlo@rim.com> 2 3 [BlackBerry] One shot drawing synchronization broken 4 https://bugs.webkit.org/show_bug.cgi?id=95179 5 6 Reviewed by Antonio Gomes. 7 Internally reviewed by Arvid Nilsson. 8 9 Make sure no backing store blits happen during one shot drawing 10 synchronization. 11 Since we always blit during commit now, make sure we don't blit if 12 we commit after a render. 13 We no longer need a deferred blit since we don't commit during renderContents 14 now. Instead, we only commit & blit once after a full render job. 15 16 * Api/BackingStore.cpp: 17 (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): 18 (BlackBerry::WebKit::BackingStorePrivate::repaint): 19 (BlackBerry::WebKit::BackingStorePrivate::slowScroll): 20 (BlackBerry::WebKit::BackingStorePrivate::renderJob): 21 (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): 22 (BlackBerry::WebKit::BackingStorePrivate::blitContents): 23 (BlackBerry::WebKit::BackingStorePrivate::renderContents): 24 (WebKit): 25 (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering): 26 (BlackBerry::WebKit::BackingStorePrivate::didRenderContent): 27 * Api/BackingStore_p.h: 28 (BackingStorePrivate): 29 * Api/WebPage.cpp: 30 (WebKit): 31 (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired): 32 * Api/WebPage_p.h: 33 (WebPagePrivate): 34 * WebKitSupport/RenderQueue.cpp: 35 (BlackBerry::WebKit::RenderQueue::renderAllCurrentRegularRenderJobs): 36 (BlackBerry::WebKit::RenderQueue::renderRegularRenderJob): 37 (BlackBerry::WebKit::RenderQueue::visibleScrollJobsCompleted): 38 1 39 2012-08-28 Parth Patel <parpatel@rim.com> 2 40 -
trunk/Source/WebKit/blackberry/WebKitSupport/RenderQueue.cpp
r126636 r126878 656 656 m_currentRegularRenderJobsBatchUnderPressure = false; 657 657 658 // Update the screen only if we're not scrolling or zooming. 659 if (rendered && !m_parent->isScrollingOrZooming()) { 660 if (!m_parent->shouldDirectRenderingToWindow()) 661 m_parent->blitVisibleContents(); 662 else 663 m_parent->invalidateWindow(); 664 m_parent->m_webPage->client()->notifyContentRendered(renderedRect); 665 } 658 if (rendered) 659 m_parent->didRenderContent(renderedRect); 666 660 667 661 if (m_parent->shouldSuppressNonVisibleRegularRenderJobs() && !regionNotRendered.isEmpty()) … … 811 805 m_currentRegularRenderJobsBatchRegion = Platform::IntRectRegion(); 812 806 m_currentRegularRenderJobsBatchUnderPressure = false; 813 // Update the screen only if we're not scrolling or zooming. 814 if (!m_parent->isScrollingOrZooming()) { 815 if (!m_parent->shouldDirectRenderingToWindow()) 816 m_parent->blitVisibleContents(); 817 else 818 m_parent->invalidateWindow(); 819 m_parent->m_webPage->client()->notifyContentRendered(renderedRect); 820 } 807 m_parent->didRenderContent(renderedRect); 821 808 } 822 809 … … 881 868 ASSERT(m_visibleScrollJobs.empty()); 882 869 m_visibleScrollJobsCompleted.clear(); 883 if (shouldBlit && !m_parent->isScrollingOrZooming()) { 884 if (!m_parent->shouldDirectRenderingToWindow()) 885 m_parent->blitVisibleContents(); 886 else 887 m_parent->invalidateWindow(); 888 m_parent->m_webPage->client()->notifyContentRendered(m_parent->visibleContentsRect()); 889 } 870 if (shouldBlit) 871 m_parent->didRenderContent(m_parent->visibleContentsRect()); 890 872 } 891 873
Note:
See TracChangeset
for help on using the changeset viewer.