Chromium Code Reviews| 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. |