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

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

Issue 15907023: Make SkDrawCommands lighter weight (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: removed cruft Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | debugger/QT/SkImageWidget.cpp » ('j') | debugger/QT/SkImageWidget.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef SKIMAGEWIDGET_H_ 9 #ifndef SKIMAGEWIDGET_H_
10 #define SKIMAGEWIDGET_H_ 10 #define SKIMAGEWIDGET_H_
11 11
12 #include <QWidget> 12 #include <QWidget>
13 13
14 #include "SkSurface.h"
14 class SkDebugger; 15 class SkDebugger;
15 16
16 class SkImageWidget : public QWidget { 17 class SkImageWidget : public QWidget {
17 Q_OBJECT 18 Q_OBJECT
18 19
19 public: 20 public:
20 SkImageWidget(SkDebugger* debugger); 21 SkImageWidget(SkDebugger* debugger);
22
23 virtual ~SkImageWidget() {
24 fSurface->unref();
25 delete [] fPixels;
26 }
21 27
22 void draw() { 28 void draw() {
23 this->update(); 29 this->update();
24 } 30 }
25 31
26 static const int kImageWidgetWidth = 256; 32 static const int kImageWidgetWidth = 256;
27 static const int kImageWidgetHeight = 256; 33 static const int kImageWidgetHeight = 256;
28 34
29 signals: 35 signals:
30 void drawComplete(); 36 void drawComplete();
31 37
32 protected: 38 protected:
33 void paintEvent(QPaintEvent* event); 39 void paintEvent(QPaintEvent* event);
34 40
35 private: 41 private:
36 SkDebugger *fDebugger; 42 SkDebugger* fDebugger;
43 char* fPixels;
44 SkSurface* fSurface;
37 }; 45 };
38 46
39 #endif /* SKIMAGEWIDGET_H_ */ 47 #endif /* SKIMAGEWIDGET_H_ */
OLDNEW
« no previous file with comments | « no previous file | debugger/QT/SkImageWidget.cpp » ('j') | debugger/QT/SkImageWidget.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698