aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--site/dev/contrib/submit.md83
-rw-r--r--site/user/download.md93
2 files changed, 96 insertions, 80 deletions
diff --git a/site/dev/contrib/submit.md b/site/dev/contrib/submit.md
index 724201d34c..69bb42c57a 100644
--- a/site/dev/contrib/submit.md
+++ b/site/dev/contrib/submit.md
@@ -2,29 +2,42 @@ How to submit a patch
=====================
+Configure git
+-------------
+
+<!--?prettify lang=sh?-->
+
+ git config --global user.name "Your Name"
+ git config --global user.email you@example.com
+
Making changes
--------------
First create a branch for your changes:
-~~~~
-$ git checkout -b my_feature origin/master
-~~~~
+<!--?prettify lang=sh?-->
+
+ git config branch.autosetuprebase always
+ git checkout -b my_feature origin/master
After making your changes, create a commit
-~~~~
-$ git add [file1] [file2] ...
-$ git commit
-~~~~
+<!--?prettify lang=sh?-->
+
+ git add [file1] [file2] ...
+ git commit
If your branch gets out of date, you will need to update it:
-~~~~
-$ git pull --rebase
-$ gclient sync
-~~~~
+<!--?prettify lang=sh?-->
+
+ git pull
+ python bin/sync-and-gyp
+<!--
+ python tools/git-sync-deps
+ python ./gyp_skia
+-->
Adding a unit test
------------------
@@ -34,7 +47,7 @@ time. Skia has a simple unittest framework so you can add a case to it.
Test code is located under the 'tests' directory.
-See [Writing Unit and Rendering Tests](tests) for details.
+See [Writing Unit and Rendering Tests](../testing/tests) for details.
Unit tests are best, but if your change touches rendering and you can't think of
an automated way to verify the results, consider writing a GM test or a new page
@@ -49,14 +62,16 @@ For your code to be accepted into the codebase, you must complete the
[Individual Contributor License
Agreement](http://code.google.com/legal/individual-cla-v1.0.html). You can do
this online, and it only takes a minute. If you are contributing on behalf of a
-corporation, you must fill out the [Corporate Contributor License Agreement](http://code.google.com/legal/corporate-cla-v1.0.html)
-and send it to us as described on that page. Add your (or your organization's)
+corporation, you must fill out the [Corporate Contributor License
+Agreement](http://code.google.com/legal/corporate-cla-v1.0.html)
+and send it to us as described on that page. Add your (or your organization's)
name and contact info to the AUTHORS file as a part of your CL.
Now that you've made a change and written a test for it, it's ready for the code
review! Submit a patch and getting it reviewed is fairly easy with depot tools.
-Use git-cl, which comes with [depot tools](http://sites.google.com/a/chromium.org/dev/developers/how-tos/install-depot-tools).
+Use git-cl, which comes with [depot
+tools](http://sites.google.com/a/chromium.org/dev/developers/how-tos/install-depot-tools).
For help, run git-cl help.
### Configuring git-cl
@@ -64,9 +79,9 @@ For help, run git-cl help.
Before using any git-cl commands you will need to configure it to point at the
correct code review server. This is accomplished with the following command:
-~~~~
-git cl config https://skia.googlesource.com/skia/+/master/codereview.settings
-~~~~
+<!--?prettify lang=sh?-->
+
+ git cl config https://skia.googlesource.com/skia/+/master/codereview.settings
### Find a reviewer
@@ -76,17 +91,18 @@ has been editing it.
### Uploading changes for review
-Skia uses Chromium's code review [site](http://codereview.chromium.org) and the
+Skia uses Chromium's code review [site](http://codereview.chromium.org) and the
Rietveld open source code review tool.
Use git cl to upload your change:
-~~~~
-$ git cl upload
-~~~~
+
+<!--?prettify lang=sh?-->
+
+ git cl upload
You may have to enter a Google Account username and password to authenticate
yourself to codereview.chromium.org. A free gmail account will do fine, or any
other type of Google account. It does not have to match the email address you
-configured using git config --global user.email above, but it can.
+configured using `git config --global user.email` above, but it can.
The command output should include a URL, similar to
(https://codereview.chromium.org/111893004/), indicating where your changelist
@@ -130,12 +146,10 @@ update.
If you need to update code the code on an already uploaded CL, simply edit the
code, commit it again locally, and then run git cl upload again e.g.
-~~~~
-echo "" > GOATS
-git add GOATS
-git commit -m 'add newline fix to GOATS'
-git cl upload
-~~~~
+ echo "GOATS" > whitespace.txt
+ git add whitespace.txt
+ git commit -m 'add GOATS fix to whitespace.txt'
+ git cl upload
Once you're ready for another review, use **Publish+Mail Comments** again to
send another notification (it is helpful to tell the review what you did with
@@ -146,12 +160,13 @@ _Note_: As you work through the review process, both you and your reviewers
should converse using the code review interface, and send notes using
**Publish+Mail Comments**.
+Once your change has received an LGTM, you can check the "Commit" box
+on the codereview page and it will be committed on your behalf.
+
Once your commit has gone in, you should delete the branch containing your change:
-~~~~
-$ git checkout master
-$ git branch -D my_feature
-~~~~
+ git checkout -q origin/master
+ git branch -D my_feature
Final Testing
@@ -201,7 +216,7 @@ the new codereview.
### Skia committers:
* tips on how to apply the externally provided patch are [here](./patch)
- * when landing externally contributed patches, please note the original
+ * when landing externally contributed patches, please note the original
contributor's identity (and provide a link to the original codereview) in the commit message
git-cl will squash all your commits into a single one with the description you used when you uploaded your change.
diff --git a/site/user/download.md b/site/user/download.md
index 7c7630a320..d748214746 100644
--- a/site/user/download.md
+++ b/site/user/download.md
@@ -1,74 +1,75 @@
How to download Skia
====================
-Install gclient and git
------------------------
+Install depot_tools and Git
+---------------------------
-Follow the instructions on
-http://www.chromium.org/developers/how-tos/install-depot-tools to download
-chromium's depot_tools (which includes gclient ).
+Follow the instructions on [Installing Chromium's
+depot_tools](http://www.chromium.org/developers/how-tos/install-depot-tools)
+to download depot_tools (which includes gclient, git-cl, and Ninja).
-depot_tools will also install git on your system, if it wasn't installed
-already.
+<!--?prettify lang=sh?-->
+
+ git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
+ export PATH="${PWD}/depot_tools:${PATH}"
+depot_tools will also install Git on your system, if it wasn't installed
+already.
-Configure git
+Configure Git
-------------
- $ git config --global user.name "Your Name"
- $ git config --global user.email you@example.com
+<!--?prettify lang=sh?-->
-Download your tree
-------------------
+ git config --global user.name "Your Name"
+ git config --global user.email you@example.com
- $ mkdir skia
- $ cd skia
- $ gclient config --name . --unmanaged https://skia.googlesource.com/skia.git
- $ gclient sync
- $ git checkout master
+Clone the Skia repository
+-------------------------
-At this point, you have everything you need to build and use Skia! If
-you want to make changes, and possibly contribute them back to the Skia
-project, read on...
+<!--?prettify lang=sh?-->
-Making changes
---------------
+ git clone https://skia.googlesource.com/skia.git
+ cd skia
-First create a branch for your changes:
+Get Skia's dependencies and generate Ninja build files
+------------------------------------------------------
- $ git checkout --track origin/master -b my_feature master
+<!--?prettify lang=sh?-->
-After making your changes, create a commit
+ python bin/sync-and-gyp
- $ git add [file1] [file2] ...
- $ git commit
+<!--
+ python tools/git-sync-deps
+ python ./gyp_skia
+-->
-If your branch gets out of date, you will need to update it:
+Compile all default targets
+---------------------------
- $ git pull --rebase
- $ gclient sync
+<!--?prettify lang=sh?-->
-Uploading changes for review
-----------------------------
+ ninja -C out/Debug
- $ git cl upload
+Execute Skia tests
+------------------
+
+[More about Skia correctness testing tools](../dev/testing/testing)
+
+<!--?prettify lang=sh?-->
-You may have to enter a Google Account username and password to authenticate
-yourself to codereview.chromium.org. A free gmail account will do fine, or any
-other type of Google account. It does not have to match the email address you
-configured using git config --global user.email above, but it can.
+ out/Debug/dm
-The command output should include a URL (similar to
-https://codereview.chromium.org/111893004/ ) indicating where your changelist
-can be reviewed.
+Execute Skia sample application
+-------------------------------
-Once your change has received an LGTM ("looks good to me"), you can check the
-"Commit" box on the codereview page and it will be committed on your behalf.
+[More about Skia's SampleApp](sample/sampleapp)
-Once your commit has gone in, you should delete the branch containing your
-change:
+<!--?prettify lang=sh?-->
- $ git checkout master
- $ git branch -D my_feature
+ out/Debug/SampleApp
+At this point, you have everything you need to build and use Skia! If
+you want to make changes, and possibly contribute them back to the Skia
+project, read [How To Submit a Patch](../dev/contrib/submit).