Changeset 86808 in webkit
- Timestamp:
- May 18, 2011 5:38:20 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86807 r86808 1 2011-05-16 Adrienne Walker <enne@google.com> 2 3 Reviewed by James Robinson. 4 5 [chromium] Robustly handle mapTexSubImage2D returning NULL 6 https://bugs.webkit.org/show_bug.cgi?id=60934 7 8 Also, lazily create the temp buffer so that both the map and non-map 9 cases can use it. 10 11 * platform/graphics/chromium/LayerTextureSubImage.cpp: 12 (WebCore::LayerTextureSubImage::setSubImageSize): 13 (WebCore::LayerTextureSubImage::uploadWithTexSubImage): 14 (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage): 15 1 16 2011-05-18 Emil A Eklund <eae@chromium.org> 2 17 -
trunk/Source/WebCore/platform/graphics/chromium/LayerTextureSubImage.cpp
r86805 r86808 50 50 51 51 m_subImageSize = subImageSize; 52 if (!m_useMapTexSubImage) 53 m_subImage = adoptArrayPtr(new uint8_t[m_subImageSize.width() * m_subImageSize.height() * 4]); 52 m_subImage.clear(); 54 53 } 55 54 … … 68 67 GraphicsContext3D* context) 69 68 { 69 if (!m_subImage) 70 m_subImage = adoptArrayPtr(new uint8_t[m_subImageSize.width() * m_subImageSize.height() * 4]); 71 70 72 // Offset from image-rect to source-rect. 71 73 IntPoint offset(sourceRect.x() - imageRect.x(), sourceRect.y() - imageRect.y()); … … 97 99 Extensions3DChromium* extensions = static_cast<Extensions3DChromium*>(context->getExtensions()); 98 100 uint8_t* pixelDest = static_cast<uint8_t*>(extensions->mapTexSubImage2DCHROMIUM(GraphicsContext3D::TEXTURE_2D, 0, destRect.x(), destRect.y(), destRect.width(), destRect.height(), GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, Extensions3DChromium::WRITE_ONLY)); 99 ASSERT(pixelDest); 101 102 if (!pixelDest) { 103 uploadWithTexSubImage(image, imageRect, sourceRect, destRect, context); 104 return; 105 } 106 100 107 if (imageRect.width() == sourceRect.width() && !offset.x()) 101 108 memcpy(pixelDest, &image[4 * offset.y() * imageRect.width()], imageRect.width() * destRect.height() * 4);
Note: See TracChangeset
for help on using the changeset viewer.