Descriptioncc: Translate filter when texture is larger than quad rect
The passed in rendered content sits on the bottom-left of the texture,
with y=down (or top-right with y=up, makes no difference), but the alpha
threshold filter's region sits at top-left with y=down.
When the texture is blitted onto the scratch texture through the filter,
we normally line up correctly because the texture sizes are the same so
it doesn't matter if the textures exist at the top or bottom (because they
fill the whole texture).
When the texture is larger than the quad rect, the filter no longer lines
up with the content because the content sits at the bottom, and the filter
is on the top. This will happen when we minimize an application on chromeOS
that has an alpha threshold filter (ie hangouts).
The fix simply translates the filter by the difference in size between the
texture height and quad rect height.
There's also a test.
Committed: https://crrev.com/bc64aa4314dd27cc4cb9ee4939e722cd81edd73a
Cr-Commit-Position: refs/heads/master@{#316035}
Patch Set 1 #Patch Set 2 : readd tests I killed #Patch Set 3 : gl -> sw #
Messages
Total messages: 8 (3 generated)
|