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

Side by Side Diff: debugger/QT/SkRasterWidget.h

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 unified diff | Download patch
« no previous file with comments | « debugger/QT/SkGLWidget.cpp ('k') | debugger/QT/SkRasterWidget.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * SkRasterWidget.h 2 * SkRasterWidget.h
3 * 3 *
4 * Created on: Jul 28, 2012 4 * Created on: Jul 28, 2012
5 * Author: chudy 5 * Author: chudy
6 */ 6 */
7 7
8 8
9 #ifndef SKRASTERWIDGET_H_ 9 #ifndef SKRASTERWIDGET_H_
10 #define SKRASTERWIDGET_H_ 10 #define SKRASTERWIDGET_H_
11 11
12 #if SK_SUPPORT_GPU 12 #include "SkSurface.h"
13 #include "SkGpuDevice.h" 13 class SkDebugger;
14 #endif
15 14
16 #include "SkBitmapDevice.h"
17 #include "SkDebugger.h"
18
19 #include <QApplication>
20 #include <QtGui>
21 #include <QWidget> 15 #include <QWidget>
22 16
23 class SkRasterWidget : public QWidget { 17 class SkRasterWidget : public QWidget {
24 Q_OBJECT 18 Q_OBJECT
25 19
26 public: 20 public:
27 SkRasterWidget(SkDebugger* debugger); 21 SkRasterWidget(SkDebugger* debugger);
28 22
29 ~SkRasterWidget(); 23 void updateImage();
30
31 void draw() {
32 this->update();
33 }
34 24
35 signals: 25 signals:
36 void drawComplete(); 26 void drawComplete();
37 27
38 protected: 28 protected:
39 void paintEvent(QPaintEvent* event); 29 void paintEvent(QPaintEvent* event);
40 30
41 void resizeEvent(QResizeEvent* event); 31 void resizeEvent(QResizeEvent* event);
42 32
43 private: 33 private:
44 SkBitmap fBitmap;
45 SkDebugger* fDebugger; 34 SkDebugger* fDebugger;
46 SkCanvas* fCanvas; 35 SkAutoTUnref<SkSurface> fSurface;
47 SkBaseDevice* fDevice; 36 bool fNeedImageUpdate;
48 }; 37 };
49 38
50 #endif /* SKRASTERWIDGET_H_ */ 39 #endif /* SKRASTERWIDGET_H_ */
OLDNEW
« no previous file with comments | « debugger/QT/SkGLWidget.cpp ('k') | debugger/QT/SkRasterWidget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698