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

Unified Diff: src/gpu/GrGpu.h

Issue 678843003: Revert of Clip mask manager sets stencil on draw type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | « src/gpu/GrDrawState.h ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698