Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Unified Diff: debugger/QT/SkRasterWidget.cpp

Issue 18485004: fix swapped bitmap channels on Mac for debugger (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: style fix Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debugger/QT/SkRasterWidget.cpp
diff --git a/debugger/QT/SkRasterWidget.cpp b/debugger/QT/SkRasterWidget.cpp
index db3d00f0740d3b53bd1abb07f0ee4e02a7085384..3817c0e0ee9ab1ef9ba83ed32eee4e1789f8be26 100644
--- a/debugger/QT/SkRasterWidget.cpp
+++ b/debugger/QT/SkRasterWidget.cpp
@@ -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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698