| Index: include/core/SkSurface.h
|
| diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
|
| index 2f277b755df7a9d385f57e812d6a2e97c2d9af72..74c5f083f459bb9f48fd195bccef609562fa3859 100644
|
| --- a/include/core/SkSurface.h
|
| +++ b/include/core/SkSurface.h
|
| @@ -151,6 +151,18 @@ public:
|
| */
|
| void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*);
|
|
|
| + /**
|
| + * If the surface has direct access to its pixels (i.e. they are in local
|
| + * RAM) return the const-address of those pixels, and if not null, return
|
| + * the ImageInfo and rowBytes. The returned address is only valid while
|
| + * the surface object is in scope, and no API call is made on the surface
|
| + * or its canvas.
|
| + *
|
| + * On failure, returns NULL and the info and rowBytes parameters are
|
| + * ignored.
|
| + */
|
| + const void* peekPixels(SkImageInfo* info, size_t* rowBytes);
|
| +
|
| protected:
|
| SkSurface(int width, int height);
|
| SkSurface(const SkImageInfo&);
|
|
|