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>
This commit is contained in:
Brian Salomon 2017-03-03 14:37:38 -05:00 committed by Skia Commit-Bot
parent 651cbe9af6
commit e370cbe2bf
5 changed files with 1 additions and 11 deletions

View File

@ -1255,7 +1255,6 @@ DEFINE_int32(opLookahead, -1, "Maximum GrOp lookahead for combining, negative me
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;

View File

@ -40,10 +40,6 @@ struct GrContextOptions {
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;

View File

@ -95,7 +95,6 @@ void GrContext::initCommon(const GrContextOptions& options) {
fDidTestPMConversions = false;
GrRenderTargetOpList::Options rtOpListOptions;
rtOpListOptions.fClipDrawOpsToBounds = options.fClipDrawOpsToBounds;
rtOpListOptions.fMaxOpCombineLookback = options.fMaxOpCombineLookback;
rtOpListOptions.fMaxOpCombineLookahead = options.fMaxOpCombineLookahead;
GrPathRendererChain::Options prcOptions;

View File

@ -56,7 +56,6 @@ GrRenderTargetOpList::GrRenderTargetOpList(GrRenderTargetProxy* rtp, GrGpu* gpu,
// 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 @@ void GrRenderTargetOpList::addDrawOp(const GrPipelineBuilder& pipelineBuilder,
}
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 @@ void GrRenderTargetOpList::stencilPath(GrRenderTargetContext* renderTargetContex
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.

View File

@ -41,7 +41,6 @@ class GrRenderTargetOpList final : public GrOpList {
public:
/** Options for GrRenderTargetOpList behavior. */
struct Options {
bool fClipDrawOpsToBounds = false;
int fMaxOpCombineLookback = -1;
int fMaxOpCombineLookahead = -1;
};
@ -172,7 +171,6 @@ private:
GrGpu* fGpu;
GrResourceProvider* fResourceProvider;
bool fClipOpToBounds;
int fMaxOpLookback;
int fMaxOpLookahead;