[BlackBerry]Web Inspector highlight is slow

https://bugs.webkit.org/show_bug.cgi?id=88331

Patch by Konrad Piascik <kpiascik@rim.com> on 2012-06-05
Reviewed by Rob Buis.

Highlight is slow on large pages because of constant repaint calls.
Change to use the accelerated layer highlight all the time.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::renderContents):
* WebCoreSupport/InspectorClientBlackBerry.cpp:
(WebCore::InspectorClientBlackBerry::highlight):
(WebCore::InspectorClientBlackBerry::hideHighlight):
* WebCoreSupport/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::clear):
(WebCore::InspectorOverlay::update):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c712e5c8
......@@ -2448,15 +2448,6 @@ void BackingStorePrivate::renderContents(BlackBerry::Platform::Graphics::Buffer*
// Let WebCore render the page contents into the drawing surface.
m_client->frame()->view()->paintContents(&graphicsContext, untransformedContentsRect);
#if ENABLE(INSPECTOR)
if (m_webPage->d->m_page->inspectorController()->enabled()) {
WebCore::IntPoint scrollPosition = m_client->frame()->view()->scrollPosition();
graphicsContext.translate(scrollPosition.x(), scrollPosition.y());
if (m_webPage->d->m_inspectorOverlay)
m_webPage->d->m_inspectorOverlay->paintWebFrame(graphicsContext);
}
#endif
graphicsContext.restore();
}
......
2012-06-05 Konrad Piascik <kpiascik@rim.com>
[BlackBerry]Web Inspector highlight is slow
https://bugs.webkit.org/show_bug.cgi?id=88331
Reviewed by Rob Buis.
Highlight is slow on large pages because of constant repaint calls.
Change to use the accelerated layer highlight all the time.
* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::renderContents):
* WebCoreSupport/InspectorClientBlackBerry.cpp:
(WebCore::InspectorClientBlackBerry::highlight):
(WebCore::InspectorClientBlackBerry::hideHighlight):
* WebCoreSupport/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::clear):
(WebCore::InspectorOverlay::update):
2012-06-04 Andrew Lo <anlo@rim.com>
[BlackBerry] Split AnimationFrameRateController into its own file
......
......@@ -46,15 +46,11 @@ void InspectorClientBlackBerry::inspectorDestroyed()
void InspectorClientBlackBerry::highlight()
{
m_webPagePrivate->setInspectorOverlayClient(this);
if (!m_webPagePrivate->isAcceleratedCompositingActive())
m_webPagePrivate->mainFrame()->document()->documentElement()->renderer()->repaint(true);
}
void InspectorClientBlackBerry::hideHighlight()
{
m_webPagePrivate->setInspectorOverlayClient(0);
if (!m_webPagePrivate->isAcceleratedCompositingActive())
m_webPagePrivate->mainFrame()->document()->documentElement()->renderer()->repaint(true);
}
void InspectorClientBlackBerry::openInspectorFrontend(InspectorController*)
......
......@@ -77,8 +77,6 @@ InspectorOverlay::~InspectorOverlay() { }
void InspectorOverlay::clear()
{
invalidateWebFrame();
#if USE(ACCELERATED_COMPOSITING)
if (m_overlay) {
m_overlay->removeFromParent();
......@@ -89,12 +87,10 @@ void InspectorOverlay::clear()
void InspectorOverlay::update()
{
invalidateWebFrame();
#if USE(ACCELERATED_COMPOSITING)
if (!m_overlay) {
m_overlay = adoptPtr(new BlackBerry::WebKit::WebOverlay(this));
const IntSize size = m_webPage->viewportSize();
const IntSize size = m_webPage->contentsSize();
m_overlay->setSize(FloatSize(size.width(), size.height()));
m_webPage->m_webPage->addOverlay(m_overlay.get());
}
......@@ -105,24 +101,4 @@ void InspectorOverlay::update()
#endif
}
void InspectorOverlay::paintWebFrame(GraphicsContext& gc)
{
if (!m_webPage->isAcceleratedCompositingActive())
m_client->paintInspectorOverlay(gc);
}
void InspectorOverlay::invalidateWebFrame()
{
// InspectorOverlayClient does the actual painting of the overlay.
// Here we just make sure to invalidate.
if (!m_webPage->isAcceleratedCompositingActive()) {
// FIXME: able to invalidate a smaller rect.
// FIXME: Is it important to just invalidate a smaller rect given that
// this is not on a critical codepath? In order to do so, we'd
// have to take scrolling into account.
const IntSize size = m_webPage->viewportSize();
IntRect damagedRect(0, 0, size.width(), size.height());
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment