Index: include/private/GrSurfaceProxy.h |
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h |
index 01c52675a4a037c3c2d4ececfef673c7aa602111..2939cc03eb3b17f67c67af82d88516361eb9a9b2 100644 |
--- a/include/private/GrSurfaceProxy.h |
+++ b/include/private/GrSurfaceProxy.h |
@@ -29,6 +29,11 @@ public: |
uint32_t uniqueID() const { return fUniqueID; } |
/** |
+ * Helper that gets the width and height of the surface as a bounding rectangle. |
+ */ |
+ SkRect getBoundsRect() const { return SkRect::MakeIWH(this->width(), this->height()); } |
+ |
+ /** |
* @return the texture proxy associated with the surface proxy, may be NULL. |
*/ |
virtual GrTextureProxy* asTextureProxy() { return nullptr; } |
@@ -40,6 +45,11 @@ public: |
virtual GrRenderTargetProxy* asRenderTargetProxy() { return nullptr; } |
virtual const GrRenderTargetProxy* asRenderTargetProxy() const { return nullptr; } |
+ /** |
+ * Does the resource count against the resource budget? |
+ */ |
+ SkBudgeted isBudgeted() const { return fBudgeted; } |
+ |
protected: |
GrSurfaceProxy(const GrSurfaceDesc& desc, SkBackingFit fit, SkBudgeted budgeted) |
: fDesc(desc) |