Adding functionality for purgin graphics resource handles
This will allow a fix to WebKit for preventing a crash when the graphics
context is destroyed before the GrContext
BUG=http://code.google.com/p/chromium/issues/detail?id=85309
git-svn-id: http://skia.googlecode.com/svn/trunk@1551 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/include/GrContext.h b/gpu/include/GrContext.h
index 58c53ba..8809271 100644
--- a/gpu/include/GrContext.h
+++ b/gpu/include/GrContext.h
@@ -66,6 +66,13 @@
void contextLost();
/**
+ * Similar to contextLost, but makes no attempt to reset state.
+ * Use this method when GrContext destruction is pending, but
+ * the graphics context is destroyed first.
+ */
+ void contextDestroyed();
+
+ /**
* Frees gpu created by the context. Can be called to reduce GPU memory
* pressure.
*/