Remove clip to bounds GrContextOption
Change-Id: I02da998640a3dd8848426179a91a9105d1024f0e
Reviewed-on: https://skia-review.googlesource.com/9225
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 1130397..54ce44c 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -1255,7 +1255,6 @@
Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) const {
GrContextOptions grOptions;
grOptions.fImmediateMode = FLAGS_imm;
- grOptions.fClipDrawOpsToBounds = FLAGS_drawOpClip;
grOptions.fMaxOpCombineLookback = FLAGS_opLookback;
grOptions.fMaxOpCombineLookahead = FLAGS_opLookahead;
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index 2a77f67..3c1536e 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -40,10 +40,6 @@
immediately. Intended to ease debugging. */
bool fImmediateMode = false;
- /** For debugging purposes turn each GrDrawOp's bounds into a clip rect. This is used to
- verify that the clip bounds are conservative. */
- bool fClipDrawOpsToBounds = false;
-
/** For debugging, override the default maximum look-back or look-ahead window for GrOp
combining. */
int fMaxOpCombineLookback = -1;
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index a4c1852..cc7cba0 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -95,7 +95,6 @@
fDidTestPMConversions = false;
GrRenderTargetOpList::Options rtOpListOptions;
- rtOpListOptions.fClipDrawOpsToBounds = options.fClipDrawOpsToBounds;
rtOpListOptions.fMaxOpCombineLookback = options.fMaxOpCombineLookback;
rtOpListOptions.fMaxOpCombineLookahead = options.fMaxOpCombineLookahead;
GrPathRendererChain::Options prcOptions;
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp
index 4fc898c..51f55d9 100644
--- a/src/gpu/GrRenderTargetOpList.cpp
+++ b/src/gpu/GrRenderTargetOpList.cpp
@@ -56,7 +56,6 @@
// TODO: Stop extracting the context (currently needed by GrClip)
fContext = fGpu->getContext();
- fClipOpToBounds = options.fClipDrawOpsToBounds;
fMaxOpLookback = (options.fMaxOpCombineLookback < 0) ? kDefaultMaxOpLookback
: options.fMaxOpCombineLookback;
fMaxOpLookahead = (options.fMaxOpCombineLookahead < 0) ? kDefaultMaxOpLookahead
@@ -300,7 +299,7 @@
}
args.fCaps = this->caps();
args.fAnalysis = &analysis;
- if (analysis.usesPLSDstRead() || fClipOpToBounds) {
+ if (analysis.usesPLSDstRead()) {
GrGLIRect viewport;
viewport.fLeft = 0;
viewport.fBottom = 0;
@@ -359,7 +358,6 @@
if (!clip.apply(fContext, renderTargetContext, useHWAA, true, &appliedClip)) {
return;
}
- // TODO: respect fClipOpToBounds if we ever start computing bounds here.
// Coverage AA does not make sense when rendering to the stencil buffer. The caller should never
// attempt this in a situation that would require coverage AA.
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h
index 245ec87..8ecf232 100644
--- a/src/gpu/GrRenderTargetOpList.h
+++ b/src/gpu/GrRenderTargetOpList.h
@@ -41,7 +41,6 @@
public:
/** Options for GrRenderTargetOpList behavior. */
struct Options {
- bool fClipDrawOpsToBounds = false;
int fMaxOpCombineLookback = -1;
int fMaxOpCombineLookahead = -1;
};
@@ -172,7 +171,6 @@
GrGpu* fGpu;
GrResourceProvider* fResourceProvider;
- bool fClipOpToBounds;
int fMaxOpLookback;
int fMaxOpLookahead;