Commit Graph

16805 Commits

Author SHA1 Message Date
bungeman
b8a1d30a42 Add font "index" to lmp parser.
When ttc index support was added, it was added and tested on Android
with the jb parser. This adds it to the lmp parser.

Review URL: https://codereview.chromium.org/1023313002
2015-03-23 09:08:54 -07:00
reed
8010632f24 remove meaningless matrix benches, add mapPts() and add new benches
mapPts definitely faster than mapPoints (identity and perspective same speed). Up to 3x for large values of N.

cloned from https://codereview.chromium.org/1031443002/

BUG=skia:

Review URL: https://codereview.chromium.org/1030653002
2015-03-23 08:15:14 -07:00
joshualitt
9c328187d9 Initial change to move text blob to GrTextContext
BUG=skia:

Review URL: https://codereview.chromium.org/1019633002
2015-03-23 08:13:04 -07:00
tomhudson
c589f6c968 Get rid of excess cleverness in benchmark
RotatedRectBench was asking for its base layer size, which may
not be what it expects with odd canvas modes (particularly proxies).
Most benchmarks are not so sophisticated; they hard-wire their
size and just use that (expected) value.

R=mtklein@google.com,djsollen@google.com
BUG=skia:3566

Review URL: https://codereview.chromium.org/1015013004
2015-03-23 07:46:13 -07:00
tomhudson
68260fa1e9 Make SkCanvas::getBaseLayerSize() virtual
Subclasses of SkCanvas may need to override the behavior here - for
example, any proxy or deferred canvas may not know its own size and
need to delegate to another object.

