Title: [87960] trunk/Source/WebCore
- Revision
- 87960
- Author
- [email protected]
- Date
- 2011-06-02 15:14:03 -0700 (Thu, 02 Jun 2011)
Log Message
2011-06-02 Adrienne Walker <[email protected]>
Reviewed by James Robinson.
[chromium] Compositor HUD should respect mapTexSubImage2D returning NULL
https://bugs.webkit.org/show_bug.cgi?id=61954
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::draw):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (87959 => 87960)
--- trunk/Source/WebCore/ChangeLog 2011-06-02 22:03:49 UTC (rev 87959)
+++ trunk/Source/WebCore/ChangeLog 2011-06-02 22:14:03 UTC (rev 87960)
@@ -1,3 +1,13 @@
+2011-06-02 Adrienne Walker <[email protected]>
+
+ Reviewed by James Robinson.
+
+ [chromium] Compositor HUD should respect mapTexSubImage2D returning NULL
+ https://bugs.webkit.org/show_bug.cgi?id=61954
+
+ * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
+ (WebCore::CCHeadsUpDisplay::draw):
+
2011-06-02 Brady Eidson <[email protected]>
Reviewed by Oliver Hunt.
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp (87959 => 87960)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp 2011-06-02 22:03:49 UTC (rev 87959)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp 2011-06-02 22:14:03 UTC (rev 87960)
@@ -110,13 +110,21 @@
PlatformCanvas::AutoLocker locker(&canvas);
m_hudTexture->bindTexture();
+ bool uploadedViaMap = false;
if (m_useMapSubForUploads) {
Extensions3DChromium* extensions = static_cast<Extensions3DChromium*>(context->getExtensions());
uint8_t* pixelDest = static_cast<uint8_t*>(extensions->mapTexSubImage2DCHROMIUM(GraphicsContext3D::TEXTURE_2D, 0, 0, 0, hudSize.width(), hudSize.height(), GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, Extensions3DChromium::WRITE_ONLY));
- memcpy(pixelDest, locker.pixels(), hudSize.width() * hudSize.height() * 4);
- extensions->unmapTexSubImage2DCHROMIUM(pixelDest);
- } else
+
+ if (pixelDest) {
+ uploadedViaMap = true;
+ memcpy(pixelDest, locker.pixels(), hudSize.width() * hudSize.height() * 4);
+ extensions->unmapTexSubImage2DCHROMIUM(pixelDest);
+ }
+ }
+
+ if (!uploadedViaMap) {
GLC(context, context->texImage2D(GraphicsContext3D::TEXTURE_2D, 0, GraphicsContext3D::RGBA, canvas.size().width(), canvas.size().height(), 0, GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, locker.pixels()));
+ }
}
// Draw the HUD onto the default render surface.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes