diff options
author | Brian Osman <brianosman@google.com> | 2018-07-11 10:02:07 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-11 14:30:58 +0000 |
commit | 532b3f944a4991064963aee8f535c695f4068368 (patch) | |
tree | 671769fb6808a70240c1f857594e7f36b4ae8074 /src/gpu/ccpr | |
parent | c87cfb674bcaf27062dd11f88f1337af70173a11 (diff) |
Remove clamping of kPlus with F16 configs
The most common use-case for F16 is to draw things that are explicitly
outside of [0,1]. We can't prevent out-of-range values in general, users
could just draw out-of-range content in src mode. We've decided that
it's best to avoid surprising behavior, and trust the user in these
situations.
This effectively reverts https://skia-review.googlesource.com/c/skia/+/48183
Bug: skia:
Change-Id: I71c2dd925c567e2862d96ab70c752f19245a69c4
Reviewed-on: https://skia-review.googlesource.com/140500
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/ccpr')
-rw-r--r-- | src/gpu/ccpr/GrCCDrawPathsOp.cpp | 5 | ||||
-rw-r--r-- | src/gpu/ccpr/GrCCDrawPathsOp.h | 3 | ||||
-rw-r--r-- | src/gpu/ccpr/GrCCPerFlushResources.cpp | 5 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.cpp b/src/gpu/ccpr/GrCCDrawPathsOp.cpp index 042a45bb4e..2d250deb00 100644 --- a/src/gpu/ccpr/GrCCDrawPathsOp.cpp +++ b/src/gpu/ccpr/GrCCDrawPathsOp.cpp @@ -109,12 +109,11 @@ GrCCDrawPathsOp::SingleDraw::~SingleDraw() { } GrDrawOp::RequiresDstTexture GrCCDrawPathsOp::finalize(const GrCaps& caps, - const GrAppliedClip* clip, - GrPixelConfigIsClamped dstIsClamped) { + const GrAppliedClip* clip) { SkASSERT(1 == fNumDraws); // There should only be one single path draw in this Op right now. GrProcessorSet::Analysis analysis = fProcessors.finalize(fDraws.head().fColor, GrProcessorAnalysisCoverage::kSingleChannel, - clip, false, caps, dstIsClamped, &fDraws.head().fColor); + clip, false, caps, &fDraws.head().fColor); return RequiresDstTexture(analysis.requiresDstTexture()); } diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.h b/src/gpu/ccpr/GrCCDrawPathsOp.h index 9509bb8a07..9ef317f759 100644 --- a/src/gpu/ccpr/GrCCDrawPathsOp.h +++ b/src/gpu/ccpr/GrCCDrawPathsOp.h @@ -36,8 +36,7 @@ public: const char* name() const override { return "GrCCDrawPathsOp"; } FixedFunctionFlags fixedFunctionFlags() const override { return FixedFunctionFlags::kNone; } - RequiresDstTexture finalize(const GrCaps&, const GrAppliedClip*, - GrPixelConfigIsClamped) override; + RequiresDstTexture finalize(const GrCaps&, const GrAppliedClip*) override; bool onCombineIfPossible(GrOp*, const GrCaps&) override; void visitProxies(const VisitProxyFunc& fn) const override { fProcessors.visitProxies(fn); } void onPrepare(GrOpFlushState*) override {} diff --git a/src/gpu/ccpr/GrCCPerFlushResources.cpp b/src/gpu/ccpr/GrCCPerFlushResources.cpp index dd0bf1b473..bc586be85e 100644 --- a/src/gpu/ccpr/GrCCPerFlushResources.cpp +++ b/src/gpu/ccpr/GrCCPerFlushResources.cpp @@ -24,8 +24,9 @@ namespace { class AtlasOp : public GrDrawOp { public: FixedFunctionFlags fixedFunctionFlags() const override { return FixedFunctionFlags::kNone; } - RequiresDstTexture finalize(const GrCaps&, const GrAppliedClip*, - GrPixelConfigIsClamped) override { return RequiresDstTexture::kNo; } + RequiresDstTexture finalize(const GrCaps&, const GrAppliedClip*) override { + return RequiresDstTexture::kNo; + } bool onCombineIfPossible(GrOp* other, const GrCaps&) override { SK_ABORT("Only expected one Op per CCPR atlas."); return true; |