My favorites | Sign in
Project Home Wiki Issues Source
Search
for
gm  
Running gm (Golden Master)
Updated May 15, 2012 by chudy@google.com

Introduction

gm is a useful tool to see if a change will regress the rendering. It draws some images and compares them to expected images.

How to run

cd trunk
make all
out/Debug/gm

Running on the GPU

Some test-images are done on the gpu, which can give slightly different results on different gpus (e.g. diff between mac desktop and mac laptop).

This can be fixed by switching to use mesa, but until then, you can run against a known set for your platform with the following:

out/Debug/gm -r gm/base  # or some other gm/directory

Valid directories

gm/base Mac desktop, SKIA_SCALAR_IS_FLOAT
gm/base-MacPro-fixed Mac desktop, SKIA_SCALAR_IS_FIXED
gm/base-linux Linux desktop, SKIA_SCALAR_IS_FLOAT
gm/base-linux-fixed Linux desktop, SKIA_SCALAR_IS_FIXED
gm/base-macbook Mac laptop, SKIA_SCALAR_IS_FLOAT
gm/base-win Windows desktop, SKIA_SCALAR_IS_FLOAT
gm/base-win-fixed Windows desktop, SKIA_SCALAR_IS_FIXED

Creating images for another platform

Get a clean tree (e.g. rev. 1318 seems to be clean)

cd trunk
mkdir gm/my_dir
out/Debug/gm -w gm/my_dir

Now you can test subsequent changes:

out/Debug/gm -r gm/my_dir

Creating images on Android

We need to open a shell on the target device.

Assuming you have the ADB (Android Debug Bridge) in your path and have pushed the gm (Golden Master) program and named it skia_gm, the following will create the images on your device.

If you have not pushed the gm program follow the instructions at GettingStartedOnAndroid

adb shell
  cd sdcard
  mkdir gm/my_dir
  skia_gm --nopdf -w gm/my_dir
exit

Navigate to the directory you want to pull the images to and then

adb pull sdcard/gm/my_dir
Powered by Google Project Hosting