Commit Graph

1433 Commits

Author SHA1 Message Date
reed
f38b0d86b8 add SkRecordOptimize2 and an experimental API for more aggressive opts
BUG=skia:

Review URL: https://codereview.chromium.org/1462973002
2015-11-19 10:31:08 -08:00
mtklein
6c7b104b4c 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/+/988adddd48322bfa3e3cb0c017cfce71fbbf1123

Review URL: https://codereview.chromium.org/1455163004
2015-11-19 09:40:48 -08:00
reed
ff53af85f6 add --write option to dump_record
BUG=skia:

Review URL: https://codereview.chromium.org/1459823003
2015-11-19 08:18:04 -08:00
bsalomon
f045d600fc Make block size a template parameter of SkTLList
Review URL: https://codereview.chromium.org/1457123002
2015-11-18 19:01:12 -08:00
mtklein
c8e8fc6e98 Revert of Fix UB in SkDivBits (patchset #2 id:10002 of https://codereview.chromium.org/1455163004/ )
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/+/988adddd48322bfa3e3cb0c017cfce71fbbf1123

TBR=caryclark@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3562

Review URL: https://codereview.chromium.org/1457863002
2015-11-18 14:01:07 -08:00
benjaminwagner
a445cbccef In BUILD.public, remove compile-time dependency on GL.
BUG=skia:

Review URL: https://codereview.chromium.org/1458603006
2015-11-18 13:48:47 -08:00
benjaminwagner
39e7aa48d7 Remove Lua from the Google3 build.
See internal cl/107087297 for details.

Rename some variables in BUILD/BUILD.public.

BUG=skia:

Review URL: https://codereview.chromium.org/1425013008
2015-11-18 13:26:10 -08:00
mtklein
2f2903d7a0 restore dump_record
And,
    - 4 space indents
    - print out time units (microseconds)

BUG=skia:

Review URL: https://codereview.chromium.org/1458943002
2015-11-18 11:06:37 -08:00
mtklein
988adddd48 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

Review URL: https://codereview.chromium.org/1455163004
2015-11-18 09:56:28 -08:00
mtklein
835c1b69a2 Clean up dead code: PictureRenderer
Doesn't appear to actually be used by anything.

BUG=skia:

Review URL: https://codereview.chromium.org/1457753002
2015-11-18 09:41:06 -08:00
mtklein
accaf480c3 stifle Math test on Mac bot too
BUG=skia:3562

Review URL: https://codereview.chromium.org/1454093002
2015-11-18 07:56:30 -08:00
mtklein
f19385387d Clean up dead code: filter.
We haven't used this since at least landing the new SkPicture backend.

BUG=skia:

Review URL: https://codereview.chromium.org/1459583003
2015-11-18 07:45:09 -08:00
mtklein
f970ad6ee1 Clean up dead code: render_pdfs.
DM can do this.

BUG=skia:

Review URL: https://codereview.chromium.org/1461633002
2015-11-18 06:39:01 -08:00
msarett
44509faece Disable testcase7.bmp on SkImageDecoder and clean up dm_flags
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
2015-11-17 07:36:11 -08:00
mtklein
566b23c571 Revert of skstd -> std for unique_ptr (patchset #9 id:160001 of https://codereview.chromium.org/1436033003/ )
Reason for revert:
10.9 bots are too old too.

Original issue's description:
> skstd -> std for unique_ptr
>
> TBR=reed@google.com
> No public API changes.
>
> BUG=skia:4564
>
> Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50

TBR=bungeman@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4564

Review URL: https://codereview.chromium.org/1446413002
2015-11-16 13:05:37 -08:00
mtklein
755c553c17 skstd -> std for unique_ptr
TBR=reed@google.com
No public API changes.

BUG=skia:4564

Review URL: https://codereview.chromium.org/1436033003
2015-11-16 12:57:52 -08:00
msarett
a7a21cffe1 Disable incomplete image tests in nanobench
BUG=skia:

Review URL: https://codereview.chromium.org/1448893003
2015-11-16 08:43:23 -08:00
egdaniel
e659a581f6 Move GrGLPrimitive/GeometryProc to GLSL
BUG=skia:

Review URL: https://codereview.chromium.org/1441683008
2015-11-13 09:55:43 -08:00
cdalton
60795d99ff Add visualbench option for nvpr stencil samples
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
2015-11-13 09:10:31 -08:00
cdalton
f844177496 Fix visualbench flicker on triple buffered platforms
BUG=skia:

Review URL: https://codereview.chromium.org/1441073005
2015-11-13 08:56:31 -08:00
cdalton
1023725bb6 Make visualbench timing continuous for no-reset mode
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
2015-11-13 08:42:06 -08:00
egdaniel
fa4cc8bf2a Move XferProcessors to glsl
This is basically a move and rename

TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1440073002
2015-11-13 08:34:52 -08:00
cdalton
266e2024ec Add visualbench option to not reset between samples
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
2015-11-13 08:28:49 -08:00
msarett
506e19a4c8 Move SkBitmapRegionDecoder to include/android and src/android
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
2015-11-13 06:11:09 -08:00
msarett
7fdda6091c Lock pixels again after dummy reset of pixel ref in SkBitmapRegionCodec
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
2015-11-13 05:56:27 -08:00
mtklein
23267db678 SkAtomic: always use std::atomic
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
2015-11-12 11:07:53 -08:00
mtklein
64593525de Replace SkFunction with std::function
TBR=reed@google.com
No public API changes.

Review URL: https://codereview.chromium.org/1441753002
2015-11-12 10:41:05 -08:00
scroggo
95105938da Add include guards for SkBRDAllocator
One step towards fixing the master-skia build

Review URL: https://codereview.chromium.org/1440883002
2015-11-11 22:54:24 -08:00
msarett
cb8d719d7a Make BRD take advantage of zero initialized memory
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
2015-11-11 13:30:43 -08:00
msarett
b5213e69c5 Change quality settings on SkImageDecoder_libjpeg
It has been demonstrated that higher quality settings
really do make a difference in the visual quality of
the output image.
https://code.google.com/p/chromium/issues/detail?id=385515
https://code.google.com/p/skia/issues/detail?id=3770

We are planning to replace SkImageDecoder with SkCodec,
and SkCodec will use the higher quality settings.  As
a first step, we are using SkCodec as the underlying
implementation for BitmapRegionDecoder.  CTS tests require
that BitmapRegionDecoder be a close match to BitmapFactory
(which uses SkImageDecoder), so we must also update the
quality of SkImageDecoder to maintain CTS compatibility.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/69ad6a9d03dd6f14b7c730465319313725a7c903

Review URL: https://codereview.chromium.org/1412803009
2015-11-11 06:41:02 -08:00
msarett
49115b57cb Add an Allocator interface that indicates if memory is zero init
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
2015-11-11 06:21:27 -08:00
msarett
84a8065275 Reorganize BRD code in new tools directory
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
2015-11-10 15:49:46 -08:00
msarett
5c9e34a350 Delete dead BitmapRegionDecoder code in tools
This approach to subset decoding is no longer supported.
We have replaced it with an implementation that does not
depend on forked libraries.
https://codereview.chromium.org/1406153015/

BUG=skia:

Review URL: https://codereview.chromium.org/1406033007
2015-11-10 15:24:10 -08:00
joshualitt
43f610f693 Parse command line arguments for sdl + android
TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/1432983002
2015-11-10 08:27:22 -08:00
halcanary
6950de6c41 Comments Style: s/skbug.com/bug.skia.org/
DOCS_PREVIEW= https://skia.org/?cl=1432503003

Review URL: https://codereview.chromium.org/1432503003
2015-11-07 05:29:00 -08:00
msarett
5cb4885b4c Rename SkBitmapRegionDecoder and Create function
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
2015-11-06 08:56:32 -08:00
msarett
fcff08c830 SkBitmapRegionCodec needs to use the rowBytes on the pixel ref
BUG=skia:4538

Review URL: https://codereview.chromium.org/1422023006
2015-11-05 15:00:56 -08:00
halcanary
6aff54c322 tools/git-sync-deps: speed up common case by skipping fetch
Review URL: https://codereview.chromium.org/1431713002
2015-11-03 09:50:03 -08:00
mtklein
f27f08b76d DM+VB: WallTimer -> SkTime::GetNSecs().
The same timer with a simpler interface.

BUG=skia:

Review URL: https://codereview.chromium.org/1427033003
2015-11-03 06:54:24 -08:00
iroth
8b99ef4347 Enable building Skia for iOS with bazel.
BUG=skia:

Review URL: https://codereview.chromium.org/1429863002
2015-11-02 11:11:21 -08:00
benjaminwagner
9dbec09251 In BUILD.public, specify alwayslink for skia library.
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
2015-11-02 05:53:39 -08:00
caryclark
ef784fb7f5 More conic-specific tests revealed a few conic-specific bugs. Because javascript / canvas make visualizing conics tricky, new native tools are required.
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
2015-10-30 12:03:06 -07:00
bsalomon
f93982a477 Don't run nvpr on TSAN bot
Review URL: https://codereview.chromium.org/1405223006
2015-10-30 09:05:32 -07:00
benjaminwagner
8a3760f8b2 For BUILD.public, let SkPreConfig.h set SK_RELEASE based on NDEBUG.
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
2015-10-29 13:40:28 -07:00
msarett
c37799282f Make DMSrcSink fail fatally when decodeRegion() fails for BRDSrcs
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
2015-10-27 13:28:25 -07:00
msarett
3f65e93b19 Add NewFromStream and getEncodedFormat to BitmapRegionDecoder
The function will be needed in Android.

BUG=skia:

Review URL: https://codereview.chromium.org/1425833002
2015-10-27 13:12:59 -07:00
msarett
35e5d1b449 Refactor SkBitmapRegionDecoderInterface for Android
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
2015-10-27 12:50:25 -07:00
cdalton
e6d2024c68 Flush GrContext between benchmark draw loops
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
2015-10-26 13:45:29 -07:00
cdalton
c70483f5ab Add visualbench option for device-independent fonts
BUG=skia:

Review URL: https://codereview.chromium.org/1421723004
2015-10-26 13:14:36 -07:00
benjaminwagner
86ea33e963 Enable BUILD file compilation of skia and dm with --config=android_arm.
Corresponding google3 cl is 105687529.

BUG=skia:

Review URL: https://codereview.chromium.org/1414643002
2015-10-26 10:46:25 -07:00