Commit Graph

3118 Commits

Author SHA1 Message Date
Mike Reed
bdf6c62a19 srgb conversion needs to be in unpremul
Bug: skia:
Change-Id: Ic7dffb2cb30aae33a6c127ab10ea4282e1360114
Reviewed-on: https://skia-review.googlesource.com/21536
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-07-06 12:51:24 +00:00
Mike Reed
a920d367bf remove unneeded code for index8 imagse
Bug: skia:6828
Change-Id: I039d6bc35a1ed93ce747247f32fe4e9d5b09da0c
Reviewed-on: https://skia-review.googlesource.com/21400
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-03 19:07:25 +00:00
wutao
039a7c70ce Added new edge handling mode (clamp and repeat) to Gaussian blur filter.
Gaussian blur filter will interpolate value by using out of bounds
coords, which is 0. This makes it appears darker near the bounds in the
blurred images. There are two issues: 1) when downsampling and
upsampling, we should use GrTextureDomainEffect kClamp_Mode to clamp
the texture coords to the bounds; 2) during Gaussian blur, we need to
clamp to texture bounds.

BUG=622128
TEST=cc_unittests, GM image test & manual. Some test results can be found at:
https://bugs.chromium.org/p/chromium/issues/detail?id=622128#c49
Change-Id: I9283da1d91efb0da94a991f2d372e9f62c288bdc
Reviewed-on: https://skia-review.googlesource.com/20465
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-06-30 18:11:16 +00:00
Greg Daniel
95581bbba1 Allow caps on hairlines for gpu dashed lines
Bug: skia:
Change-Id: Ie3b61e0a308f7cbec65166f2f2ac4fe3cc5d16d0
Reviewed-on: https://skia-review.googlesource.com/21364
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-30 15:21:10 +00:00
Greg Daniel
5fb30566b4 Fix gpu dashing for case when circle dashes are large enough to overlap
Bug: skia:
Change-Id: I7153b28103c5ca0947c37d57357b64bf2aa884e5
Reviewed-on: https://skia-review.googlesource.com/20979
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-06-29 16:56:49 +00:00
Robert Phillips
806be2d501 Improve handling of clip stack ID
Change-Id: I1d5cf06d9b50c370f969a8778181fe94f7d35844
Reviewed-on: https://skia-review.googlesource.com/21061
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-28 21:20:32 +00:00
Eric Boren
89cd35795f Fix recipes/tests for new Debian bots
Bug: skia:6612
Change-Id: I2920bb7b1aa3ebb021223ed6345f13f1f9c8bc24
Reviewed-on: https://skia-review.googlesource.com/21141
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2017-06-28 18:46:16 +00:00
Robert Phillips
a4f792da37 Fix for Android batching bug
On Android it looks like we have:
   stencilClip1
   draw1
   stencilClip2
   draw2

where draw1 is being forward combined with draw2 b.c. they are both stencil clipped but it shouldn't b.c. they are different stencil clips.

Change-Id: Ia704d7ab869022a055eed0726e2b7fab8eaaf817
Reviewed-on: https://skia-review.googlesource.com/20977
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-28 18:26:06 +00:00
Brian Osman
515ccafc98 Adjust path_stroke_with_zero_length to draw on pixel centers
Bug: skia:
Change-Id: I1183574de4e3a429fe00c5a6a0f71745f1f6f5b4
Reviewed-on: https://skia-review.googlesource.com/20969
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-27 19:08:47 +00:00
Florin Malita
26249e0e1d Expand 2pt conical gradient gm with repeat/mirror
Change-Id: Iabb67dbf133690c649e9687233c4bfcb396db0cf
Reviewed-on: https://skia-review.googlesource.com/20971
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-06-27 18:27:47 +00:00
Robert Phillips
70e3e9adc5 Remove SkImageFilter::MakeBlur entry point
AFAICT none of our clients use this entry point and it is tangling up efforts to add a new parameter to the BlurImageFilter.

Change-Id: I494634db98a1d246854a5e3735380fbe55f425c2
Reviewed-on: https://skia-review.googlesource.com/20837
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-27 12:49:25 +00:00
wutao
0dc1f4f4cd Add GM image test for blur with clamp mode.
Adding a GM (Golden Master) image test in Skia to reproduce the bleed
black issue in Chrome. This would allow regressions to be caught in
Skia's status page before being rolled into Chrome.

Bug: 622128
Change-Id: Ifd2824fff59483c8e4be48392ba467414d41ca13
TEST=imageblurclampmode.cpp
Reviewed-on: https://skia-review.googlesource.com/20778
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-06-27 11:37:26 +00:00
Mike Klein
0cc60b8bbd fix repeat/mirror sampling bleed
I think this has been broken since we tried to simplify this in
  https://skia-review.googlesource.com/16547

The HSW backend does still look a little wrong, but improved,
and the others seem fixed.  Can you see how this affects your
test cases, layout tests, etc?

BUG=skia:6783

Change-Id: I17957ac8100331bea5b64d674bf43105048b72f6
Reviewed-on: https://skia-review.googlesource.com/20548
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-06-22 19:46:51 +00:00
Mike Reed
0bdaf05fc1 remove unused mode parameter from SkMergeImageFilter
Bug: skia:
Change-Id: Iaa46aaef130a337987c3528685f59c56387d4a7d
Reviewed-on: https://skia-review.googlesource.com/20210
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-19 14:01:56 +00:00
Mike Reed
6b9cd051b4 remove unused variants in imagefilter factories
Bug: skia:
Change-Id: Ife12bfa1c16f9dd87b24f73d3b260b0d2f46c7df
Reviewed-on: https://skia-review.googlesource.com/20207
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-19 01:57:51 +00:00
Robert Phillips
fbcef6eb8a Clean up GrResourceProvider usage
The only substantive changes are the removal of GrProxy instantiation in:

SkGpuBlurUtils::GaussianBlur
GrSimpleTextureEffect::Make*

Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc
Reviewed-on: https://skia-review.googlesource.com/19965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-15 17:18:19 +00:00
Brian Salomon
baaf439eb5 Revert "Revert "Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses.""
This reverts commit a0485d9452.

Bug: skia:
Change-Id: If50b2d1af285a6c3c943373bb7258b56e1af28d6
Reviewed-on: https://skia-review.googlesource.com/19961
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-15 16:49:40 +00:00
Brian Salomon
a0485d9452 Revert "Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses."
This reverts commit 1ec03f33cf.

Revert "Fix logic reversal in NonAAFillRectOp test factory"

This reverts commit 89c1c2552e.

Reason: Unexpected GM changes.

Bug: skia:
Change-Id: I9edf5f0e4a54b5cad86bd438a505aaaef38563de
Reviewed-on: https://skia-review.googlesource.com/19960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-14 23:32:05 +00:00
Brian Salomon
1ec03f33cf Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses.
Consolidates op factory functions to a rewritten GrRectOpFactory.

Removes GrRenderTargetContext::drawNonAAFilledRect() in favor of creating and adding ops directly by the callers.

Change-Id: I57e5fc739bf4e92b4a4710c739e6d22cce82a479
Reviewed-on: https://skia-review.googlesource.com/17711
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-06-14 20:26:51 +00:00
Robert Phillips
646e4293f0 Retract GrTexture*.h & GrRenderTarget*.h from other headers
This does push some additional work (& includes) into the .cpp files.

Change-Id: I27c847e371802270d13594dcc22aae44039990bb
Reviewed-on: https://skia-review.googlesource.com/19660
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-13 17:21:41 +00:00
Eric Karl
7a8c84c6c9 Reland DeferredTextureImageData low-bit-depth/dithering support
Cause DeferredTextureImageData functionality to support low bit depth
(4444, 565) image formats (with dithering).

Updated to handle colorspace + 4444 colortype correctly.

Bug: 720105
Change-Id: Ib7e14d937849f4f6b08fda6992a240bb203d0089
Reviewed-on: https://skia-review.googlesource.com/19094
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-12 18:27:48 +00:00
Robert Phillips
d9d84858bf Retract GrTexture.h a bit
This began as cleaning up SkSpecialImage.h & spiraled out of control from there.

Change-Id: I9a570ecd2a7af9ee724ebfebe4e9185748f38bbc
Reviewed-on: https://skia-review.googlesource.com/19290
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-09 17:29:09 +00:00
Chris Dalton
febbffad1c Improve cubic KLM accuracy
Moves cubic root finding logic out of GrPathUtils and
PathOpsCubicIntersectionTest, and unifies it in SkGeometry.

"Normalizes" the homogeneous parameter values of the roots, rather
than the cubic inflection function. Does this normalization by
twiddling the exponents instead of division (which causes a loss of
precision).

Abandons the built-in derivatives in GrCubicEffect. These don't have
high enough precision on many mobile gpus. Instead we pass the KLM
matrix to the vertex shader via uniform, where we can use it to set up
new linear functionals from which the fragment shader can calculate
the gradient of the implicit function.

Bug: skia:4410
Change-Id: Ibd64e999520adc8cdef7803a492d3699995aef5a
Reviewed-on: https://skia-review.googlesource.com/19017
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-06-09 17:13:54 +00:00
Mike Reed
01b2b83aba Extend composeshader to support a lerp parameter
Bug: skia:
Change-Id: I3bbb2cb8d0a84fca0309654498548ebc94d8938f
Reviewed-on: https://skia-review.googlesource.com/18460
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-06-09 17:13:53 +00:00
Mike Reed
43e498e7e7 specialize D32 proc for legacy src
lots of dead-code removal

Bug: skia:
Change-Id: I23ea25eb38855b4776e97fa8ff777d9744baab1d
Reviewed-on: https://skia-review.googlesource.com/19147
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-09 00:48:50 +00:00
Brian Salomon
7fbeb5acdd Revert "Revert "Revert "DeferredTextureImageData low-bit-depth/dithering support"""
This reverts commit 840ff8837b.

Reason for revert: Not obvious to me how to fix, reverting the chrome CL that was dependent on this.

Original change's description:
> Revert "Revert "DeferredTextureImageData low-bit-depth/dithering support""
> 
> This reverts commit d7c681d6a7.
> 
> Reason for revert: New param already used in Chrome
> 
> Original change's description:
> > Revert "DeferredTextureImageData low-bit-depth/dithering support"
> > 
> > This reverts commit 2c075e749d.
> > 
> > Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10
> > 
> > Original change's description:
> > > DeferredTextureImageData low-bit-depth/dithering support
> > > 
> > > Cause DeferredTextureImageData functionality to support low bit depth
> > > (4444, 565) image formats (with dithering).
> > > 
> > > Bug: 720105
> > > Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791
> > > Reviewed-on: https://skia-review.googlesource.com/18945
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Eric Karl <ericrk@chromium.org>
> > 
> > TBR=bsalomon@google.com,ericrk@chromium.org
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 720105
> > 
> > Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b
> > Reviewed-on: https://skia-review.googlesource.com/19039
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 720105
> 
> Change-Id: I91e690d0564f04209a2bd677de9ae9eb9c0f90d3
> Reviewed-on: https://skia-review.googlesource.com/19041
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 720105

Change-Id: I63eb0051964ce99e187b4e4943ea79bc22d392d2
Reviewed-on: https://skia-review.googlesource.com/19046
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-08 14:02:20 +00:00
Brian Salomon
840ff8837b Revert "Revert "DeferredTextureImageData low-bit-depth/dithering support""
This reverts commit d7c681d6a7.

Reason for revert: New param already used in Chrome

Original change's description:
> Revert "DeferredTextureImageData low-bit-depth/dithering support"
> 
> This reverts commit 2c075e749d.
> 
> Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10
> 
> Original change's description:
> > DeferredTextureImageData low-bit-depth/dithering support
> > 
> > Cause DeferredTextureImageData functionality to support low bit depth
> > (4444, 565) image formats (with dithering).
> > 
> > Bug: 720105
> > Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791
> > Reviewed-on: https://skia-review.googlesource.com/18945
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Eric Karl <ericrk@chromium.org>
> 
> TBR=bsalomon@google.com,ericrk@chromium.org
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 720105
> 
> Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b
> Reviewed-on: https://skia-review.googlesource.com/19039
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 720105

Change-Id: I91e690d0564f04209a2bd677de9ae9eb9c0f90d3
Reviewed-on: https://skia-review.googlesource.com/19041
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-08 13:32:30 +00:00
Brian Salomon
d7c681d6a7 Revert "DeferredTextureImageData low-bit-depth/dithering support"
This reverts commit 2c075e749d.

Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10

