| Index: include/core/SkCanvas.h
|
| diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
|
| index 6a88d6832277dcbe57c1951224a28640a49b0145..486bc1681edcbf8ab0c9f90793d43f328bde98b1 100644
|
| --- a/include/core/SkCanvas.h
|
| +++ b/include/core/SkCanvas.h
|
| @@ -27,6 +27,7 @@ class SkDrawable;
|
| class SkDrawFilter;
|
| class SkImage;
|
| class SkImageFilter;
|
| +class SkLight;
|
| class SkMetaData;
|
| class SkPath;
|
| class SkPicture;
|
| @@ -1088,6 +1089,18 @@ public:
|
| }
|
|
|
| /**
|
| + * Like drawAtlas, drawLitAtlas draws a set of sprites from the atlas. Each
|
| + * sprite must have two sets of texture rectangles however. One for its
|
| + * diffuse channel and the second for its normal map both of which are in
|
| + * the atlas. The normal-mapped sprite is lit by the specified lights.
|
| + */
|
| + void drawLitAtlas(const SkImage* atlas, const SkRSXform xforms[],
|
| + const SkRect diffTex[], const SkRect normTex[],
|
| + const SkColor colors[], int count, SkXfermode::Mode,
|
| + const SkRect* cullRect, const SkPaint* paint,
|
| + const SkLight lights[], int numLights);
|
| +
|
| + /**
|
| * Draw the contents of this drawable into the canvas. If the canvas is async
|
| * (e.g. it is recording into a picture) then the drawable will be referenced instead,
|
| * to have its draw() method called when the picture is finalized.
|
| @@ -1273,6 +1286,10 @@ protected:
|
|
|
| virtual void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
|
| int count, SkXfermode::Mode, const SkRect* cull, const SkPaint*);
|
| + virtual void onDrawLitAtlas(const SkImage*, const SkRSXform[],
|
| + const SkRect diffTex[], const SkRect normTex[], const SkColor[],
|
| + int count, SkXfermode::Mode, const SkRect* cull, const SkPaint*,
|
| + const SkLight lights[], int numLights);
|
| virtual void onDrawPath(const SkPath&, const SkPaint&);
|
| virtual void onDrawImage(const SkImage*, SkScalar dx, SkScalar dy, const SkPaint*);
|
| virtual void onDrawImageRect(const SkImage*, const SkRect*, const SkRect&, const SkPaint*,
|
|
|