Changeset 132518 in webkit
- Timestamp:
- Oct 25, 2012, 1:01:04 PM (12 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r132514 r132518 1 2012-10-25 Sami Kyostila <skyostil@chromium.org> 2 3 Composited/HW content have the red and blue channels inverted in DRT on Chromium Android 4 https://bugs.webkit.org/show_bug.cgi?id=98647 5 6 Reviewed by James Robinson. 7 8 WebLayerTreeView::compositeAndReadback() always gives back data in BGRA 9 ordering (i.e., the first byte in memory is blue). This matches Skia's 10 SkBitmap::kARGB_8888_Config ordering on all platforms except Android, 11 where Skia's native format is RGBA (i.e., red comes first in memory). 12 13 This mismatch causes layout test pixel comparison failures. This patch 14 fixes the problem by reordering the channels right after readback. 15 16 * src/WebViewImpl.cpp: 17 (WebKit::WebViewImpl::doPixelReadbackToCanvas): 18 1 19 2012-10-25 Dominic Mazzoni <dmazzoni@google.com> 2 20 -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r132283 r132518 1770 1770 target.allocPixels(); 1771 1771 m_layerTreeView->compositeAndReadback(target.getPixels(), rect); 1772 #if (!SK_R32_SHIFT && SK_B32_SHIFT == 16) 1773 // The compositor readback always gives back pixels in BGRA order, but for 1774 // example Android's Skia uses RGBA ordering so the red and blue channels 1775 // need to be swapped. 1776 uint8_t* pixels = reinterpret_cast<uint8_t*>(target.getPixels()); 1777 for (size_t i = 0; i < target.getSize(); i += 4) 1778 std::swap(pixels[i], pixels[i + 2]); 1779 #endif 1772 1780 canvas->writePixels(target, rect.x(), rect.y()); 1773 1781 }
Note:
See TracChangeset
for help on using the changeset viewer.