Original change's description:
> DeferredTextureImageData low-bit-depth/dithering support
> 
> Cause DeferredTextureImageData functionality to support low bit depth
> (4444, 565) image formats (with dithering).
> 
> Bug: 720105
> Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791
> Reviewed-on: https://skia-review.googlesource.com/18945
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Eric Karl <ericrk@chromium.org>

TBR=bsalomon@google.com,ericrk@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 720105

Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b
Reviewed-on: https://skia-review.googlesource.com/19039
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-08 13:03:50 +00:00
Florin Malita
d1aeddeb8a Remove SkLinearGradient::kForce4fContext_PrivateFlag
... and related tests/gms.

We now exercise the 4f impl with raster-pipeline/burst, no need for a
special test flag.

Change-Id: If67684d2d8840b3c413db9eeebb051f59cbc5a34
Reviewed-on: https://skia-review.googlesource.com/19025
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-06-07 20:24:51 +00:00
Eric Karl
2c075e749d DeferredTextureImageData low-bit-depth/dithering support
Cause DeferredTextureImageData functionality to support low bit depth
(4444, 565) image formats (with dithering).

Bug: 720105
Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791
Reviewed-on: https://skia-review.googlesource.com/18945
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Karl <ericrk@chromium.org>
2017-06-07 20:19:46 +00:00
Leon Scroggins III
33deb7ed4d Make SkCodec more flexible about its required frame
SkCodec sets fRequiredFrame to be the earliest possible frame that a
given frame can depend on. e.g.

- Frame A fills the screen, Keep
- Frame B does not cover A, Keep
- Frame C covers B but not A, and is opaque

Frame C can depend on either A or B. SkCodec already reports that C
depends on A. This CL allows a client of SkCodec to use either A or
B to create C.

Also expose the DisposalMethod. Since any frame between A and C can
be used to create C except for DisposePrevious frames, the client
needs to be able to know the disposal method so they do not try to
use such a frame to create C.

Further, the disposal method can be used to give the client a better
idea whether they will continue to need a frame. (e.g. if frame i is
DisposePrevious and depends on i-1, the client may not want to steal
i-1 to create i, since i+1 may also depend on i-1.)

TODO: Share code for decoding prior frames between GIF and WEBP

Change-Id: I91a5ae22ba3d8dfbe0bde833fa67ae3da0d81ed6
Reviewed-on: https://skia-review.googlesource.com/13722
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-06-07 20:15:17 +00:00
Hal Canary
9982c4eb76 GM for drawImage w/ maskFilter
BUG=skia:237
Change-Id: I8b06fa5b0e05af28e010ccbd2772c64e3eaefdde
Reviewed-on: https://skia-review.googlesource.com/19026
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-07 20:08:46 +00:00
Chris Dalton
b246b9407f Fix croppedrects GM
The stroke-to-rect test was accidentally doing both non-aa draws and
non-filtered texture sampling on exact half pixel boundaries. So
sometimes the CPU and GPU rounded in different directions. This CL
updates the draws and sampling to fall on integer boundaries.

Bug: skia:5522
Change-Id: If968bcbb327106eba8919e4abf3a7211c5326daf
Reviewed-on: https://skia-review.googlesource.com/18960
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-06-07 16:41:37 +00:00
Greg Daniel
7785dd235d Update showmiplevel gm to round coords the same for both variations of the GM
The versions of showmiplevel that take both a width and height, round the
coords of draws to integers. The basic version did not do this which caused
sampling bugs on adreno when using nearest neighbor at half pixel coords.

Since this GM isn't testing the GPU rendering of the mips, this workaround is
okay.


Bug: skia:5905
Change-Id: I4080532e8c1f37d74c60089970c5d0fc83cd5373
Reviewed-on: https://skia-review.googlesource.com/18939
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-07 14:33:26 +00:00
Stephen White
3b5a3fa8b1 GrTessellator: implement out-of-range splitting and AEL rewinding.
Due to floating point inaccuracy, when intersecting edges, the
intersection point may fall above one of the edges' top vertices
or below one of the bottom vertices.  In these cases, we were simply
splitting one edge on the relevant endpoint of the other edge. This
is incorrect if the intersection is far from the endpoint (e.g.,
the test case in the linked bug, where one of the intersected edges
is near-horizontal but the intersection falls below both of its
endpoints, in the middle of the edge.)