We'll also work on reducing use of this function
(https://skbug.com/3569), but some of the current uses seem to be
semantically necessary.

R=reed@google.com
BUG=skia:3566

Review URL: https://codereview.chromium.org/1022423002
2015-03-23 07:22:40 -07:00
kkinnunen
dc3d96890f Fix two typos in coding style
Fix two typos in coding style:
- Memory Managemt
- if (NULL == x) equated to if (x)
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1032463002

Review URL: https://codereview.chromium.org/1032463002
2015-03-23 06:27:23 -07:00
robertphillips
3e5c2b1041 Preserve texture compression when saving a revised skp from debugger
Without this CL, saving a revised skp out the debugger can greatly expand the memory it requires.

Review URL: https://codereview.chromium.org/1020103005
2015-03-23 05:46:51 -07:00
kkinnunen
8dcb8b04f8 Do not playback pending commands for full deferred canvas writePixels
Do not playback pending commands for full deferred canvas writePixels.

Changes the test to catch cases where discard is done without
a snapshot.

Review URL: https://codereview.chromium.org/939103002
2015-03-23 02:18:02 -07:00
skia.buildbots
96017dc2b8 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=

Review URL: https://codereview.chromium.org/1030453002
2015-03-22 01:14:17 -07:00
reed
4a8562ba64 remove SK_SUPPORT_LEGACY_ARCTO_QUADS code
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1023103004
2015-03-20 19:41:10 -07:00
reed
2fcbcea3a4 change default impl to facilitate transition in blink/chrome
BUG=skia:
TBR=

need deps roll to see if this works... since skia can no longer build/test in this legacy mode.

Review URL: https://codereview.chromium.org/1026923002
2015-03-20 15:25:25 -07:00
reed
5fedef1c31 remove SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE code
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1020403002
2015-03-20 14:20:09 -07:00
mtklein
02f46cf878 Some usability ideas around SkTHash.
- By default, use new SkGoodHash to hash keys, which is:
    * for 4 byte values, use SkChecksum::Mix,
    * for SkStrings, use SkChecksum::Murmur3 on the data,
    * for other structs, shallow hash the struct with Murmur3.
  - Expand SkChecksum::Murmur3 to support non-4-byte-aligned data.
  - Add const foreach() methods.
  - Have foreach() take a functor, which allows lambdas.

BUG=skia:

Review URL: https://codereview.chromium.org/1021033002
2015-03-20 13:48:42 -07:00
reed
ce6acc9108 cleanup using constructors
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1024193002
2015-03-20 13:46:08 -07:00
reed
b640203cd5 use Sk2s for conics
BUG=skia:

Review URL: https://codereview.chromium.org/1025033002
2015-03-20 13:23:43 -07:00
mtklein
cea9f35fee Sk2x::invert() and Sk2x::approxInvert()
BUG=skia:

Review URL: https://codereview.chromium.org/1024993002
2015-03-20 13:17:42 -07:00
jvanverth
7b462a2b85 Return to old distance field glyph sizes.
Should fix some blurry or light glyphs on Windows.

Review URL: https://codereview.chromium.org/1026613003
2015-03-20 12:35:07 -07:00
halcanary
db0dcc7436 PDF: remove last use of SkPDFImage
Add a GM.

BUG=skia:255

Review URL: https://codereview.chromium.org/950633003
2015-03-20 12:31:52 -07:00
mtklein
bf0c56f82b Hack around skia:3570 for now.
BUG=skia:3570

Review URL: https://codereview.chromium.org/1021353002
2015-03-20 12:21:53 -07:00
scroggo
1dd3ea9d45 Add SkEncodedFormat, used by SkCodec.
Needed by Android to determine the format.

Review URL: https://codereview.chromium.org/1018953003
2015-03-20 11:55:55 -07:00
mtklein
01a78130dc Add divide to Sk2x, use native vdiv and vsqrt on ARM 64.
Tests pass on N7 + N9.

BUG=skia:

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Build-Ubuntu-GCC-Arm64-Release-Android-Trybot

Review URL: https://codereview.chromium.org/1027753003
2015-03-20 11:28:52 -07:00
mtklein
f224f138da Allow negative error for Sk4f::sqrt() test.
BUG=skia:

Review URL: https://codereview.chromium.org/1028743002
2015-03-20 11:20:12 -07:00
scroggo
3614f123e8 Make android framework depend on SkCodec.
This results in exporting include/codec so the framework can use it.

Review URL: https://codereview.chromium.org/1020903002
2015-03-20 11:20:03 -07:00
joshualitt
6e8cd96719 Let text contexts fall back directly to paths
BUG=skia:

Review URL: https://codereview.chromium.org/1015173002
2015-03-20 10:30:14 -07:00
reed
1b600d3446 Revert of PDF: remove last use of SkPDFImage (patchset #5 id:120001 of https://codereview.chromium.org/950633003/)
Reason for revert:
static void draw(SkCanvas* canvas,
                 const SkPaint& p,
                 const SkBitmap& src,
                 SkColorType colorType,
                 const char text[]) {
    SkASSERT(src.colorType() == colorType);
    canvas->drawBitmap(src, 0.0f, 0.0f);
    canvas->drawText(text, strlen(text), 0.0f, 12.0f, p);
}

This assert is firing, at least on macs, where all images get decoded into 32bit at the moment.

Original issue's description:
> PDF: remove last use of SkPDFImage
>
> Add a GM.
>
> BUG=skia:255
>
> Committed: https://skia.googlesource.com/skia/+/86ad8d643624a55b02e529100bbe4e2940115fa1

TBR=mtklein@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:255

Review URL: https://codereview.chromium.org/1024113002
2015-03-20 10:03:36 -07:00
mtklein
b79ff56de2 Specialize Sk2d for ARM64
The implementation is nearly identical to Sk2f, with these changes:
  - float32x2_t -> float64x2_t
  - vfoo -> vfooq
  - one extra Newton's method step in sqrt().

Also, generally fix NEON detection to be defined(SK_ARM_HAS_NEON).
SK_ARM_HAS_NEON is not being set on ARM64 bots right now (nor does the compiler
seem to set __ARM_NEON__), so this CL fixes everything up.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/e57b5cab261a243dcbefa74c91c896c28959bf09

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Build-Ubuntu-GCC-Arm64-Release-Android-Trybot

Review URL: https://codereview.chromium.org/1020963002
2015-03-20 09:25:26 -07:00
henrik.smiding
70840cbd89 Replace SSE optimization of Color32A_D565
Adds an SSE2 version of the Color32A_D565 function, to replace
the existing SSE4 version. Also does some minor cleanup.

Performance improvement in the following Skia benchmarks.
Measured on Atom Silvermont:
  Xfermode_SrcOver       - x3
  luma_colorfilter_large - x4.6
  luma_colorfilter_small - x2
  tablebench             - ~15%
  chart_bw               - ~10%

Measured on Corei7 Haswell:
luma_colorfilter_large running SSE2 - x2
luma_colorfilter_large running SSE4 - x2.3

Also improves performance in WPS Office application and 2D subtest of 0xbenchmark on Android.

Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>

Review URL: https://codereview.chromium.org/923523002
2015-03-20 09:20:46 -07:00
halcanary
86ad8d6436 PDF: remove last use of SkPDFImage
Add a GM.

BUG=skia:255

Review URL: https://codereview.chromium.org/950633003
2015-03-20 09:10:56 -07:00
senorblanco
d4bb991df8 Add a new GM to show problems with shear/rotate CTM w/ image filters.
Review URL: https://codereview.chromium.org/1028663002
2015-03-20 08:54:32 -07:00
mtklein
c3ce1d28a5 Revert of Specialize Sk2d for ARM64 (patchset #3 id:40001 of https://codereview.chromium.org/1020963002/)
Reason for revert:
https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Mac10.7-Clang-Arm7-Debug-iOS/builds/2441/steps/build%20most/logs/stdio

https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Mac10.7-Clang-Arm7-Release-iOS/builds/2424/steps/build%20most/logs/stdio

https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Ubuntu-GCC-Arm64-Release-Android/builds/8/steps/build%20most/logs/stdio

Original issue's description:
> Specialize Sk2d for ARM64
>
> The implementation is nearly identical to Sk2f, with these changes:
>   - float32x2_t -> float64x2_t
>   - vfoo -> vfooq
>   - one extra Newton's method step in sqrt().
>
> Also, generally fix NEON detection to be defined(SK_ARM_HAS_NEON).
> SK_ARM_HAS_NEON is not being set on ARM64 bots right now (nor does the compiler
> seem to set __ARM_NEON__), so this CL fixes everything up.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e57b5cab261a243dcbefa74c91c896c28959bf09

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

Review URL: https://codereview.chromium.org/1028523003
2015-03-20 08:46:34 -07:00
mtklein
e57b5cab26 Specialize Sk2d for ARM64
The implementation is nearly identical to Sk2f, with these changes:
  - float32x2_t -> float64x2_t
  - vfoo -> vfooq
  - one extra Newton's method step in sqrt().

Also, generally fix NEON detection to be defined(SK_ARM_HAS_NEON).
SK_ARM_HAS_NEON is not being set on ARM64 bots right now (nor does the compiler
seem to set __ARM_NEON__), so this CL fixes everything up.

BUG=skia:

Review URL: https://codereview.chromium.org/1020963002
2015-03-20 08:32:35 -07:00
Mike Klein
b502ee3ace Fix ambiguity in negate()s.
BUG=skia:

Review URL: https://codereview.chromium.org/1027793002
2015-03-20 11:19:01 -04:00
mtklein
92de013c9f Sk2x/Sk4x: add negate(), operator -()
BUG=skia:

Review URL: https://codereview.chromium.org/1027783002
2015-03-20 08:12:06 -07:00
egdaniel
9a0f629973 Only use 256x256 tiles on hd2000 nanobench bots
Initial experiments did show that the 256 tile size fixed the hd2000 win7
nanobot failures. However it did not have any effect on other bots, so this
change is to move back to the larger tile size on all bots expect for the
hd2000.

BUG=skia:

Review URL: https://codereview.chromium.org/1022083002
2015-03-20 07:03:52 -07:00
robertphillips
ca75ea871e Disable sharing of stencil buffers across differently sized rendertargets
Due to revertapalooza, stencil buffers shared across differently sized rendertargets aren't getting cleared correctly. This CL disables the sharing until the clearing issues can be remedied. Note that stencil buffers should still be shared between identically sized render targets and should still be lazily allocated.

Review URL: https://codereview.chromium.org/1020203002
2015-03-20 06:43:11 -07:00
senorblanco
8c874eee94 Move SkMatrixImageFilter into core, and add a factory fn for it.
BUG=skia:

Review URL: https://codereview.chromium.org/1011273003
2015-03-20 06:38:17 -07:00
senorblanco
977b6f7e7b Remove deprecated flavour of SkDropShadowImageFilter::Create().
Review URL: https://codereview.chromium.org/1026603002
2015-03-20 06:38:00 -07:00
mtklein
3e490b7146 Guard SIMD code with !defined(SKNX_NO_SIMD).
This should make it easy to compare performance of the non-SIMD Sk2x / Sk4x
code with our existing portable scalar code.  I'm not adding this to SkPMFloat
only because we don't have an existing scalar baseline there to compare to.

We'll have to keep our wits about us: I just tried your new benchmarks, and
Clang's autovectorizer produced almost as good SSE as we did with intrinsics for
geo_evalquadat1 and geo_evalquadtangentat1, but not for geo_chopquadat1,
which went serial.

BUG=skia:

Review URL: https://codereview.chromium.org/1026723003
2015-03-20 06:33:02 -07:00
reed
8dc0ccb8d3 disable LCD for layers w/ filters
BUG=468311

see also skiabug.com/3567

Review URL: https://codereview.chromium.org/1002603003
2015-03-20 06:32:52 -07:00
reed
40b7dd57ef use Sk2s for EvalQuadTangent and ChopQuadAt
cloned from https://codereview.chromium.org/1026633002/

BUG=skia:

Review URL: https://codereview.chromium.org/1024873003
2015-03-20 06:01:08 -07:00
mtklein
26bf90e5d6 operator overloads for Sk4x, use them all where possible
BUG=skia:
NOTRY=true

Review URL: https://codereview.chromium.org/1024633003
2015-03-20 06:00:57 -07:00
reed
adf9990cb5 add SkMatrix::decomposeScale
BUG=skia:

Review URL: https://codereview.chromium.org/1006173005
2015-03-19 16:10:54 -07:00
mtklein
d800d878ca Try out operator overloads for Sk2x.
BUG=skia:

Review URL: https://codereview.chromium.org/1024473005
2015-03-19 14:28:31 -07:00
bungeman
12f03121bb Support BGR with DirectWrite.
BUG=chromium:468509

Review URL: https://codereview.chromium.org/1018863003
2015-03-19 13:57:36 -07:00
senorblanco
6c1b338827 Remove now-unused uniqueID param from SkDropShadowImageFilter::Create().
Also make both input & crop rect default NULL, as in other filter Create functions.

BUG=skia:

Review URL: https://codereview.chromium.org/1016343002
2015-03-19 13:39:19 -07:00
egdaniel
89c2a540a3 Blacklist certain win7 gms that are never finishing on dm
BUG=skia:

Review URL: https://codereview.chromium.org/1013483004
2015-03-19 13:09:17 -07:00
mtklein
5553bedf60 Sk2x for NEON
Also decreases the precision of Sk4f::rsqrt() for speed, keeping Sk4f::sqrt() the same:
instead of doing two estimation steps in rsqrt(), do one there and one more in sqrt().

Tests pass on my Nexus 7.  float64x2_t is still a TODO for when I get a hold of a Nexus 9.

BUG=skia:

Review URL: https://codereview.chromium.org/1018423003
2015-03-19 12:08:29 -07:00
mtklein
950e986b1b Port to real Sk2f.
The bench improves from 39 to 30, about half from porting to Sk2f, half from
x.add(x) instead of x.multiply(two).

Remove Sk4f Load2/store2 now that we have Sk2f.

BUG=skia:

Review URL: https://codereview.chromium.org/1019773004
2015-03-19 12:03:29 -07:00
reed
a402e7654d remove unneeded SK_SUPPORT_LEGACY_MIPMAP_EFFECTIVE_SCALE guard
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1019343002
2015-03-19 11:37:18 -07:00
jvanverth
24ba008250 Add minimum size for using distance fields.
Since we're not scaling down as far, we can increase the base
sizes a little.

Also darken debug text colors to get better value comparison
with black.

BUG=skia:3541

Review URL: https://codereview.chromium.org/1001183003
2015-03-19 11:34:13 -07:00