fix swapped bitmap channels on Mac for debugger

BUG=
R=djsollen@google.com, robertphillips@google.com

Review URL: https://codereview.chromium.org/18485004

git-svn-id: http://skia.googlecode.com/svn/trunk@9958 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
humper@google.com 2013-07-10 15:53:36 +00:00
parent 84e22d847f
commit 5a867c74e1

View File

@ -6,7 +6,6 @@
* found in the LICENSE file.
*/
#include "SkRasterWidget.h"
SkRasterWidget::SkRasterWidget(SkDebugger *debugger) : QWidget() {
@ -49,7 +48,11 @@ void SkRasterWidget::paintEvent(QPaintEvent* event) {
QImage image((uchar *)fBitmap.getPixels(), fBitmap.width(),
fBitmap.height(), QImage::Format_ARGB32_Premultiplied);
#if SK_R32_SHIFT == 0
painter.drawImage(origin, image.rgbSwapped());
#else
painter.drawImage(origin, image);
#endif
painter.end();
emit drawComplete();
}