The correct solution is to split both edges as normal, and take care
to produce edges with the correct ordering where the intersection is
above or below an edge. However, since the new vertex may be above
the current vertex, simply restarting intersection checks at the
current vertex won't work. We need to process the intersection
vertex before the current one.

This introduces another problem: unlike all other splitting modes
(which always shorten edges), splitting an edge above the top or 
below the bottom can lengthen it, causing it to violate the AEL 
with an adjacent edge which then shortens it back to the original 
point (in cleanup_active_edges()). Since the splitting and merging 
code can't agree, we loop forever.

Instead of simply fusing neighboring edges in cleanup_active_edges(), 
the proper fix to this problem is to detect the AEL violation and 
rewind all processing to the vertex above it. For performance, we 
only rewind when we detect that a split edge is no longer ordered 
within the mesh (merge_enclosing_edges()) or within the the AEL 
(rewind_if_necessary()).  We also store the enclosing edges of each 
vertex, which allows us to rewind quickly, since we know exactly which 
edges need to be added/removed from the AEL.

cleanup_active_edges(), fix_active_state() and Vertex::fProcessed have
been removed. In their place are rewind_active_edges() and 
rewind_if_necessary(), which uses the same logic as 
cleanup_active_edges() but uses it to know when to rewind.

Bug: skia:5026
Change-Id: I3638a429f5428498d6df6bb7b98c67374dc291aa
Reviewed-on: https://skia-review.googlesource.com/18900
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2017-06-07 00:09:15 +00:00
Matt Sarett
3928ff8e0b Create an SkColorSpaceXform image generator
This should be immediately useful in the Skia-Android
rendering pipeline.

Possible future uses include creating a "renderable"
SkImage from a bitmap with a funny color space.

Inspired by:
https://skia-review.googlesource.com/c/13981/

Bug: b/62347704
Change-Id: I388c7af1fc43834b8ad22022d0caf3ac90b734c8
Reviewed-on: https://skia-review.googlesource.com/18598
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-06-06 14:34:03 +00:00
Brian Osman
ad5a64604f In shapes_as_paths, draw zoom from pixmaps, not images
Trying to track down why the Galaxy S6 sometimes claims that every pixel
is different, even though the zoomed images look identical. It's helpful
to draw what's actually being diffed.

Bug: skia:6653
Change-Id: Ia577aa70ed11d806fa204eaffdef41e6a65a60f2
Reviewed-on: https://skia-review.googlesource.com/18623
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-05 18:10:47 +00:00
Brian Salomon
e23bffd65b Remove support in GPU backend for distance vector field.
Also, remvoes SkNormalBevelSource as this was the last use case for the distance vector field.

Change-Id: Ib0176c78e500e6b5130310934253a75860245812
Reviewed-on: https://skia-review.googlesource.com/18482
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-02 19:44:18 +00:00
Matt Sarett
d16084ffdc Better image for copyTo4444 test
This one produces noticeable differences if we fail to dither.

Bug:720105
Change-Id: I208d0c8147f4cca1b484f2f55edc09ce1bef2dcb
Reviewed-on: https://skia-review.googlesource.com/18036
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-06-01 17:01:53 +00:00
Mike Reed
a03d407aea fix and test colorfiltershader
Bug: skia:
Change-Id: I02fd77796880b42ce55549a8340b116e1c5f19d6
Reviewed-on: https://skia-review.googlesource.com/18305
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-06-01 13:58:05 +00:00
Florin Malita
bb3f5621a9 Revert "Revert "Delete SkGaussianEdgeShader""
This reverts commit 9d14f936cc.

Reason for revert: Android fix merged.

