Index: debugger/QT/SkRasterWidget.cpp |
diff --git a/debugger/QT/SkRasterWidget.cpp b/debugger/QT/SkRasterWidget.cpp |
index b5ef492ca7ae5ea523cf71998f40ba10983abcc8..b969d50e3c51ad3511cc0ec923685e2a210d2d66 100644 |
--- a/debugger/QT/SkRasterWidget.cpp |
+++ b/debugger/QT/SkRasterWidget.cpp |
@@ -48,13 +48,13 @@ void SkRasterWidget::paintEvent(QPaintEvent* event) { |
Q_EMIT drawComplete(); |
} |
- SkImageInfo info; |
- size_t rowBytes; |
- if (const void* pixels = fSurface->peekPixels(&info, &rowBytes)) { |
- QImage image(reinterpret_cast<const uchar*>(pixels), |
- info.width(), |
- info.height(), |
- rowBytes, |
+ SkPixmap pixmap; |
+ |
+ if (fSurface->peekPixels(&pixmap)) { |
+ QImage image(reinterpret_cast<const uchar*>(pixmap.addr()), |
+ pixmap.width(), |
+ pixmap.height(), |
+ pixmap.rowBytes(), |
QImage::Format_ARGB32_Premultiplied); |
#if SK_R32_SHIFT == 0 |
painter.drawImage(this->contentsRect(), image.rgbSwapped()); |