aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/GrAuditTrail.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2016-11-11 12:38:40 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-11 18:24:56 +0000
commit294870ff119b89fc902773643b054f14e5d1f554 (patch)
tree8666a14ff9bd50c9138dcbc6f3331e51b8113268 /include/private/GrAuditTrail.h
parent498d403f7703cb2157bf3c877b84906db5a06cd4 (diff)
Add explicit UniqueID classes for GrGpuResource & GrSurfaceProxy
This sets the stage for using the Proxy's/RenderTargetContext's ID above the flush and the RenderTarget's/GrGpuResource's below the flush. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4650 Change-Id: I9f1e6b00c02a0691d90b58c49e1d8c60684884c1 Reviewed-on: https://skia-review.googlesource.com/4650 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/private/GrAuditTrail.h')
-rw-r--r--include/private/GrAuditTrail.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/private/GrAuditTrail.h b/include/private/GrAuditTrail.h
index b39f13f362..6e8c92ddb6 100644
--- a/include/private/GrAuditTrail.h
+++ b/include/private/GrAuditTrail.h
@@ -9,6 +9,7 @@
#define GrAuditTrail_DEFINED
#include "GrConfig.h"
+#include "GrGpuResource.h"
#include "SkRect.h"
#include "SkString.h"
#include "SkTArray.h"
@@ -107,13 +108,14 @@ public:
// We could just return our internal bookkeeping struct if copying the data out becomes
// a performance issue, but until then its nice to decouple
struct BatchInfo {
- SkRect fBounds;
- uint32_t fRenderTargetUniqueID;
+ SkRect fBounds;
+ // TODO: switch over to GrSurfaceProxy::UniqueID
+ GrGpuResource::UniqueID fRenderTargetUniqueID;
struct Batch {
int fClientID;
SkRect fBounds;
};
- SkTArray<Batch> fBatches;
+ SkTArray<Batch> fBatches;
};
void getBoundsByClientID(SkTArray<BatchInfo>* outInfo, int clientID);
@@ -139,10 +141,11 @@ private:
typedef SkTArray<Batch*> Batches;
struct BatchNode {
+ BatchNode(const GrGpuResource::UniqueID& id) : fRenderTargetUniqueID(id) { }
SkString toJson() const;
- SkRect fBounds;
- Batches fChildren;
- uint32_t fRenderTargetUniqueID;
+ SkRect fBounds;
+ Batches fChildren;
+ const GrGpuResource::UniqueID fRenderTargetUniqueID;
};
typedef SkTArray<std::unique_ptr<BatchNode>, true> BatchList;