Title: [102250] trunk/Source
- Revision
- 102250
- Author
- [email protected]
- Date
- 2011-12-07 10:45:49 -0800 (Wed, 07 Dec 2011)
Log Message
[chromium] Plumb damage from WebExternalTextureLayer and WebPluginContainer to CCDamageTracker
https://bugs.webkit.org/show_bug.cgi?id=73485
Patch by Jonathan Backer <[email protected]> on 2011-12-07
Reviewed by Darin Fisher.
Source/WebCore:
* platform/graphics/chromium/PluginLayerChromium.cpp:
(WebCore::PluginLayerChromium::updateCompositorResources):
(WebCore::PluginLayerChromium::invalidateRect):
* platform/graphics/chromium/PluginLayerChromium.h:
Source/WebKit/chromium:
* public/platform/WebExternalTextureLayer.h:
* src/WebExternalTextureLayer.cpp:
(WebKit::WebExternalTextureLayer::invalidateRect):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::commitBackingTexture):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (102249 => 102250)
--- trunk/Source/WebCore/ChangeLog 2011-12-07 18:24:35 UTC (rev 102249)
+++ trunk/Source/WebCore/ChangeLog 2011-12-07 18:45:49 UTC (rev 102250)
@@ -1,3 +1,15 @@
+2011-12-07 Jonathan Backer <[email protected]>
+
+ [chromium] Plumb damage from WebExternalTextureLayer and WebPluginContainer to CCDamageTracker
+ https://bugs.webkit.org/show_bug.cgi?id=73485
+
+ Reviewed by Darin Fisher.
+
+ * platform/graphics/chromium/PluginLayerChromium.cpp:
+ (WebCore::PluginLayerChromium::updateCompositorResources):
+ (WebCore::PluginLayerChromium::invalidateRect):
+ * platform/graphics/chromium/PluginLayerChromium.h:
+
2011-12-07 Mary Wu <[email protected]>
Upstream 5 files into WebCore/platform/blackberry
Modified: trunk/Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp (102249 => 102250)
--- trunk/Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp 2011-12-07 18:24:35 UTC (rev 102249)
+++ trunk/Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp 2011-12-07 18:45:49 UTC (rev 102250)
@@ -52,6 +52,17 @@
{
}
+void PluginLayerChromium::updateCompositorResources(GraphicsContext3D* rendererContext, CCTextureUpdater&)
+{
+ if (!m_needsDisplay)
+ return;
+
+ // PluginLayers are updated externally (outside of the compositor).
+ // |m_dirtyRect| covers the region that has changed since the last composite.
+ m_updateRect = m_dirtyRect;
+ m_dirtyRect = FloatRect();
+}
+
PassRefPtr<CCLayerImpl> PluginLayerChromium::createCCLayerImpl()
{
return CCPluginLayerImpl::create(m_layerId);
@@ -99,5 +110,11 @@
pluginLayer->setIOSurfaceProperties(m_ioSurfaceWidth, m_ioSurfaceHeight, m_ioSurfaceId);
}
+void PluginLayerChromium::invalidateRect(const FloatRect& dirtyRect)
+{
+ setNeedsDisplayRect(dirtyRect);
+ m_dirtyRect.unite(dirtyRect);
}
+
+}
#endif // USE(ACCELERATED_COMPOSITING)
Modified: trunk/Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h (102249 => 102250)
--- trunk/Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h 2011-12-07 18:24:35 UTC (rev 102249)
+++ trunk/Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h 2011-12-07 18:45:49 UTC (rev 102250)
@@ -38,6 +38,7 @@
public:
static PassRefPtr<PluginLayerChromium> create(CCLayerDelegate* = 0);
virtual bool drawsContent() const { return true; }
+ virtual void updateCompositorResources(GraphicsContext3D*, CCTextureUpdater&);
virtual PassRefPtr<CCLayerImpl> createCCLayerImpl();
@@ -55,6 +56,8 @@
virtual void pushPropertiesTo(CCLayerImpl*);
+ void invalidateRect(const FloatRect& dirtyRect);
+
protected:
explicit PluginLayerChromium(CCLayerDelegate*);
@@ -65,6 +68,7 @@
int m_ioSurfaceWidth;
int m_ioSurfaceHeight;
uint32_t m_ioSurfaceId;
+ FloatRect m_dirtyRect;
};
}
Modified: trunk/Source/WebKit/chromium/ChangeLog (102249 => 102250)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-12-07 18:24:35 UTC (rev 102249)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-12-07 18:45:49 UTC (rev 102250)
@@ -1,3 +1,16 @@
+2011-12-07 Jonathan Backer <[email protected]>
+
+ [chromium] Plumb damage from WebExternalTextureLayer and WebPluginContainer to CCDamageTracker
+ https://bugs.webkit.org/show_bug.cgi?id=73485
+
+ Reviewed by Darin Fisher.
+
+ * public/platform/WebExternalTextureLayer.h:
+ * src/WebExternalTextureLayer.cpp:
+ (WebKit::WebExternalTextureLayer::invalidateRect):
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::commitBackingTexture):
+
2011-12-06 Dirk Pranke <[email protected]>
Fix typo in WebKit.gyp introduced in previous change.
Modified: trunk/Source/WebKit/chromium/public/platform/WebExternalTextureLayer.h (102249 => 102250)
--- trunk/Source/WebKit/chromium/public/platform/WebExternalTextureLayer.h 2011-12-07 18:24:35 UTC (rev 102249)
+++ trunk/Source/WebKit/chromium/public/platform/WebExternalTextureLayer.h 2011-12-07 18:45:49 UTC (rev 102250)
@@ -68,6 +68,10 @@
WEBKIT_EXPORT void setUVRect(const WebFloatRect&);
WEBKIT_EXPORT WebFloatRect uvRect() const;
+ // Marks a region of the layer as needing a display. These regions are
+ // collected in a union until the display occurs.
+ WEBKIT_EXPORT void invalidateRect(const WebFloatRect&);
+
#if WEBKIT_IMPLEMENTATION
WebExternalTextureLayer(const WTF::PassRefPtr<WebExternalTextureLayerImpl>&);
WebExternalTextureLayer& operator=(const WTF::PassRefPtr<WebExternalTextureLayerImpl>&);
Modified: trunk/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp (102249 => 102250)
--- trunk/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp 2011-12-07 18:24:35 UTC (rev 102249)
+++ trunk/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp 2011-12-07 18:45:49 UTC (rev 102250)
@@ -66,6 +66,11 @@
return WebFloatRect(constUnwrap<WebExternalTextureLayerImpl>()->uvRect());
}
+void WebExternalTextureLayer::invalidateRect(const WebFloatRect& updateRect)
+{
+ unwrap<WebExternalTextureLayerImpl>()->invalidateRect(updateRect);
+}
+
WebExternalTextureLayer::WebExternalTextureLayer(const PassRefPtr<WebExternalTextureLayerImpl>& node)
: WebLayer(node)
{
Modified: trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp (102249 => 102250)
--- trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp 2011-12-07 18:24:35 UTC (rev 102249)
+++ trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp 2011-12-07 18:45:49 UTC (rev 102250)
@@ -369,8 +369,8 @@
void WebPluginContainerImpl::commitBackingTexture()
{
#if USE(ACCELERATED_COMPOSITING)
- if (platformLayer())
- platformLayer()->setNeedsDisplay();
+ if (m_platformLayer.get())
+ m_platformLayer->invalidateRect(FloatRect(FloatPoint(), m_platformLayer->bounds()));
#endif
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes