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

Side by Side Diff: site/dev/tools/debugger.md

Issue 1414393010: Adding Skia Debugger documentation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix to docserver go command Created 5 years, 1 month 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 | « no previous file | site/dev/tools/debugger.png » ('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 Skia Debugger
2 =============
3
4 Introduction
5 ------------
6
7 The Skia Debugger is a graphical tool used to step through and analyze the
8 contents of the Skia picture format. Pre-requisites include installing the Qt
9 Library and downloading the Skia code base.
10
11 Qt is available here: http://qt-project.org/downloads.
12
13 It can also be installed on linux using
14
15 <!--?prettify?-->
16 ~~~~
17 sudo apt-get install libqt4-dev
18 ~~~~
19
20 Note that the debugger has been tested with Qt 4.8.4; it is known not to work
21 with Qt 5.0RC1 on the Mac.
22
23 Design Documents:
24
25 https://docs.google.com/a/google.com/document/d/1b8muqVzfbJmYbno9nTv5721V2nlFMfn qXYLNHiSQ4ws/pub
26
27
28 How to build and run
29 --------------------
30
31 Because the debugger uses Qt, you'll need to build skia in 64 bit mode:
32
33 <!--?prettify?-->
34 ~~~~
35 cd trunk
36 ./gyp_skia
37 GYP_DEFINES="skia_arch_width=64" make debugger
38 out/Debug/debugger
39 ~~~~
40
41 For Windows, Qt ships as 32 bit libraries so to build and run one should just be
42 able to:
43
44 <!--?prettify?-->
45 ~~~~
46 cd trunk
47 make clean gyp
48 <open solution in VS2010 and build everything>
49 ~~~~
50
51 Depending on how your Qt is installed you may also need to define an environment
52 variable like:
53 <!--?prettify?-->
djsollen 2015/11/05 20:57:16 the preview shows this prettify as text.
54 ~~~~
55 GYP_DEFINES=qt_sdk='C:\Qt\4.8.4\'
56 ~~~~
57 (which needs to be set before you execute 'make gyp')
58
59 On Windows, you may need to copy several DLL and PDB files from %QTDIR%\bin into
60 your executable directory (out/Debug or out/Release):
61
62 QtCore4.dll QtCored4.dll QtCored4.pdb
djsollen 2015/11/05 20:57:16 the preview doesn't keep the line breaks. Is that
63 QtGui4.dll QtGuid4.dll QtGuid4.pdb
64 QtOpenGL4.dll QtOpenGLd4.dll QtOpenGLd4.pdb
65
66
67 Producing SKPs for usage
68 ------------------------
69
70 You may either use the Skia testing images (GMs) for use in the debugger or
71 create your own via chromium.
72
73 To create SKPs from Chromium you must download and build chromium on your
74 platform of choice: http://www.chromium.org/Home
75
76 <!--?prettify?-->
77 ~~~~
78 cd src
79 make chrome
80 out/Debug/chrome --no-sandbox --enable-gpu-benchmarking --force-compositing-mode
81 ~~~~
82
83 After which go to Tools, Settings, Javascript Console and type:
84
85 <!--?prettify?-->
86 ~~~~
87 chrome.gpuBenchmarking.printToSkPicture(dirname)
88 ~~~~
89
90 Using the Debugger
91 ------------------
92
93 The debugger is fairly straight forward to use once a picture is loaded in. We
94 can step through different commands via the up and down keys, and clicking on
95 the command in the list. We can pause execution of commands with the pause
96 button in order to inspect the details of the command in the inspector tabs
97 down below.
98
99
100 Command | Function
101 -------------|-----------------------------------------------
102 x | toggles the visibility of the selected command
103 alt-x | clears all hidden commands
104 ctrl-x | shows all deleted commands
105 b | creates a breakpoint on a command
106 alt-b | clears all breakpoints
107 ctrl-b | shows all breakpoints
108 ctrl-r | rewinds the picture to the first command
109 ctrl-p | plays to the next breakpoint or last command
110 ctrl-i | Toggles the inspector and settings widgets
111 ctrl-d | Toggles the directory widget
112 space | Pauses drawing execution
113 ctrl-o | Opens a file dialog for loading pictures
114 ctrl-s | Saves the skp if you deleted any commands
115 ctrl-shift-s | Saves the skp under the new specified name
116 ctrl-q | Quits
117
118 ![Debugger interface](debugger.png)
119
120
OLDNEW
« no previous file with comments | « no previous file | site/dev/tools/debugger.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698