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

Unified Diff: debugger/QT/SkRasterWidget.cpp

Issue 1782673003: Update debugger to use SkPixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « debugger/QT/SkDrawCommandGeometryWidget.cpp ('k') | 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 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());
« no previous file with comments | « debugger/QT/SkDrawCommandGeometryWidget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698