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

Unified Diff: debugger/QT/SkDrawCommandGeometryWidget.cpp

Issue 839743003: debugger: SW rasterize the picture only when it changes (Closed) Base URL: https://skia.googlesource.com/skia.git@debugcanvas-stateless-draw-01-no-resize
Patch Set: address review comment Created 5 years, 11 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/SkDebuggerGUI.cpp ('k') | debugger/QT/SkGLWidget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debugger/QT/SkDrawCommandGeometryWidget.cpp
diff --git a/debugger/QT/SkDrawCommandGeometryWidget.cpp b/debugger/QT/SkDrawCommandGeometryWidget.cpp
index 03572cfdd1ad3f833153ace92b526b19e5b748d8..9f19785667388a24b8a419e825c882d3c6cdb8e3 100644
--- a/debugger/QT/SkDrawCommandGeometryWidget.cpp
+++ b/debugger/QT/SkDrawCommandGeometryWidget.cpp
@@ -42,8 +42,8 @@ void SkDrawCommandGeometryWidget::paintEvent(QPaintEvent* event) {
painter.setRenderHint(QPainter::Antialiasing);
SkImageInfo info;
- size_t rowPixels;
- if (const void* pixels = fSurface->peekPixels(&info, &rowPixels)) {
+ size_t rowBytes;
+ if (const void* pixels = fSurface->peekPixels(&info, &rowBytes)) {
SkASSERT(info.width() > 0);
SkASSERT(info.height() > 0);
@@ -61,6 +61,7 @@ void SkDrawCommandGeometryWidget::paintEvent(QPaintEvent* event) {
QImage image(reinterpret_cast<const uchar*>(pixels),
info.width(),
info.height(),
+ rowBytes,
QImage::Format_ARGB32_Premultiplied);
painter.drawImage(resultRect, image);
}
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | debugger/QT/SkGLWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698