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

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: 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..c048df7b3b068a8b5c22879dc1ae895aa7bf4021 100644
--- a/debugger/QT/SkRasterWidget.cpp
+++ b/debugger/QT/SkRasterWidget.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
-
+#include <iostream>
robertphillips 2013/07/10 15:50:04 Do we need this #include?
#include "SkRasterWidget.h"
SkRasterWidget::SkRasterWidget(SkDebugger *debugger) : QWidget() {
@@ -49,7 +49,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