Changeset 126122 in webkit
- Timestamp:
- Aug 20, 2012 7:35:33 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r126121 r126122 1 2012-08-20 Alexandre Elias <aelias@google.com> 2 3 [chromium] Texture layer should not generate zero textureId quads 4 https://bugs.webkit.org/show_bug.cgi?id=94550 5 6 Reviewed by Adrienne Walker. 7 8 After a context loss, CCTextureLayerImpl would clear its textureId 9 but continued to produce external resources and quads with the zero 10 textureid. Add early returns so that CCTextureLayerImpl becomes 11 inert after a context loss. 12 13 Added assertion in read lock so that dontUseOldResourcesAfterLostContext 14 test catches the problem. 15 16 * platform/graphics/chromium/cc/CCResourceProvider.h: 17 (WebCore::CCScopedLockResourceForRead::CCScopedLockResourceForRead): 18 * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: 19 (WebCore::CCTextureLayerImpl::willDraw): 20 (WebCore::CCTextureLayerImpl::appendQuads): 21 (WebCore::CCTextureLayerImpl::didDraw): 22 (WebCore::CCTextureLayerImpl::didLoseContext): 23 1 24 2012-08-20 Kent Tamura <tkent@chromium.org> 2 25 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCResourceProvider.h
r125932 r126122 225 225 : m_resourceProvider(resourceProvider) 226 226 , m_resourceId(resourceId) 227 , m_textureId(resourceProvider->lockForRead(resourceId)) { } 227 , m_textureId(resourceProvider->lockForRead(resourceId)) 228 { 229 ASSERT(m_textureId); 230 } 228 231 229 232 ~CCScopedLockResourceForRead() -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCTextureLayerImpl.cpp
r125932 r126122 53 53 void CCTextureLayerImpl::willDraw(CCResourceProvider* resourceProvider) 54 54 { 55 if (!m_textureId) 56 return; 55 57 ASSERT(!m_externalTextureResource); 56 58 m_externalTextureResource = resourceProvider->createResourceFromExternalTexture(m_textureId); … … 59 61 void CCTextureLayerImpl::appendQuads(CCQuadSink& quadList, const CCSharedQuadState* sharedQuadState, bool&) 60 62 { 61 ASSERT(m_externalTextureResource); 63 if (!m_externalTextureResource) 64 return; 62 65 IntRect quadRect(IntPoint(), contentBounds()); 63 66 quadList.append(CCTextureDrawQuad::create(sharedQuadState, quadRect, m_externalTextureResource, m_premultipliedAlpha, m_uvRect, m_flipped)); … … 66 69 void CCTextureLayerImpl::didDraw(CCResourceProvider* resourceProvider) 67 70 { 68 ASSERT(m_externalTextureResource); 71 if (!m_externalTextureResource) 72 return; 69 73 // FIXME: the following assert will not be true when sending resources to a 70 74 // parent compositor. A synchronization scheme (double-buffering or … … 85 89 { 86 90 m_textureId = 0; 91 m_externalTextureResource = 0; 87 92 } 88 93
Note: See TracChangeset
for help on using the changeset viewer.