Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Unified Diff: include/private/GrSurfaceProxy.h

Issue 2299523004: Flush some non-substantive Ganesh changes (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698