This extra atomic bool is hard to think about, and I'm worried about how
updates to fGenerationID and fUniqueGenerationID interlace. By storing
them in the same int, they can't ever race.
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot
BUG=skia:
Review URL: https://codereview.chromium.org/955043002
Fix path bugs exposed by the path fuzzer.
Changes to existing gm and samplecode files defer their calls to construct
SkPath objects until the first draw instead of at test initialization.
Add an experimental call to SkPath to validate the internal SkPathRef.
Fix SkPath::addPoly to set the last moveto after adding a close verb.
Fix stroke to handle failures when computing the unit normal.
Add a unit test for the unit normal failure.
R=reed@google.com
Review URL: https://codereview.chromium.org/953383002
Removes the disabled SSE2 optimization of ColorRect32 and deletes
the two files containing the code.
Measured on both Core Haswell and Atom Silvermont, and only got
some miniscule improvement compared to the default implementation.
Also tried to write a new, ultimate, version of this optimization,
but only got ~5% improvement on ColorRect32-heavy tests.
Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
Review URL: https://codereview.chromium.org/957433002
Like SkTRacy<T>, TSAN will not complain about these. Unlike SkTRacy<T>, TSAN
should not complain about these: SkAtomic<T> are threadsafe.
This should fix the races now suppressed in TSAN. As written, the memory
barriers we're using in SkPixelRef will be dumb but safe (really, dumbest
possible but safest possible). If we see a perf hit, we can follow up by
putting Ben and I in a room for a while, thinking about it really hard, and
using the minimum-strength safe memory barriers.
A refactor that steals a bit from the genID would also still be possible with
this approach.
BUG=chromium:437511
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot
Review URL: https://codereview.chromium.org/955803002
To avoid lifetime issues for tiles backed by discardable memory, use an
image generator to re-generate them on the fly.
With this CL, we are now caching bitmap shaders wrapping discardable
pixel ref bitmaps backed by picture image generators.
(the CL also includes some minor/unrelated SkPictureShader cleanup)
BUG=skia:3220
R=reed@google.com,halcanary@google.com
Review URL: https://codereview.chromium.org/866773002
This doesn't do anything about the issue of having too many indices, but it does move the fuzzer on to another assert.
BUG=skia:
Review URL: https://codereview.chromium.org/952993004
This should look suspiciously similar to tools/dm_flags.py. In fact, I
tweaked tools/dm_flags.py a bit to make it even more suspiciously similar.
I'll leave actually deduping this to future me.
I noticed we have an opportunity to make our Valgrind run of nanobench faster,
by not only making it not auto-calibrate (--loops 1) but also take only one
measurement (--samples 1). Should be 5-10x faster than the default.
BUG=skia:
Review URL: https://codereview.chromium.org/957503002
Reason for revert:
This actually *does* change the public API - fID is now private, and it was being used on Android. See 5242b865d3/logs/build.log :
In file included from frameworks/base/libs/hwui/tests/../font/Font.cpp:26:0:
external/skia/src/core/SkGlyph.h: In member function 'android::uirenderer::CachedGlyphInfo* android::uirenderer::Font::cacheGlyph(const SkPaint*, glyph_t, bool)':
external/skia/src/core/SkGlyph.h:157:17: error: 'uint32_t SkGlyph::fID' is private
uint32_t fID;
^
frameworks/base/libs/hwui/tests/../font/Font.cpp:482:39: error: within this context
newGlyph->mGlyphIndex = skiaGlyph.fID;
We need to update Android in order to hide fID.
Original issue's description:
> BUG=skia:
>
> (mtklein from here on)
> No public API changes.
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/f8d24e2c0c7b44b7ccf20e40890514db4cde7b15TBR=mtklein@google.com,herb@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/951353002
The CTFont already knows if a font might contain color glyphs,
so use that information directly instead of guessing ourselves.
Review URL: https://codereview.chromium.org/949933003
Because the glyph texture atlas is 1024x2048, on certain platforms
using mediump UVs is not enough resolution for doing texture lookups
and getting good results for distance fields. Bumping these
to highp solves this problem.
BUG=skia:3445
Review URL: https://codereview.chromium.org/951003002
The looper can generate more than one quad, but if any one is degenerate,
give up, but not before generating the state for the line join to
produce the correct end.
Before, the early return allowed the inside path to contain multiple
movetos that caused reversePath to assert.
R=reed@google.com
Review URL: https://codereview.chromium.org/948043002
Without this patch the iterator can end up running off the end of the conic weights if there is a mixture of degenerate and non-degenerate ops
Note: we might want to suppress the generation of degenerate conics and lines in SkPath::addRRect
BUG=459897
Review URL: https://codereview.chromium.org/954453003