[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 13:53:44 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 514b0e3a334b1233b4b0d11aac6d4bd3487855ed
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 28 23:04:48 2010 +0000
2010-09-28 Nat Duca <nduca at chromium.org>
Reviewed by James Robinson.
[chromium] invalidateRootLayerRect needs to schedule compositor
https://bugs.webkit.org/show_bug.cgi?id=46219
Update comments on LayerChromium commit/display functions to clarify
their limitations. Remove unused dirtying logic from
LayerRendererChromium.
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setNeedsCommit):
(WebCore::LayerChromium::setNeedsDisplay):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::present):
* platform/graphics/chromium/LayerRendererChromium.h:
2010-09-28 Nat Duca <nduca at chromium.org>
Reviewed by James Robinson.
[chromium] invalidateRootLayerRect needs to schedule compositor
https://bugs.webkit.org/show_bug.cgi?id=46219
Make sure setRootLayerNedsDisplay is called by root invalidation.
To avoid confusion about root-layer versus non-root-layer
behavior, move the root layer damage state to the WebView.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setRootLayerNeedsDisplay):
(WebKit::WebViewImpl::scrollRootLayerRect):
(WebKit::WebViewImpl::invalidateRootLayerRect):
(WebKit::WebViewImpl::doComposite):
* src/WebViewImpl.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9aea5f7..8f09145 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-28 Nat Duca <nduca at chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] invalidateRootLayerRect needs to schedule compositor
+ https://bugs.webkit.org/show_bug.cgi?id=46219
+
+ Update comments on LayerChromium commit/display functions to clarify
+ their limitations. Remove unused dirtying logic from
+ LayerRendererChromium.
+
+ * platform/graphics/chromium/LayerChromium.cpp:
+ (WebCore::LayerChromium::setNeedsCommit):
+ (WebCore::LayerChromium::setNeedsDisplay):
+ * platform/graphics/chromium/LayerRendererChromium.cpp:
+ (WebCore::LayerRendererChromium::LayerRendererChromium):
+ (WebCore::LayerRendererChromium::present):
+ * platform/graphics/chromium/LayerRendererChromium.h:
+
2010-09-28 Xiaomei Ji <xji at chromium.org>
Reviewed by David Levin.
diff --git a/WebCore/platform/graphics/chromium/LayerChromium.cpp b/WebCore/platform/graphics/chromium/LayerChromium.cpp
index 98ba3f0..5dba58d 100644
--- a/WebCore/platform/graphics/chromium/LayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/LayerChromium.cpp
@@ -221,9 +221,10 @@ unsigned LayerChromium::createShaderProgram(GraphicsContext3D* context, const ch
void LayerChromium::setNeedsCommit()
{
- // Call notifySyncRequired(), which in this implementation plumbs through to
+ // Call notifySyncRequired(), which for non-root layers plumbs through to
// call setRootLayerNeedsDisplay() on the WebView, which will cause LayerRendererChromium
// to render a frame.
+ // This function has no effect on root layers.
if (m_owner)
m_owner->notifySyncRequired();
}
@@ -349,8 +350,9 @@ LayerChromium* LayerChromium::superlayer() const
void LayerChromium::setNeedsDisplay(const FloatRect& dirtyRect)
{
- // Simply mark the contents as dirty. The actual redraw will
- // happen when it's time to do the compositing.
+ // Simply mark the contents as dirty. For non-root layers, the call to
+ // setNeedsCommit will schedule a fresh compositing pass.
+ // For the root layer, setNeedsCommit has no effect.
m_contentsDirty = true;
m_dirtyRect.unite(dirtyRect);
diff --git a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
index 66cb0f7..c4031e5 100644
--- a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
+++ b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
@@ -91,7 +91,6 @@ LayerRendererChromium::LayerRendererChromium(PassOwnPtr<GraphicsContext3D> conte
, m_rootLayerTextureHeight(0)
, m_scrollShaderProgram(0)
, m_rootLayer(0)
- , m_needsDisplay(false)
, m_scrollPosition(IntPoint(-1, -1))
, m_currentShader(0)
, m_context(context)
@@ -346,7 +345,6 @@ void LayerRendererChromium::present()
// Note that currently this has the same effect as swapBuffers; we should
// consider exposing a different entry point on GraphicsContext3D.
m_context->prepareTexture();
- m_needsDisplay = false;
}
void LayerRendererChromium::getFramebufferPixels(void *pixels, const IntRect& rect)
diff --git a/WebCore/platform/graphics/chromium/LayerRendererChromium.h b/WebCore/platform/graphics/chromium/LayerRendererChromium.h
index 9179d5e..b714584 100644
--- a/WebCore/platform/graphics/chromium/LayerRendererChromium.h
+++ b/WebCore/platform/graphics/chromium/LayerRendererChromium.h
@@ -84,8 +84,6 @@ public:
void setRootLayer(PassRefPtr<LayerChromium> layer) { m_rootLayer = layer; }
LayerChromium* rootLayer() { return m_rootLayer.get(); }
- void setNeedsDisplay() { m_needsDisplay = true; }
-
bool hardwareCompositing() const { return m_hardwareCompositing; }
void setRootLayerCanvasSize(const IntSize&);
@@ -144,7 +142,6 @@ private:
RefPtr<LayerChromium> m_rootLayer;
- bool m_needsDisplay;
IntPoint m_scrollPosition;
bool m_hardwareCompositing;
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 6da1f30..ecf4502 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,21 @@
+2010-09-28 Nat Duca <nduca at chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] invalidateRootLayerRect needs to schedule compositor
+ https://bugs.webkit.org/show_bug.cgi?id=46219
+
+ Make sure setRootLayerNedsDisplay is called by root invalidation.
+ To avoid confusion about root-layer versus non-root-layer
+ behavior, move the root layer damage state to the WebView.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setRootLayerNeedsDisplay):
+ (WebKit::WebViewImpl::scrollRootLayerRect):
+ (WebKit::WebViewImpl::invalidateRootLayerRect):
+ (WebKit::WebViewImpl::doComposite):
+ * src/WebViewImpl.h:
+
2010-09-28 Jenn Braithwaite <jennb at chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index b12a7c8..f5b3ac0 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -2201,8 +2201,6 @@ void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer)
void WebViewImpl::setRootLayerNeedsDisplay()
{
- if (m_layerRenderer)
- m_layerRenderer->setNeedsDisplay();
m_client->scheduleComposite();
// FIXME: To avoid breaking the downstream Chrome render_widget while downstream
// changes land, we also have to pass a 1x1 invalidate up to the client
@@ -2242,7 +2240,7 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
// rects allows us to intermix invalidates with scrolls.
IntRect damagedContentsRect;
if (scrollDelta.width()) {
- float dx = static_cast<float>(scrollDelta.width());
+ int dx = scrollDelta.width();
damagedContentsRect.setY(contentRect.y());
damagedContentsRect.setHeight(contentRect.height());
if (dx > 0) {
@@ -2253,7 +2251,7 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
damagedContentsRect.setWidth(-dx);
}
} else {
- float dy = static_cast<float>(scrollDelta.height());
+ int dy = scrollDelta.height();
damagedContentsRect.setX(contentRect.x());
damagedContentsRect.setWidth(contentRect.width());
if (dy > 0) {
@@ -2265,7 +2263,7 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
}
}
- m_scrollDamage.unite(damagedContentsRect);
+ m_rootLayerScrollDamage.unite(damagedContentsRect);
setRootLayerNeedsDisplay();
}
@@ -2284,10 +2282,12 @@ void WebViewImpl::invalidateRootLayerRect(const IntRect& rect)
// rect is in viewport space. Convert to content space
// so that invalidations and scroll invalidations play well with one-another.
- FloatRect contentRect = view->windowToContents(rect);
+ IntRect contentRect = view->windowToContents(rect);
- // FIXME: add a smarter damage aggregation logic? Right now, LayerChromium does simple union-ing.
- m_layerRenderer->rootLayer()->setNeedsDisplay(contentRect);
+ // FIXME: add a smarter damage aggregation logic and/or unify with
+ // LayerChromium's damage logic
+ m_rootLayerDirtyRect.unite(contentRect);
+ setRootLayerNeedsDisplay();
}
@@ -2388,14 +2388,14 @@ void WebViewImpl::doComposite()
m_layerRenderer->prepareToDrawLayers(visibleRect, contentRect, IntPoint(view->scrollX(), view->scrollY()));
// Draw the contents of the root layer.
- Vector<FloatRect> damageRects;
- damageRects.append(m_scrollDamage);
- damageRects.append(m_layerRenderer->rootLayer()->dirtyRect());
+ Vector<IntRect> damageRects;
+ damageRects.append(m_rootLayerScrollDamage);
+ damageRects.append(m_rootLayerDirtyRect);
for (size_t i = 0; i < damageRects.size(); ++i) {
// The damage rect for the root layer is in content space [e.g. unscrolled].
// Convert from content space to viewPort space.
- const FloatRect damagedContentRect = damageRects[i];
- IntRect damagedRect = view->contentsToWindow(IntRect(damagedContentRect));
+ const IntRect damagedContentRect = damageRects[i];
+ IntRect damagedRect = view->contentsToWindow(damagedContentRect);
// Intersect this rectangle with the viewPort.
damagedRect.intersect(viewPort);
@@ -2406,8 +2406,8 @@ void WebViewImpl::doComposite()
m_layerRenderer->updateRootLayerTextureRect(damagedRect);
}
}
- m_layerRenderer->rootLayer()->resetNeedsDisplay();
- m_scrollDamage = WebRect();
+ m_rootLayerDirtyRect = IntRect();
+ m_rootLayerScrollDamage = IntRect();
// Draw the actual layers...
m_layerRenderer->drawLayers(visibleRect, contentRect);
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index c56dd8c..9db914d 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -522,7 +522,8 @@ private:
RefPtr<WebCore::Node> m_mouseCaptureNode;
#if USE(ACCELERATED_COMPOSITING)
- WebCore::IntRect m_scrollDamage;
+ WebCore::IntRect m_rootLayerDirtyRect;
+ WebCore::IntRect m_rootLayerScrollDamage;
RefPtr<WebCore::LayerRendererChromium> m_layerRenderer;
bool m_isAcceleratedCompositingActive;
bool m_compositorCreationFailed;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list