Skip to content

small improvements on the PorterDuff functions#1042

Merged
JimBobSquarePants merged 2 commits into
SixLabors:masterfrom
jongleur1983:PorterDuffImprovement
Nov 5, 2019
Merged

small improvements on the PorterDuff functions#1042
JimBobSquarePants merged 2 commits into
SixLabors:masterfrom
jongleur1983:PorterDuffImprovement

Conversation

@jongleur1983

Copy link
Copy Markdown
Contributor

Explanation of the changes:

line 167:
dstW + srcW + blendW
= dstW + (source.W - blendW) + blendW
= dstW + source.W - blendW + blendW
= dstW + source.W

line 194:
dstW + blendW
= (destination.W - blendW) + blendW
= destination.W - blendW + blendW
= destination.W

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

removes two additions that are not necessary.

jongleur1983 and others added 2 commits November 1, 2019 18:29
line 167:
    dstW + srcW + blendW
= dstW + (src.W - blendW) + blendW
= destination.W + source.W - blendW + blendW
= destination.W + source.W

line 194:
   dstW + blendW
= (destination.W - blendW) + blendW
= destination.W - blendW + blendW
= destination.W
@codecov

codecov Bot commented Nov 5, 2019

Copy link
Copy Markdown

Codecov Report

Merging #1042 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1042   +/-   ##
=======================================
  Coverage   89.86%   89.86%           
=======================================
  Files        1104     1104           
  Lines       48948    48948           
  Branches     3452     3452           
=======================================
  Hits        43987    43987           
  Misses       4250     4250           
  Partials      711      711
Impacted Files Coverage Δ
.../PixelFormats/PixelBlenders/PorterDuffFunctions.cs 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d091027...f076b30. Read the comment docs.

@JimBobSquarePants JimBobSquarePants merged commit 41c7651 into SixLabors:master Nov 5, 2019
@JimBobSquarePants JimBobSquarePants added this to the 1.0.0-rc1 milestone Nov 5, 2019
@jongleur1983 jongleur1983 deleted the PorterDuffImprovement branch December 3, 2019 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants