In the current implementation, a blur filter is always created even in the
case when sigma.fX == 0 && sigma.fY == 0. This CL makes the blur filter
return input in this case.
BUG=568393
Review URL: https://codereview.chromium.org/1518643002
Found this while looking for uses of strlen (skbug.com/2810). This code
was written by a former member of the team and is not used.
BUG=skia:2810
Review URL: https://codereview.chromium.org/1512753006
Make SkAutoTMalloc's interface look more like SkAutoMalloc:
- add free(), which does what you expect
- make reset() return a pointer fPtr
No public API changes (SkAutoTMalloc is in include/private)
BUG=skia:2148
Review URL: https://codereview.chromium.org/1516833003
Use the pseudo-extension CHROMIUM_framebuffer_mixed_samples when
run with Chromium command buffer. The extension exposes
NV_framebuffer_mixed_samples subset that Skia needs in order to
use NV_path_rendering with mixed samples.
BUG=506765
Review URL: https://codereview.chromium.org/1507373004
Populate the NV_path_rendering functions provided by
CHROMIUM_path_rendering when the tools are being run with
command buffer API.
BUG=skia:2992
Review URL: https://codereview.chromium.org/1510163003
Extend the ends of hairline and haircurve segments when the paint is set to square or round, and the line or curve is at the start or end of a contour.
R=reed@google.com
BUG=skia:4599
Review URL: https://codereview.chromium.org/1491843006
We just did the same for libpng (see crrev.com/1512043002), so we
might as well do this here.
SkImageDecoder is deprecated, and SkCodec already has a way to turn
off its messages.
BUG=skia:1649
Review URL: https://codereview.chromium.org/1505953007
This should fix some odd formatting problems in the logs, e.g.
Note tally:
583x (skipped: Cannot convert to requested color type.
)
4x (--blacklist _ image decode 4bpp-pixeldata-cropped.bmp)
~~~>
Note tally:
583x (skipped: Cannot convert to requested color type.)
4x (--blacklist _ image decode 4bpp-pixeldata-cropped.bmp)
BUG=skia:
Review URL: https://codereview.chromium.org/1508223006
The old code says
runs += x + 1;
alpha += x + 1;
x = 0;
lastAlpha += x; // we don't want the +1
The last line does nothing. Remove this unnecessary line.
BUG=skia:401
Review URL: https://codereview.chromium.org/1506253002
Use an inline function that does a normal shift. When built for the sanitizer, add casts so that the shift is unsigned.
Also make a few fixes to do unsigned shifts or avoid the shift altogether; and add an argument spec to some macros.
R=reed@google.com,mtklein@google.com
BUG=skia:4633
Review URL: https://codereview.chromium.org/1503423003
Needed to enlarge radii to surface bugs without exceeding max texture size on low end devices.
BUG=chromium:477684
Review URL: https://codereview.chromium.org/1508003008
Make each filter responsible for expanding its destination
bounds. Previously, we were using a union of all
intermediate bounds sizes via join() calls in many image
filters' computeFastBounds(), due to the fact that those
filters could only produce bitmaps the same size as their
inputs. Now, we compute optimal bounds for each filter as
follows:
1) Pass the (unmodified) clip bounds to the root node
of the DAG in the first recursive call to onFilterImage()
as the Context's fClipBounds.
2) Reverse-map the clip: when recursing up the DAG in
filterInput[GPU](), apply filter-specific expansion to the
clip by calling calling onFilterNodeBounds(... kReverse).
This allows upstream nodes to have a clip that respects the
current node's requirements. This is done via helper
function mapContext().
3) Forward-map the source bitmap: just prior to applying
the crop rect in applyCropRect(), we determine the filter's
preferred bounds by mapping the source bitmap bounds
forwards via onFilterNodeBounds(..., kForward).
NOTE: GMs affected by this change:
fast_slow_blurimagefilter: fast and slow paths now produce the same result
spritebitmap: drawSprite() and drawBitmap() paths now produce the same result
filterfastbounds: fast bounds are optimized; all drop-shadow results now appear
apply-filter: snug and not-snug cases give same results
dropshadowimagefilter: drawSprite() results now show shadows
draw-with-filter: no artifacts on erode edges; blur edges no longer clipped
displacement, imagefiltersbase, imagefiltersclipped, imagefilterscropexpand, imagefiltersscaled, matriximagefilter,
resizeimagefilter, localmatriximagefilter, testimagefilters: fixed incorrect clipping
imagefilterstransformed, morphology: no artifacts on erode edges
BUG=skia:1062,skia:3194,skia:3939,skia:4337,skia:4526
Review URL: https://codereview.chromium.org/1308703007