[chromium] Texture layer should not generate zero textureId quads
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2012 02:35:33 +0000 (02:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2012 02:35:33 +0000 (02:35 +0000)
commit6609cdf63d6d6f6f0a15b682379164207f91284c
treeed97f91bb45328c1f8a4d82c25c18c303b813e8e
parentbb7fdde795948838cb3669892a1c03f3afc2da14
[chromium] Texture layer should not generate zero textureId quads
https://bugs.webkit.org/show_bug.cgi?id=94550

Patch by Alexandre Elias <aelias@google.com> on 2012-08-20
Reviewed by Adrienne Walker.

After a context loss, CCTextureLayerImpl would clear its textureId
but continued to produce external resources and quads with the zero
textureid.  Add early returns so that CCTextureLayerImpl becomes
inert after a context loss.

Added assertion in read lock so that dontUseOldResourcesAfterLostContext
test catches the problem.

* platform/graphics/chromium/cc/CCResourceProvider.h:
(WebCore::CCScopedLockResourceForRead::CCScopedLockResourceForRead):
* platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
(WebCore::CCTextureLayerImpl::willDraw):
(WebCore::CCTextureLayerImpl::appendQuads):
(WebCore::CCTextureLayerImpl::didDraw):
(WebCore::CCTextureLayerImpl::didLoseContext):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCResourceProvider.h
Source/WebCore/platform/graphics/chromium/cc/CCTextureLayerImpl.cpp