Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: include/gpu/GrContext.h

Issue 17027003: Add flag bits for partial GrContext reset (Closed)
Patch Set: add flags for partial resetContext Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 5c796b26c034833348014bf558b8d0700115aebf..d2a95c6524356661cc6850c902f26ef76ba19344 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -56,13 +56,32 @@ public:
virtual ~GrContext();
+ enum GrState {
bsalomon 2013/06/18 10:16:32 For enums that are nested within a class we don't
+ kGrState_RenderTarget = 0x01 << 0,
+ kGrState_Texture = 0x01 << 1,
bsalomon 2013/06/18 10:16:32 TextureBindings?
+ kGrState_View = 0x01 << 2,
bsalomon 2013/06/18 10:16:32 View could use a comment, not obvious what state i
+ kGrState_Blend = 0x01 << 3,
+ kGrState_AA = 0x01 << 4,
+ kGrState_Vertex = 0x01 << 5,
+ kGrState_Stencil = 0x01 << 6,
+ kGrState_PixelStore = 0x01 << 7,
+ kGrState_Program = 0x01 << 8,
+ kGrState_PathStencil = 0x01 << 9,
+ kGrState_Misc = 0x01 << 10,
+ kGrState_ALL = 0xffff
+ };
/**
* The GrContext normally assumes that no outsider is setting state
* within the underlying 3D API's context/device/whatever. This call informs
* the context that the state was modified and it should resend. Shouldn't
* be called frequently for good performance.
*/
- void resetContext();
+ void resetContext(GrState state = kGrState_ALL);
+
+ /**
+ * Similiar to resetContext, but only reset texture binding state.
+ */
+ void resetTextureBinding();
bsalomon 2013/06/18 10:16:32 Let's just stick with the one resetContext() call
/**
* Callback function to allow classes to cleanup on GrContext destruction.
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698