| Index: src/gpu/GrGpu.h
|
| diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
|
| index 5ce2528924085074a8e298fa836b71721dada968..e4669a25c506fa30baee1349a9d86b1822186ce8 100644
|
| --- a/src/gpu/GrGpu.h
|
| +++ b/src/gpu/GrGpu.h
|
| @@ -305,6 +305,18 @@
|
| fScissorState.fRect = rect;
|
| }
|
| void disableScissor() { fScissorState.fEnabled = false; }
|
| +
|
| + /**
|
| + * Like the scissor methods above this is called by setupClipping and
|
| + * should be flushed by the GrGpu subclass in flushGraphicsState. These
|
| + * stencil settings should be used in place of those on the GrDrawState.
|
| + * They have been adjusted to account for any interactions between the
|
| + * GrDrawState's stencil settings and stencil clipping.
|
| + */
|
| + void setStencilSettings(const GrStencilSettings& settings) {
|
| + fStencilSettings = settings;
|
| + }
|
| + void disableStencil() { fStencilSettings.setDisabled(); }
|
|
|
| // GrGpu subclass sets clip bit in the stencil buffer. The subclass is
|
| // free to clear the remaining bits to zero if masked clears are more
|
| @@ -357,8 +369,7 @@
|
| // prepares clip flushes gpu state before a draw
|
| bool setupClipAndFlushState(DrawType,
|
| const GrDeviceCoordTexture* dstCopy,
|
| - GrDrawState::AutoRestoreEffects*,
|
| - GrDrawState::AutoRestoreStencil*,
|
| + GrDrawState::AutoRestoreEffects* are,
|
| const SkRect* devBounds);
|
|
|
| // Functions used to map clip-respecting stencil tests into normal
|
| @@ -392,6 +403,9 @@
|
| bool fEnabled;
|
| SkIRect fRect;
|
| } fScissorState;
|
| +
|
| + // The final stencil settings to use as determined by the clip manager.
|
| + GrStencilSettings fStencilSettings;
|
|
|
| // Helpers for setting up geometry state
|
| void finalizeReservedVertices();
|
|
|