Stop using GrDrawState to track stencil state
Review URL: http://codereview.appspot.com/6227047/
git-svn-id: http://skia.googlecode.com/svn/trunk@4021 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index 12b0457..0e5125c 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -70,7 +70,6 @@
} fUnpremulConversion;
GrDrawState fHWDrawState;
- bool fHWStencilClip;
// As flush of GL state proceeds it updates fHDrawState
// to reflect the new state. Later parts of the state flush
@@ -269,6 +268,23 @@
}
} fHWAAState;
+ // The high bit of the stencil buffer is used for clipping. This enum is
+ // used to track whether the clip bit of the stencil buffer is being used,
+ // manipulated, or neither.
+ enum StencilClipMode {
+ // Draw to the clip bit of the stencil buffer
+ kModifyClip_StencilClipMode,
+ // Clip against the existing representation of the clip in the high bit
+ // of the stencil buffer.
+ kUseClip_StencilClipMode,
+ // Neither writing to nor clipping against the clip bit.
+ kIgnoreClip_StencilClipMode,
+ // Unknown state of HW
+ kInvalid_StencilClipMode,
+ };
+ StencilClipMode fHWStencilClipMode;
+ GrStencilSettings fHWStencilSettings;
+
GrDrawState::DrawFace fHWDrawFace;
TriState fHWWriteToColor;
TriState fHWDitherEnabled;