aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrResourceAllocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrResourceAllocator.h')
-rw-r--r--src/gpu/GrResourceAllocator.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gpu/GrResourceAllocator.h b/src/gpu/GrResourceAllocator.h
index 3be4836ca9..d7aed0591e 100644
--- a/src/gpu/GrResourceAllocator.h
+++ b/src/gpu/GrResourceAllocator.h
@@ -54,7 +54,6 @@ public:
}
void assign();
- SkDEBUGCODE(void dump();)
private:
class Interval;
@@ -72,6 +71,7 @@ private:
}
static uint32_t Hash(const GrScratchKey& key) { return key.hash(); }
+ static void OnFree(GrSurface* s) { s->unref(); }
};
typedef SkTMultiMap<GrSurface, GrScratchKey, FreePoolTraits> FreePoolMultiMap;
@@ -98,12 +98,27 @@ private:
fNext = nullptr;
}
+ const GrSurfaceProxy* proxy() const { return fProxy; }
+ GrSurfaceProxy* proxy() { return fProxy; }
+ unsigned int start() const { return fStart; }
+ unsigned int end() const { return fEnd; }
+ const Interval* next() const { return fNext; }
+ Interval* next() { return fNext; }
+
+ void setNext(Interval* next) { fNext = next; }
+
+ void extendEnd(unsigned int newEnd) {
+ SkASSERT(newEnd >= fEnd);
+ fEnd = newEnd;
+ }
+
// for SkTDynamicHash
static const uint32_t& GetKey(const Interval& intvl) {
return intvl.fProxyID;
}
static uint32_t Hash(const uint32_t& key) { return key; }
+ private:
GrSurfaceProxy* fProxy;
uint32_t fProxyID; // This is here b.c. DynamicHash requires a ref to the key
unsigned int fStart;