| Index: include/gpu/GrSurface.h
|
| diff --git a/include/gpu/GrSurface.h b/include/gpu/GrSurface.h
|
| index 52a56659ab11012dd4819f7bdf70eacdd9a51d94..eeb63ad21bfd7f85d125430fb66b25360e6b36b7 100644
|
| --- a/include/gpu/GrSurface.h
|
| +++ b/include/gpu/GrSurface.h
|
| @@ -11,6 +11,7 @@
|
|
|
| #include "GrTypes.h"
|
| #include "GrResource.h"
|
| +#include "SkRect.h"
|
|
|
| class GrTexture;
|
| class GrRenderTarget;
|
| @@ -33,6 +34,12 @@ public:
|
| */
|
| int height() const { return fDesc.fHeight; }
|
|
|
| + /**
|
| + * Helper that gets the width and height of the surface as a bounding rectangle.
|
| + */
|
| + void getBoundsRect(SkRect* rect) const { rect->setWH(SkIntToScalar(this->width()),
|
| + SkIntToScalar(this->height())); }
|
| +
|
| GrSurfaceOrigin origin() const {
|
| GrAssert(kTopLeft_GrSurfaceOrigin == fDesc.fOrigin || kBottomLeft_GrSurfaceOrigin == fDesc.fOrigin);
|
| return fDesc.fOrigin;
|
|
|