Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Qt] Remove unnecessary rendering code
https://bugs.webkit.org/show_bug.cgi?id=83591

Reviewed by Noam Rosenthal.

- Remove code that isn't needed since the introduction of WebLayerTreeRenderer
- Remove TextureMapper::bindSurface(0) calls following beginPainting, which calls it itself.

* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paint):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.cpp:
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
(WebKit::WebLayerTreeRenderer::paintToGraphicsContext):

Canonical link: https://commits.webkit.org/101156@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
jturcotte committed Apr 11, 2012
1 parent 4ff1927 commit 7c79c03
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 33 deletions.
25 changes: 25 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,28 @@
2012-04-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>

[Qt] Remove unnecessary rendering code
https://bugs.webkit.org/show_bug.cgi?id=83591

Reviewed by Noam Rosenthal.

- Remove code that isn't needed since the introduction of WebLayerTreeRenderer
- Remove TextureMapper::bindSurface(0) calls following beginPainting, which calls it itself.

* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paint):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.cpp:
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
(WebKit::WebLayerTreeRenderer::paintToGraphicsContext):

2012-04-10 Carlos Garcia Campos <cgarcia@igalia.com>

Unreviewed. Fix make distcheck issues.
Expand Down
8 changes: 6 additions & 2 deletions Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp
Expand Up @@ -65,8 +65,12 @@ void QQuickWebPagePrivate::initialize(WebKit::WebPageProxy* webPageProxy)

void QQuickWebPagePrivate::paint(QPainter* painter)
{
if (webPageProxy->drawingArea())
webPageProxy->drawingArea()->paintLayerTree(painter);
if (!webPageProxy->drawingArea())
return;

LayerTreeHostProxy* layerTreeHostProxy = webPageProxy->drawingArea()->layerTreeHostProxy();
if (layerTreeHostProxy->layerTreeRenderer())
layerTreeHostProxy->layerTreeRenderer()->paintToGraphicsContext(painter);
}

QSGNode* QQuickWebPage::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData*)
Expand Down
1 change: 0 additions & 1 deletion Source/WebKit2/UIProcess/API/qt/qquickwebpage_p_p.h
Expand Up @@ -40,7 +40,6 @@ class QQuickWebPagePrivate {

void updateSize();

void paintToCurrentGLContext(const QTransform&, float opacity, const QRectF& clipRect);
void paint(QPainter*);
void resetPaintNode();

Expand Down
2 changes: 0 additions & 2 deletions Source/WebKit2/UIProcess/DrawingAreaProxy.h
Expand Up @@ -91,8 +91,6 @@ class DrawingAreaProxy {
virtual WebCore::IntRect viewportVisibleRect() const { return contentsRect(); }
virtual WebCore::IntRect contentsRect() const;
virtual bool isBackingStoreReady() const { return true; }
virtual void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&) { }
virtual void paintLayerTree(BackingStore::PlatformGraphicsContext) { }
LayerTreeHostProxy* layerTreeHostProxy() const { return m_layerTreeHostProxy.get(); }
virtual void setVisibleContentsRect(const WebCore::IntRect& visibleContentsRect, float scale, const WebCore::FloatPoint& trajectoryVector) { }
virtual void createTileForLayer(int layerID, int tileID, const WebKit::UpdateInfo&) { }
Expand Down
11 changes: 0 additions & 11 deletions Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
Expand Up @@ -359,17 +359,6 @@ void DrawingAreaProxyImpl::setVisibleContentsRect(const WebCore::IntRect& visibl
m_layerTreeHostProxy->setVisibleContentsRect(visibleContentsRect, scale, trajectoryVector);
}

void DrawingAreaProxyImpl::paintLayerTree(BackingStore::PlatformGraphicsContext context)
{
if (m_layerTreeHostProxy)
m_layerTreeHostProxy->paintToGraphicsContext(context);
}

void DrawingAreaProxyImpl::paintToCurrentGLContext(const TransformationMatrix& matrix, float opacity, const FloatRect& clipRect)
{
if (m_layerTreeHostProxy)
m_layerTreeHostProxy->paintToCurrentGLContext(matrix, opacity, clipRect);
}
#endif

void DrawingAreaProxyImpl::exitAcceleratedCompositingMode()
Expand Down
2 changes: 0 additions & 2 deletions Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h
Expand Up @@ -81,8 +81,6 @@ class DrawingAreaProxyImpl : public DrawingAreaProxy {

#if USE(UI_SIDE_COMPOSITING)
virtual void setVisibleContentsRect(const WebCore::IntRect& visibleContentsRect, float scale, const WebCore::FloatPoint& trajectory);
virtual void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float opacity, const WebCore::FloatRect&);
virtual void paintLayerTree(BackingStore::PlatformGraphicsContext);
void didReceiveLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
#endif
#else
Expand Down
11 changes: 0 additions & 11 deletions Source/WebKit2/UIProcess/LayerTreeHostProxy.cpp
Expand Up @@ -45,17 +45,6 @@ LayerTreeHostProxy::~LayerTreeHostProxy()
m_renderer->detach();
}

void LayerTreeHostProxy::paintToCurrentGLContext(const WebCore::TransformationMatrix& matrix, float opacity, const WebCore::FloatRect& rect)
{
m_renderer->syncRemoteContent();
m_renderer->paintToCurrentGLContext(matrix, opacity, rect);
}

void LayerTreeHostProxy::paintToGraphicsContext(BackingStore::PlatformGraphicsContext context)
{
m_renderer->paintToGraphicsContext(context);
}

void LayerTreeHostProxy::updateViewport()
{
m_drawingAreaProxy->updateViewport();
Expand Down
2 changes: 0 additions & 2 deletions Source/WebKit2/UIProcess/LayerTreeHostProxy.h
Expand Up @@ -53,8 +53,6 @@ class LayerTreeHostProxy {
void deleteCompositingLayer(WebLayerID);
void setRootCompositingLayer(WebLayerID);
void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float opacity, const WebCore::FloatRect& clip);
void paintToGraphicsContext(BackingStore::PlatformGraphicsContext);
void purgeGLResources();
void setContentsSize(const WebCore::FloatSize&);
void setVisibleContentsRect(const WebCore::IntRect&, float scale, const WebCore::FloatPoint& trajectory);
Expand Down
2 changes: 0 additions & 2 deletions Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp
Expand Up @@ -121,7 +121,6 @@ void WebLayerTreeRenderer::paintToCurrentGLContext(const TransformationMatrix& m

layer->setTextureMapper(m_textureMapper.get());
m_textureMapper->beginPainting();
m_textureMapper->bindSurface(0);
m_textureMapper->beginClip(TransformationMatrix(), clipRect);

if (currentRootLayer->opacity() != opacity || currentRootLayer->transform() != matrix) {
Expand Down Expand Up @@ -149,7 +148,6 @@ void WebLayerTreeRenderer::paintToGraphicsContext(QPainter* painter)
GraphicsContext graphicsContext(painter);
m_textureMapper->setGraphicsContext(&graphicsContext);
m_textureMapper->beginPainting();
m_textureMapper->bindSurface(0);
layer->paint();
m_textureMapper->endPainting();
m_textureMapper->setGraphicsContext(0);
Expand Down

0 comments on commit 7c79c03

Please sign in to comment.