Reason for revert:
Need to reland with #define guards for tiny layout test changes. (Yikes!)
Original issue's description:
> Fix UB in SkDivBits
>
> DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
> This turns numer into a uint32_t to make those defined, and adds a few notes.
>
> x >= 0 is always true for unsigned x, so we needed a few small logic refactors.
>
> BUG=skia:3562
>
> Committed: https://skia.googlesource.com/skia/+/988adddd48322bfa3e3cb0c017cfce71fbbf1123TBR=caryclark@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3562
Review URL: https://codereview.chromium.org/1457863002
DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
This turns numer into a uint32_t to make those defined, and adds a few notes.
x >= 0 is always true for unsigned x, so we needed a few small logic refactors.
BUG=skia:3562
Review URL: https://codereview.chromium.org/1455163004
testcase7.bmp leaves uninitialized memory.
Also remove "subset" dm flags. The "subset" test no longer
exists.
BUG=skia:
Review URL: https://codereview.chromium.org/1446303002
Repurposes the --nvpr flag as an int that says how many stencil samples
to use, or disables nvpr with a value of zero.
BUG=skia:
Review URL: https://codereview.chromium.org/1444543002
Ensures there is no period of time that is not on the clock when not
restting the graphics context between samples.
BUG=skia:
Review URL: https://codereview.chromium.org/1444473003
Adds a --reset flag that controls whether we teardown the graphics
context between samples. Also modifies the timing algorithm to always/
only pre-warm after resetting the context.
BUG=skia:
Review URL: https://codereview.chromium.org/1442643007
This will expose the BitmapRegionDecoder API as a public include
and move the implementation to src.
This makes this code more naturally exposed in Android and easier
to test in DM and nanobench.
BUG=skia:
Review URL: https://codereview.chromium.org/1438873002
This fixes a bug in Android. We cannot access the pixels after
calling decodeRegion() because the call to lock is missing.
BUG=skia:
Review URL: https://codereview.chromium.org/1442553003
We were doing it on Windows, now do it everywhere.
This just changes the backend. We could think about another step to actually
replacing all our sk_atomic_... with std atomic stuff.
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot
TBR=reed@google.com
Only deleting from include/...
Review URL: https://codereview.chromium.org/1441773002
This is the third step in a three part change:
(1) Skia: Add SkBRDAllocator.
(2) Android: Make JavaPixelAllocator and RecyclingClippingPixelAllocator
implement SkBRDAllocator.
(3) Skia: Change SkBitmapRegionDecoder to use SkBRDAllocator and take
advantage of zero allocated memory when possible.
BUG=skia:
Review URL: https://codereview.chromium.org/1420053010
This is the first step in a three part change:
(1) Skia: Add SkBRDAllocator.
(2) Android: Make JavaPixelAllocator and RecyclingClippingPixelAllocator
implement SkBRDAllocator.
(3) Skia: Change SkBitmapRegionDecoder to use SkBRDAllocator and take
advantage of zero allocated memory when possible.
BUG=skia:
Review URL: https://codereview.chromium.org/1423253004
Rename SkCodecTools.h to SkBitmapRegionDecoderPriv.h
Move BRD code to its own directory in tools. This
allows us to not need to expose the entire tools
directory in Android.
BUG=skia:
Review URL: https://codereview.chromium.org/1417393004
We no longer need to worry about namespace
conflicts SkBitmapRegionDecoder in Android (which
we are replacing).
Additionally, the static Create() function does not
need to repeat the name BitmapRegionDecoder.
BUG=skia:
Review URL: https://codereview.chromium.org/1415243007
Some Skia classes use SkTRegistry, which requires the source files be linked in order to be registered.
Also replace "*CG*" with "SkImageDecoder_CG.cpp" for clarity.
BUG=skia:
Review URL: https://codereview.chromium.org/1405023013
The utility SubsetPath removes parts of a potentially very large path to isolate a minimal test case. SubsetPath is very useful for debugging path ops, but is not path ops specific.
PathOpsBuilderConicTest compares the output of the Path Ops Builder, sequential calls to Simplify, and SkRegions for some number of rotated ovals.
Some tests caused path ops to hang. It was caught adding a loop of curves because the head was not found by the tail. Even though the root cause has been fixed, SkSegment::addCurveTo callers now abort the path op if the same curve was added twice.
The subdivided conic weight was been computed anew. Fortunately, it's a simpler computation that the one it replaces.
Some Simplify() subroutines returned false to signal that the results needed assembling. Change these to abort the current operation instead.
Coincident curve intersection triggered two small bugs; one where no perpendicular could be found for coincident curves, and one where no coincident curves remain after looping.
The SixtyOvals test can be run through multiple processes instead of multiple threads. This strategy allows a 48 core machine to saturate all cores at 100%.
The DEBUG_VISUALIZE_CONICS code in PathOpsConicIntersectionTest acknowleges that it is easier to visualize conics with Skia than with script and html canvas. This test also verifies that path ops subdivision matches geometry chopping.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1405383004
Use DumpStackTrace in SkASSERT in GOOGLE3.
There are extra assertions enabled in debug mode that cause RecordDraw_TextBounds to fail.
New include causes a naming conflict with global name "base".
Corresponding internal cl/106495354
No public API changes.
TBR=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1423013004
This involves disabling webps for kCanvas_Strategy.
We have not yet implemented webp subset decodes for this
strategy.
BUG=skia:4521
Review URL: https://codereview.chromium.org/1405273004
The result SkBitmap, the pixel allocator, and the alpha
preference need to be communicated from the client to
the region decoder.
BUG=skia:
Review URL: https://codereview.chromium.org/1418093006
This change updates a small subset of benchmarks to flush the GrContext
between draw loops (specifically SKP benchmarks, SampleApp, and the
warmup in visualbench). This helps improve timing accuracy by not
allowing the gpu to batch across draw boundaries in the affected
benchmarks.
BUG=skia:
Review URL: https://codereview.chromium.org/1427533002