Added classes SkPatch and SkPatchMesh which help encapsulate and generalize this...
authordandov <dandov@google.com>
Fri, 25 Jul 2014 17:44:53 +0000 (10:44 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 25 Jul 2014 17:44:54 +0000 (10:44 -0700)
commit50d715476b1d3a00fb43c13e34a80ea0a01d32bf
treee315f425dee5580112df9ded12da2e256b9e126f
parent75e62ea9d6d99ff06133d95c3451b698dff52a55
Added classes SkPatch and SkPatchMesh which help encapsulate and generalize this new primitive. The functionality and responsability of each class is better explained in the comments of the files.

Each patch defines a method genMesh that produces the geometry to draw. To do this they receive a SkPatchMesh object which they need to initialize in order to set up how the data is going to be formatted. Later they call function like setColor or pointAt to set the values at a specific index, the SkMeshPatch object handles the indices based on the format and makes it transparent to the client.

Added a slide to sample app to show how to set up this classes and how they interact.

BUG=skia:
R=jvanverth@google.com, egdaniel@google.com, bsalomon@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/405163003
gm/patch.cpp [new file with mode: 0644]
gyp/core.gypi
gyp/gmslides.gypi
include/core/SkPatch.h [new file with mode: 0644]
src/core/SkPatch.cpp [new file with mode: 0644]