Title: [149599] trunk/Source/WebCore
- Revision
- 149599
- Author
- [email protected]
- Date
- 2013-05-06 08:43:36 -0700 (Mon, 06 May 2013)
Log Message
[texmap] draw content if graphics layer displays a video
https://bugs.webkit.org/show_bug.cgi?id=114742
Patch by Víctor Manuel Jáquez Leal <[email protected]> on 2013-05-06
Reviewed by Noam Rosenthal.
Bug #86410 focuses on having composited/accelerated video using the
TextureMapper. But the video is not rendered fast by using the
repaint() method. In the case of the TextureMapper it is required to
call a content display as fast as possible.
This patch adds the class TextureMapperPlatformLayer::Client with the
method setLayerNeedsDisplay(). The GraphicsLayerTextureMapper
implements this new class and the new method calls
setContentsNeedsDisplay(), causing a faster content display when
requested.
No new tests. Covered by existing tests.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToMedia): sets itself
as the TextureMapperPlatformLayer's client
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::setLayerNeedsDisplay):
TextureMapperPlatformLayer::Client::setLayerNeedsDisplay implementation
(GraphicsLayerTextureMapper):
* platform/graphics/texmap/TextureMapperPlatformLayer.h:
(Client): New class
(WebCore::TextureMapperPlatformLayer::TextureMapperPlatformLayer):
(WebCore::TextureMapperPlatformLayer::setClient): client setter
(WebCore::TextureMapperPlatformLayer::setLayerNeedsDisplay): facade
for client's method
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (149598 => 149599)
--- trunk/Source/WebCore/ChangeLog 2013-05-06 15:28:10 UTC (rev 149598)
+++ trunk/Source/WebCore/ChangeLog 2013-05-06 15:43:36 UTC (rev 149599)
@@ -1,3 +1,37 @@
+2013-05-06 Víctor Manuel Jáquez Leal <[email protected]>
+
+ [texmap] draw content if graphics layer displays a video
+ https://bugs.webkit.org/show_bug.cgi?id=114742
+
+ Reviewed by Noam Rosenthal.
+
+ Bug #86410 focuses on having composited/accelerated video using the
+ TextureMapper. But the video is not rendered fast by using the
+ repaint() method. In the case of the TextureMapper it is required to
+ call a content display as fast as possible.
+
+ This patch adds the class TextureMapperPlatformLayer::Client with the
+ method setLayerNeedsDisplay(). The GraphicsLayerTextureMapper
+ implements this new class and the new method calls
+ setContentsNeedsDisplay(), causing a faster content display when
+ requested.
+
+ No new tests. Covered by existing tests.
+
+ * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+ (WebCore::GraphicsLayerTextureMapper::setContentsToMedia): sets itself
+ as the TextureMapperPlatformLayer's client
+ * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
+ (WebCore::GraphicsLayerTextureMapper::setLayerNeedsDisplay):
+ TextureMapperPlatformLayer::Client::setLayerNeedsDisplay implementation
+ (GraphicsLayerTextureMapper):
+ * platform/graphics/texmap/TextureMapperPlatformLayer.h:
+ (Client): New class
+ (WebCore::TextureMapperPlatformLayer::TextureMapperPlatformLayer):
+ (WebCore::TextureMapperPlatformLayer::setClient): client setter
+ (WebCore::TextureMapperPlatformLayer::setLayerNeedsDisplay): facade
+ for client's method
+
2013-05-02 David Hyatt <[email protected]>
Improve the performance of RenderDeprecatedFlexibleBox.
Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (149598 => 149599)
--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 2013-05-06 15:28:10 UTC (rev 149598)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 2013-05-06 15:43:36 UTC (rev 149599)
@@ -383,6 +383,8 @@
GraphicsLayer::setContentsToMedia(media);
notifyChange(ContentChange);
m_contentsLayer = media;
+
+ m_contentsLayer->setClient(this);
}
void GraphicsLayerTextureMapper::setShowDebugBorder(bool show)
Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h (149598 => 149599)
--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h 2013-05-06 15:28:10 UTC (rev 149598)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h 2013-05-06 15:43:36 UTC (rev 149599)
@@ -24,12 +24,13 @@
#include "GraphicsLayerClient.h"
#include "Image.h"
#include "TextureMapperLayer.h"
+#include "TextureMapperPlatformLayer.h"
#include "TextureMapperTiledBackingStore.h"
#include "Timer.h"
namespace WebCore {
-class GraphicsLayerTextureMapper : public GraphicsLayer {
+class GraphicsLayerTextureMapper : public GraphicsLayer, public TextureMapperPlatformLayer::Client {
public:
explicit GraphicsLayerTextureMapper(GraphicsLayerClient*);
virtual ~GraphicsLayerTextureMapper();
@@ -108,6 +109,8 @@
void prepareBackingStoreIfNeeded();
bool shouldHaveBackingStore() const;
+ virtual void setPlatformLayerNeedsDisplay() OVERRIDE { setContentsNeedsDisplay(); }
+
// This set of flags help us defer which properties of the layer have been
// modified by the compositor, so we can know what to look for in the next flush.
enum ChangeMask {
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h (149598 => 149599)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h 2013-05-06 15:28:10 UTC (rev 149598)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h 2013-05-06 15:43:36 UTC (rev 149599)
@@ -31,6 +31,12 @@
class TextureMapperPlatformLayer {
public:
+ class Client {
+ public:
+ virtual void setPlatformLayerNeedsDisplay() = 0;
+ };
+
+ TextureMapperPlatformLayer() : m_client(0) { }
virtual ~TextureMapperPlatformLayer() { }
virtual void paintToTextureMapper(TextureMapper*, const FloatRect&, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0) = 0;
virtual void swapBuffers() { }
@@ -38,12 +44,22 @@
{
textureMapper->drawBorder(color, borderWidth, targetRect, transform);
}
+ void setClient(TextureMapperPlatformLayer::Client* client)
+ {
+ m_client = client;
+ }
#if USE(GRAPHICS_SURFACE)
virtual IntSize platformLayerSize() const { return IntSize(); }
virtual uint32_t copyToGraphicsSurface() { return 0; }
virtual GraphicsSurfaceToken graphicsSurfaceToken() const { return GraphicsSurfaceToken(); }
virtual GraphicsSurface::Flags graphicsSurfaceFlags() const { return GraphicsSurface::SupportsTextureTarget | GraphicsSurface::SupportsSharing; }
#endif
+
+protected:
+ TextureMapperPlatformLayer::Client* client() { return m_client; }
+
+private:
+ TextureMapperPlatformLayer::Client* m_client;
};
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes