Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms. It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products. Skia is an alternative to the Cairo library.
Posting this in case it helps anyone else.
Prerequisites:
Visual Studio 2013 (including the express or community editions, which are free)
Unzipping tool like 7zip, WinRAR
The command prompt lines below should be run in the same session (i.e. it won't work if you close and reopen a new command prompt).
Use 7zip or WinRAR to Extract All to a path like c:\path\to\depot_tools (no spaces in path). The Windows built-in unzip ight skip hidden files.
Open a command prompt
Run "cd c:\path\to\depot_tools"
Run "echo %PATH%"
In the output, if you already have Python installed and see a Python directory, you might want to remove this from the path. set PATH=x can do this for just this command session.
In the output, if you already have Git installed and see a Git directory, you might want to remove this from the path. set PATH=x can do this for just this command session.
Run "set PATH=%PATH%;c:\path\to\depot_tools" to add depot tools to the path
Run "gclient". This will download and sync the needed tools.
Make a directory like c:\path\to\skia (no spaces in path)
In the same command prompt Run "cd c:\path\to\skia"
Run git config --global user.name "Your Name"
Run git config --global user.email you@example.com
For me, I didn't need these projects, and also these failed to build as they couldn't find QT. Open Configuration Manager, under the Debug/Release drop down, uncheck Build for the following
debugger, debugger_qt_mocs, pdfviewer, pdfviewer_lib
Hit Build Solution, and wait several minutes
When the build is done, you may see some compilation warnings/errors but if the default project HelloWorld runs correctly, (Ctrl+F5), it's likely that all of the important parts work.
Open .\out64\skia.sln in VS
Repeat the above steps for x64.
Now, to create an example project that doesn't need Google's gyp system:
Open Visual Studio and create a new project. Other languages > Visual C++ > Win32 > Win32 Console Application
In the Win32 Application Wizard, click Application Settings, uncheck Precompiled Header, check Empty Project.
Switch from Debug to Release
Go into the project's options, Configuration Properties > C/C++ > General > Additional Include Diretories and add:
c:\path\to\skia\include\core;c:\path\to\skia\include\config
Go into the project's options, Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions and add: