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
This should make the (veto) and (skipped: ) both less verbose and easier to grok.
Looks like this'll bring the log files down from ~50M to ~1.5M.
BUG=skia:
Review URL: https://codereview.chromium.org/1516563002
Use correct config variable in command buffer gl context.
Before, the fConfig was errorneously used to initialize the
local variable. eglChooseConfig would update the local variable
and the fConfig member variable would never be updated.
Also add error checks to all initialization function calls.
BUG=skia:
Review URL: https://codereview.chromium.org/1505233002
- Update SkCodec's dox to point out that some of the data must be
read twice in order to decode
- Add an accessor that reports how much is needed for reading twice
- Make SkCodec default to use peek()
If an input stream supports peek()ing, peek() instead of reading.
This way the stream need not implement rewind()
- Make SkCodec use read() + rewind() as a backup
So that streams without peek() implemented can still function
properly (assuming they can rewind).
- read everything we may need to determine the format once
In SkCodec::NewFromStream, peek()/read() 14 bytes, which is enough
to read all of the types we support. Pass the buffer to each subtype,
which will have enough info to determine whether it is the right
type. This simplifies the code and results in less reading and
rewinding.
- NOTE: SkWbmpCodec needs the following number of bytes for the header
+ 1 (type)
+ 1 (reserved)
+ 3 (width - bytes needed to support up to 0xFFFF)
+ 3 (height - bytes needed to support up to 0xFFFF)
= 8
- in SkWebpCodec, support using read + rewind as a backup if peek does
not work.
A change in Android will add peek() to JavaInputStreamAdapter.
BUG=skia:3257
Review URL: https://codereview.chromium.org/1472123002
Will no longer be needed once ag/817367 lands - Android will be
inheriting directly from SkPngChunkReader, so no need for the
intermediate.
BUG=skia:4574
Review URL: https://codereview.chromium.org/1470913004
We think this might be more flexible. It allows, e.g, function-level blacklisting,
and here an easy one-stop-shop blacklist for all of third_party/externals.
BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/1509733003
It's undefined behavior to pass null as src or dst to memcpy, even if len is 0.
This currently triggers -fsanitize=attribute-nonnull warnings, but also can
lead to very unexpected code generation with GCC.
sk_careful_memcpy() checks len first before calling memcpy(),
which prevents that weird undefined situation.
This allows me to mark all sanitizers as no-recover, i.e. make-the-bots-red fatal.
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot
BUG=skia:4641
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/1510683002