Index: include/gpu/GrContext.h |
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
index 8bdc9f5b2d99fcf87964345723901559d51bd422..16ebeed342d32122de050add3841919289016485 100644 |
--- a/include/gpu/GrContext.h |
+++ b/include/gpu/GrContext.h |
@@ -514,6 +514,11 @@ public: |
*/ |
void discardRenderTarget(GrRenderTarget*); |
+ /** |
+ * An ID associated with this context, guaranteed to be unique. |
+ */ |
+ uint32_t uniqueID() { return fUniqueID; } |
+ |
/////////////////////////////////////////////////////////////////////////// |
// Legacy functions, to be removed once Chromium stops using them. |
@@ -614,6 +619,7 @@ private: |
int fMaxTextureSizeOverride; |
const Options fOptions; |
+ const uint32_t fUniqueID; |
GrContext(const Options&); // init must be called after the constructor. |
bool init(GrBackend, GrBackendContext); |