is inactive.
https://bugs.webkit.org/show_bug.cgi?id=70407
Make sure we only activate the synchronization timer in
PageClientQWidget/PageClientQGraphicsWidget if it's not already active,
otherwise syncLayers may be called redundantly.
Patch by Huang Dongsung <luxtella@company100.net> on 2011-11-15
Reviewed by Noam Rosenthal.
* WebCoreSupport/PageClientQt.cpp:
(WebCore::PageClientQWidget::markForSync):
(WebCore::PageClientQWidget::syncLayers):
(WebCore::PageClientQGraphicsWidget::syncLayers):
(WebCore::PageClientQGraphicsWidget::markForSync):
* WebCoreSupport/PageClientQt.h:
(WebCore::PageClientQGraphicsWidget::PageClientQGraphicsWidget):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100410
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-11-15 Huang Dongsung <luxtella@company100.net>
+
+ [TexMap][Qt] Start PageClientQ[Graphics]Widget::syncTimer only when the syncTimer
+ is inactive.
+ https://bugs.webkit.org/show_bug.cgi?id=70407
+
+ Make sure we only activate the synchronization timer in
+ PageClientQWidget/PageClientQGraphicsWidget if it's not already active,
+ otherwise syncLayers may be called redundantly.
+
+ Reviewed by Noam Rosenthal.
+
+ * WebCoreSupport/PageClientQt.cpp:
+ (WebCore::PageClientQWidget::markForSync):
+ (WebCore::PageClientQWidget::syncLayers):
+ (WebCore::PageClientQGraphicsWidget::syncLayers):
+ (WebCore::PageClientQGraphicsWidget::markForSync):
+ * WebCoreSupport/PageClientQt.h:
+ (WebCore::PageClientQGraphicsWidget::PageClientQGraphicsWidget):
+
2011-11-15 Jochen Eisinger <jochen@chromium.org>
Rename ReferrerPolicy to clarify its meaning
void PageClientQWidget::markForSync(bool scheduleSync)
{
+ if (syncTimer.isActive())
+ return;
syncTimer.startOneShot(0);
}
QWebFramePrivate::core(page->mainFrame())->view()->syncCompositingStateIncludingSubframes();
if (!textureMapperNodeClient)
return;
- if (textureMapperNodeClient->rootNode()->descendantsOrSelfHaveRunningAnimations())
+ if (textureMapperNodeClient->rootNode()->descendantsOrSelfHaveRunningAnimations() && !syncTimer.isActive())
syncTimer.startOneShot(1.0 / 60.0);
update(view->rect());
}
if (!textureMapperNodeClient)
return;
- if (textureMapperNodeClient->rootNode()->descendantsOrSelfHaveRunningAnimations())
+ if (textureMapperNodeClient->rootNode()->descendantsOrSelfHaveRunningAnimations() && !syncTimer.isActive())
syncTimer.startOneShot(1.0 / 60.0);
update(view->boundingRect().toAlignedRect());
- if (!shouldSync)
- return;
- shouldSync = false;
#endif
}
void PageClientQGraphicsWidget::markForSync(bool scheduleSync)
{
- shouldSync = true;
+ if (syncTimer.isActive())
+ return;
syncTimer.startOneShot(0);
}
, viewResizesToContents(false)
#if USE(ACCELERATED_COMPOSITING)
, syncTimer(this, &PageClientQGraphicsWidget::syncLayersTimeout)
- , shouldSync(false)
#endif
, overlay(0)
{
#endif
// we have to flush quite often, so we use a meta-method instead of QTimer::singleShot for putting the event in the queue
Timer<PageClientQGraphicsWidget> syncTimer;
-
- // we need to sync the layers if we get a special call from the WebCore
- // compositor telling us to do so. We'll get that call from ChromeClientQt
- bool shouldSync;
#endif
// the overlay gets instantiated when the root layer is attached, and get deleted when it's detached
QGraphicsItemOverlay* overlay;