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

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 one more reference 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.6; 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
54 ~~~~
55 GYP_DEFINES=qt_sdk='C:\Qt\4.8.6\'
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
63
64 QtGui4.dll QtGuid4.dll QtGuid4.pdb
65
66 QtOpenGL4.dll QtOpenGLd4.dll QtOpenGLd4.pdb
67
68
69 Producing SKPs for usage
70 ------------------------
71
72 You may either use the Skia testing images (GMs) for use in the debugger or
73 create your own via chromium.
74
75 To create SKPs from Chromium you must download and build chromium on your
76 platform of choice: http://www.chromium.org/Home
77
78 <!--?prettify?-->
79 ~~~~
80 cd src
81 make chrome
82 out/Debug/chrome --no-sandbox --enable-gpu-benchmarking --force-compositing-mode
83 ~~~~
84
85 After which go to Tools, Settings, Javascript Console and type:
86
87 <!--?prettify?-->
88 ~~~~
89 chrome.gpuBenchmarking.printToSkPicture(dirname)
90 ~~~~
91
92 Using the Debugger
93 ------------------
94
95 The debugger is fairly straight forward to use once a picture is loaded in. We
96 can step through different commands via the up and down keys, and clicking on
97 the command in the list. We can pause execution of commands with the pause
98 button in order to inspect the details of the command in the inspector tabs
99 down below.
100
101
102 Command | Function
103 -------------|-----------------------------------------------
104 x | toggles the visibility of the selected command
105 alt-x | clears all hidden commands
106 ctrl-x | shows all deleted commands
107 b | creates a breakpoint on a command
108 alt-b | clears all breakpoints
109 ctrl-b | shows all breakpoints
110 ctrl-r | rewinds the picture to the first command
111 ctrl-p | plays to the next breakpoint or last command
112 ctrl-i | Toggles the inspector and settings widgets
113 ctrl-d | Toggles the directory widget
114 space | Pauses drawing execution
115 ctrl-o | Opens a file dialog for loading pictures
116 ctrl-s | Saves the skp if you deleted any commands
117 ctrl-shift-s | Saves the skp under the new specified name
118 ctrl-q | Quits
119
120 ![Debugger interface](debugger.png)
121
122
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