Original change's description:
> Revert "Delete SkGaussianEdgeShader"
> 
> This reverts commit 64790a3714.
> 
> Reason for revert: pending Android fix merge.
> 
> Original change's description:
> > Delete SkGaussianEdgeShader
> > 
> > No longer used.
> > 
> > Change-Id: I65a61696060ca19f528066ea587e140798450e36
> > Reviewed-on: https://skia-review.googlesource.com/18132
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> > 
> 
> TBR=jvanverth@google.com,fmalita@chromium.org,reed@google.com
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> 
> Change-Id: I88a428e942c78b1fc8e70501ba7fdda5727b2ab2
> Reviewed-on: https://skia-review.googlesource.com/18156
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> 

TBR=mtklein@google.com,jvanverth@google.com,reviews@skia.org,fmalita@chromium.org,reed@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true

Change-Id: Ia6c97a79a6425a28fab49984691505bf89ac9736
Reviewed-on: https://skia-review.googlesource.com/18227
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-31 14:52:12 +00:00
Florin Malita
9d14f936cc Revert "Delete SkGaussianEdgeShader"
This reverts commit 64790a3714.

Reason for revert: pending Android fix merge.

Original change's description:
> Delete SkGaussianEdgeShader
> 
> No longer used.
> 
> Change-Id: I65a61696060ca19f528066ea587e140798450e36
> Reviewed-on: https://skia-review.googlesource.com/18132
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> 

TBR=jvanverth@google.com,fmalita@chromium.org,reed@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true

Change-Id: I88a428e942c78b1fc8e70501ba7fdda5727b2ab2
Reviewed-on: https://skia-review.googlesource.com/18156
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-31 01:25:23 +00:00
Florin Malita
64790a3714 Delete SkGaussianEdgeShader
No longer used.

Change-Id: I65a61696060ca19f528066ea587e140798450e36
Reviewed-on: https://skia-review.googlesource.com/18132
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-30 20:34:29 +00:00
Greg Daniel
2cb7a1a3bf Add GM to test the IgnoreTransform flag on blurs
Bug: skia:
Change-Id: I2525daa83d78280e4be3b31b66dc4f13971af311
Reviewed-on: https://skia-review.googlesource.com/18066
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-05-30 15:34:49 +00:00
Florin Malita
4aed13889b Reland of SkShaderBase
Introduce a private base class (SkShaderBase), to hide
implementation details from the public interface (SkShader).

Change-Id: Ib1d76cde880bd51868b97408710f8bb38128e536
Reviewed-on: https://skia-review.googlesource.com/17925
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-25 14:59:07 +00:00
Florin Malita
d93e11ceb4 Revert "SkShaderBase"
This reverts commit 58a756435c.

Reason for revert: g3, Android borkage.

Original change's description:
> SkShaderBase
> 
> Introduce a private base class (SkShaderBase), to hide
> implementation details from the public interface (SkShader).
> 
> Change-Id: If3ec26ca6abc9da20e3f139c11fdc023bdd85176
> Reviewed-on: https://skia-review.googlesource.com/17241
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I32b012ee466dd006c074593f211f43ed602f1078
Reviewed-on: https://skia-review.googlesource.com/17845
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-24 21:15:57 +00:00
Florin Malita
58a756435c SkShaderBase
Introduce a private base class (SkShaderBase), to hide
implementation details from the public interface (SkShader).

Change-Id: If3ec26ca6abc9da20e3f139c11fdc023bdd85176
Reviewed-on: https://skia-review.googlesource.com/17241
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-05-24 19:56:15 +00:00
Florin Malita
14a6430b7b SkSTArenaAlloc
Syntactic sugar, gets rid of some boilerplate.

Change-Id: Ibdb28b7a8f1d5e4a4e18c12d423b987d7194e340
Reviewed-on: https://skia-review.googlesource.com/17837
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-05-24 19:20:45 +00:00
Mike Reed
d36968bd98 add image variant to patch gm
Bug: skia:
Change-Id: Icaa1e2854775d8a79a8b3520163a863605336d05
Reviewed-on: https://skia-review.googlesource.com/17792
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-05-24 01:58:22 +00:00
Brian Osman
0610a462ad Legacy raster still doesn't handle transparent LCD
Bug: skia:6655
Change-Id: I1431fb5bcf955dd32c15dad9d24a6a7a7aa626f0
Reviewed-on: https://skia-review.googlesource.com/17788
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-05-23 21:35:18 +00:00