aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrResourceAllocator.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-07-18 13:56:48 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-18 18:51:02 +0000
commit715d08c381b4cc8af33d7dcdefc9533dcc97e4c9 (patch)
tree328830165cfa268c5a6645e30088472836283a18 /src/gpu/GrResourceAllocator.h
parent946c37057f2618af7eda34fd6d2dd8625a9e9b61 (diff)
Fix explicit allocation bug
Change-Id: I9866f563e02b2ab290cc46ede05f8eda21f6d3b2 Reviewed-on: https://skia-review.googlesource.com/142163 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrResourceAllocator.h')
-rw-r--r--src/gpu/GrResourceAllocator.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gpu/GrResourceAllocator.h b/src/gpu/GrResourceAllocator.h
index e71e3558c2..f383ee4653 100644
--- a/src/gpu/GrResourceAllocator.h
+++ b/src/gpu/GrResourceAllocator.h
@@ -19,6 +19,9 @@
class GrResourceProvider;
class GrUninstantiateProxyTracker;
+// Print out explicit allocation information
+#define GR_ALLOCATION_SPEW 0
+
/*
* The ResourceAllocator explicitly distributes GPU resources at flush time. It operates by
* being given the usage intervals of the various proxies. It keeps these intervals in a singly
@@ -74,6 +77,10 @@ public:
void markEndOfOpList(int opListIndex);
+#if GR_ALLOCATION_SPEW
+ void dumpIntervals();
+#endif
+
private:
class Interval;
@@ -81,7 +88,7 @@ private:
void expire(unsigned int curIndex);
// These two methods wrap the interactions with the free pool
- void freeUpSurface(sk_sp<GrSurface> surface);
+ void recycleSurface(sk_sp<GrSurface> surface);
sk_sp<GrSurface> findSurfaceFor(const GrSurfaceProxy* proxy, bool needsStencil);
struct FreePoolTraits {