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

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

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

Powered by Google App Engine
This is Rietveld 408576698