[EFL][WebGL] WebGL content is not painted after resizing the viewport.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2013 07:24:46 +0000 (07:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2013 07:24:46 +0000 (07:24 +0000)
commit53abdfa88f1bf764c6835a05f9b54e68193d35e4
tree965f6cedbe52cbbd7889682f922cf29b3e0c3271
parent1cb4d2281f2524b68df389663d45028822b5785f
[EFL][WebGL] WebGL content is not painted after resizing the viewport.
https://bugs.webkit.org/show_bug.cgi?id=106358

Patch by Viatcheslav Ostapenko <sl.ostapenko@samsung.com> on 2013-02-11
Reviewed by Noam Rosenthal.

Source/WebCore:

When page size changes and layer parameters get updated LayerTreeRenderer::setLayerState
clears the layer backing store and detaches the canvas surface from the layer. If the layer
size is not changed then the canvas is not recreated. This leaves the canvas detached from
the layer, but still referenced from m_surfaceBackingStores.
Don't assign layer backing store to layer in assignImageBackingToLayer if there is a canvas
surface already attached to the layer.

Test: fast/canvas/webgl/webgl-layer-update.html

* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::setLayerState):
(WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:

LayoutTests:

Add test checking that canvas painting is correct if layer parameters were changed,
but webgl canvas didn't change.

* fast/canvas/webgl/webgl-layer-update-expected.png: Added.
* fast/canvas/webgl/webgl-layer-update-expected.txt: Added.
* fast/canvas/webgl/webgl-layer-update.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/webgl-layer-update-expected.png [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/webgl-layer-update-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/webgl-layer-update.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h