platform/upstream/libSkiaSharp.git
9 years agoReturn cropBitmap
zoran.jovanovic [Wed, 15 Apr 2015 12:48:54 +0000 (05:48 -0700)]
Return cropBitmap

cropBitmap returns 'true' on success and 'false' on failure.
Propagate its return value so that cascading failures can be avoided.

Signed-off-by: Mykola Kondratenko <mykola.kondratenko@sonymobile.com>
BUG=skia:

Review URL: https://codereview.chromium.org/1088093003

9 years agoConvert BitmapTextBatch from STArray to AutoSTMalloc
joshualitt [Wed, 15 Apr 2015 12:31:57 +0000 (05:31 -0700)]
Convert BitmapTextBatch from STArray to AutoSTMalloc

BUG=skia:

Review URL: https://codereview.chromium.org/1088533002

9 years agoRoll common DEPS: fix string concat error in gs_utils upload
borenet [Wed, 15 Apr 2015 11:49:32 +0000 (04:49 -0700)]
Roll common DEPS: fix string concat error in gs_utils upload

TBR=jcgregorio
BUG=skia:3723

Review URL: https://codereview.chromium.org/1057653006

9 years agoadd new blit2 methods in support of antialiased hairlines
reed [Wed, 15 Apr 2015 01:39:57 +0000 (18:39 -0700)]
add new blit2 methods in support of antialiased hairlines

before:
   9M 1 528µs 530µs 539µs 607µs 5% ▁▁▁▁▁▁▁▁█▂ 8888 path_hairline_small_AA_quad

after:
   9M 1 355µs 356µs 358µs 375µs 2% ▂▁▁▁▁▁▁▁▁█ 8888 path_hairline_small_AA_quad

BUG=skia:

does require new baselines (bug chrome is guarded)

Review URL: https://codereview.chromium.org/1060153003

9 years agoConvert BitmapTextBlob from using STArray to AutoSTMalloc
joshualitt [Tue, 14 Apr 2015 21:33:37 +0000 (14:33 -0700)]
Convert BitmapTextBlob from using STArray to AutoSTMalloc

BUG=skia:

Review URL: https://codereview.chromium.org/1083703002

9 years agoDM: add --multiPage option
halcanary [Tue, 14 Apr 2015 21:06:18 +0000 (14:06 -0700)]
DM: add --multiPage option

Motivation: I want to switch back to single-page output by default for
direct comparison to raster backends in Gold.

I can still test the multi-page option via a command-line switch.

BUG=skia:3721

Review URL: https://codereview.chromium.org/1063873004

9 years agoSk4h and Sk8h for SSE
mtklein [Tue, 14 Apr 2015 21:02:52 +0000 (14:02 -0700)]
Sk4h and Sk8h for SSE

These will underly the SkPMFloat-like class for uint16_t components.

Sk4h will back a single-pixel version, and Sk8h any larger number than that.

BUG=skia:

Review URL: https://codereview.chromium.org/1088883005

9 years agocleanup codec names being produced by dm and uploaded to gold
djsollen [Tue, 14 Apr 2015 20:47:51 +0000 (13:47 -0700)]
cleanup codec names being produced by dm and uploaded to gold

Review URL: https://codereview.chromium.org/1072933004

9 years agoStart canonicalizing color for all A8 textblobs
joshualitt [Tue, 14 Apr 2015 19:17:27 +0000 (12:17 -0700)]
Start canonicalizing color for all A8 textblobs

BUG=skia:

Review URL: https://codereview.chromium.org/1076593002

9 years agoRename SkNi to SkNb.
mtklein [Tue, 14 Apr 2015 18:49:14 +0000 (11:49 -0700)]
Rename SkNi to SkNb.

As used today, SkNi is used in bool-y contexts.  This keeps that, but under a
new name, SkNb.  This makes room for a new SkNi that's focused on integer-y
things like loads, stores, arithmetic, etc.

The main reason to split these is that we want different specializations for
each use case: for bools, it's important for us to specialize 32- and 64-bit to
support efficient float- and double- comparisons, but for integer work we're
more likely to be looking at 8- and 16- bit lanes.  Keeping these use cases
siloed helps me manage the compexity of the backend NEON and SSE code.

BUG=skia:

Review URL: https://codereview.chromium.org/1083123002

9 years agochange hairline procs to take array of points
reed [Tue, 14 Apr 2015 17:40:44 +0000 (10:40 -0700)]
change hairline procs to take array of points

BUG=skia:

Review URL: https://codereview.chromium.org/1085883002

9 years agoUpdate common DEPS: adding retries to GS upload
borenet [Tue, 14 Apr 2015 17:37:33 +0000 (10:37 -0700)]
Update common DEPS: adding retries to GS upload

BUG=skia:3723

Review URL: https://codereview.chromium.org/1083663006

9 years agoAdd GM to exercise high quality anisotropic scaling
robertphillips [Tue, 14 Apr 2015 15:19:01 +0000 (08:19 -0700)]
Add GM to exercise high quality anisotropic scaling

High quality anisotropic is an interesting edge case for the gpu backend. For scales that are both minimizing and maximizing Ganesh falls back to MipMaps which can turn out too blurry.

BUG=472864

Review URL: https://codereview.chromium.org/1058133003

9 years agoGM: add fadefilter gm
halcanary [Tue, 14 Apr 2015 13:25:19 +0000 (06:25 -0700)]
GM: add fadefilter gm

BUG=470083

Review URL: https://codereview.chromium.org/1081173002

9 years agoearly return from stream peek
caryclark [Tue, 14 Apr 2015 13:08:04 +0000 (06:08 -0700)]
early return from stream peek

Don't assert if resources are missing

R=scroggo@google.com
BUG=skia:3719

Review URL: https://codereview.chromium.org/1080073002

9 years agoFixing use of initialized memory.
msarett [Tue, 14 Apr 2015 12:37:36 +0000 (05:37 -0700)]
Fixing use of initialized memory.

Disabling scanline decoding to kIndex8 until it can be implemented.

BUG=skia:3715

Review URL: https://codereview.chromium.org/1082923002

9 years agoEnable tessellating GPU path renderer.
senorblanco [Mon, 13 Apr 2015 21:27:37 +0000 (14:27 -0700)]
Enable tessellating GPU path renderer.

This also contains a fix to remove recursion from the sorted_merge()
step. This was essentially tail-recursion, and was causing stack
exhaustion on some platforms. Making it iterative fixes the issue.

Note: this CL will affect a large number of GPU GM results.

R=bsalomon@google.com
BUG=

Review URL: https://codereview.chromium.org/1080113004

9 years agoBlacklist desk_wikipedia pdf on Valgrind bots
borenet [Mon, 13 Apr 2015 20:29:26 +0000 (13:29 -0700)]
Blacklist desk_wikipedia pdf on Valgrind bots

BUG=skia:3506

Review URL: https://codereview.chromium.org/1056763004

9 years agoSet resScale on stroker when stroking path on gpu.
egdaniel [Mon, 13 Apr 2015 20:06:46 +0000 (13:06 -0700)]
Set resScale on stroker when stroking path on gpu.

BUG=skia:3686

Review URL: https://codereview.chromium.org/1048333003

9 years agoFix minor undercounting in SkRecord::bytesUsed().
mtklein [Mon, 13 Apr 2015 19:17:02 +0000 (12:17 -0700)]
Fix minor undercounting in SkRecord::bytesUsed().

When an SkRecord has more than kInlineRecords ops in it (today, 5 or more), the
current logic undercounts the bytes used by the SkRecord by sizeof(Record) *
kInlineRecords, i.e. 32 bytes.  This isn't a huge deal... by the time you've
recorded 5 ops, we're typically up around 1KB anyway, and it's only ever off by
that constant 32 bytes, so somewhere between 3% to 0% error as the picture grows.

But now that I've noticed, we might as well fix it.  Basically, this is a
reminder that the inline space used to store those first kInlineRecords ops
goes to waste once we pass that threshold.  In contrast, fInlineAlloc, the
space we preallocate for the SkVarAlloc, never goes to waste.  It always holds
the first few ops' data even when we grow past it.

BUG=skia:

Review URL: https://codereview.chromium.org/1081433002

9 years agocrank up innerloop to make hairlinebench more usable/reliable
reed [Mon, 13 Apr 2015 18:12:06 +0000 (11:12 -0700)]
crank up innerloop to make hairlinebench more usable/reliable

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1087583002

9 years agoMake GrContext::freeGpuResources() purge the resource cache
bsalomon [Mon, 13 Apr 2015 18:09:56 +0000 (11:09 -0700)]
Make GrContext::freeGpuResources() purge the resource cache

BUG=skia:

Review URL: https://codereview.chromium.org/1082783002

9 years agofix valgrind uninitialized issue
caryclark [Mon, 13 Apr 2015 16:36:01 +0000 (09:36 -0700)]
fix valgrind uninitialized issue

R=mtklein@google.com
BUG=skia:3654

Review URL: https://codereview.chromium.org/1082753002

9 years agoRevert "Enable tessellating GPU path renderer."
Stephen White [Mon, 13 Apr 2015 15:36:45 +0000 (11:36 -0400)]
Revert "Enable tessellating GPU path renderer."

This reverts commit c185019d009dbfcc8d07f267b0fd72ba1ce673d9.

Reason for revert: Causing errors in DM runs.

BUG=skia:
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1087563002

9 years agoEnable tessellating GPU path renderer.
senorblanco [Mon, 13 Apr 2015 14:50:26 +0000 (07:50 -0700)]
Enable tessellating GPU path renderer.

Note: this will affect a large number of GPU GM results.

R=bsalomon@google.com
BUG=

Review URL: https://codereview.chromium.org/1084573003

9 years agoUpdate rebaselining process to be less Florin intensive
robertphillips [Mon, 13 Apr 2015 14:28:59 +0000 (07:28 -0700)]
Update rebaselining process to be less Florin intensive

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1084583002

Review URL: https://codereview.chromium.org/1084583002

9 years agoStart caching masks / stroke fills for textblobs
joshualitt [Mon, 13 Apr 2015 13:33:59 +0000 (06:33 -0700)]
Start caching masks / stroke fills for textblobs

BUG=skia:

Review URL: https://codereview.chromium.org/1065293003

9 years agoAvoid regenerating cached textblobs on integer scrolls
joshualitt [Mon, 13 Apr 2015 13:12:21 +0000 (06:12 -0700)]
Avoid regenerating cached textblobs on integer scrolls

BUG=skia:

Review URL: https://codereview.chromium.org/1062863002

9 years agouse fast/inline SkRect::set(p0, p1) for 2 points
reed [Mon, 13 Apr 2015 02:07:08 +0000 (19:07 -0700)]
use fast/inline SkRect::set(p0, p1) for 2 points

10% speedup for clipped haircubics

BUG=skia:
TBR=
NOTRY=True

Review URL: https://codereview.chromium.org/1079343002

9 years agoalways layout w/ same bounds
reed [Sun, 12 Apr 2015 02:29:50 +0000 (19:29 -0700)]
always layout w/ same bounds

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1085453002

9 years agouse anon namespace to avoid (silent) collisions between local test classes
reed [Sun, 12 Apr 2015 02:29:31 +0000 (19:29 -0700)]
use anon namespace to avoid (silent) collisions between local test classes

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1079813002

9 years agosetDrawFilter needs to trigger any deferred saves
reed [Sat, 11 Apr 2015 15:04:56 +0000 (08:04 -0700)]
setDrawFilter needs to trigger any deferred saves

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1077353002

9 years agochange hairline procs to take SkPoint by value, more efficient on SSE and NEON
reed [Sat, 11 Apr 2015 03:39:19 +0000 (20:39 -0700)]
change hairline procs to take SkPoint by value, more efficient on SSE and NEON

precursor for https://codereview.chromium.org/1074313002/

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1084433002

9 years agoAmmend font table data experiment on Mac.
bungeman [Fri, 10 Apr 2015 22:35:22 +0000 (15:35 -0700)]
Ammend font table data experiment on Mac.

Calling CGFontCopyTableForTag did not affect the runtime results,
so try to actually access the data to see if that makes a
difference.

TBR=reed1
This is a test change, allow data to be collected.

Review URL: https://codereview.chromium.org/1076183004

9 years agoImplementing filling for SkBmpCodec
msarett [Fri, 10 Apr 2015 21:36:48 +0000 (14:36 -0700)]
Implementing filling for SkBmpCodec

The bmp codec currently returns kIncompleteInput
when the stream is truncated, which we treat as a
partial success.  However, we neglect the fill the
remaining pixels in the image, leaving these
uninitialized.

This CL addresses this problem by initializing the
remaining pixels in the image to default values.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1075243003

9 years agoAdd serialization of SkBitmapSource's new filterQuality member variable
robertphillips [Fri, 10 Apr 2015 15:39:58 +0000 (08:39 -0700)]
Add serialization of SkBitmapSource's new filterQuality member variable

Missed this in https://codereview.chromium.org/1072603002/ (Add GM to repro crbug.com/472795)

Review URL: https://codereview.chromium.org/1078113002

9 years agotrivial fix for TextBlobCache
joshualitt [Fri, 10 Apr 2015 14:23:29 +0000 (07:23 -0700)]
trivial fix for TextBlobCache

BUG=skia:

Review URL: https://codereview.chromium.org/1076193003

9 years agoThe TextBlobCache needs the ability to trigger a flush because otherwise its entire...
joshualitt [Fri, 10 Apr 2015 14:01:30 +0000 (07:01 -0700)]
The TextBlobCache needs the ability to trigger a flush because otherwise its entire budget can be used up, but it will not be able to free up any space due to blobs being stuck in the GrInOrderDrawBuffer.  This was causing a segfault.  After this CL the cache will try to purge, and then flush if it cannot purge enough.  It will not purge the most recent addition to the cache.

TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1071333002

9 years agoReplace NEON assembly memset16 and memset32 with intrinsic versions.
mtklein [Fri, 10 Apr 2015 13:24:58 +0000 (06:24 -0700)]
Replace NEON assembly memset16 and memset32 with intrinsic versions.

According to bench/MemsetBench.cpp, I've got them somewhere between 10% slower
and a percent or two faster than the old assembly.

BUG=skia:

CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Debug-Trybot

Review URL: https://codereview.chromium.org/1075003002

9 years agoAdding draw looper gm for textblobs
joshualitt [Fri, 10 Apr 2015 13:17:26 +0000 (06:17 -0700)]
Adding draw looper gm for textblobs

BUG=skia:

Review URL: https://codereview.chromium.org/1067853002

9 years agoRewrite memset benches, then use results to add a small-N optimization.
mtklein [Thu, 9 Apr 2015 21:05:17 +0000 (14:05 -0700)]
Rewrite memset benches, then use results to add a small-N optimization.

The benches for N <= 10 get around 2x faster on my N7 and N9.  I believe this
is because of the reduced function-call-then-function-pointer-call overhead on
the N7, and additionally because it seems autovectorization beats our NEON code
for small N on the N9.

My desktop is unchanged, though that's probably because N=10 lies well within a
region where memset's performance is essentially constant: N=100 takes only
about 2x as long as N=1 and N=10, which perform nearly identically.

BUG=skia:

Review URL: https://codereview.chromium.org/1073863002

9 years agodefault to 8888 for ganesh in sampleapp on iOS
reed [Thu, 9 Apr 2015 20:43:22 +0000 (13:43 -0700)]
default to 8888 for ganesh in sampleapp on iOS

BUG=skia:

Review URL: https://codereview.chromium.org/1078843002

9 years agoSkPDF: ResourceDict replaced by factory function
halcanary [Thu, 9 Apr 2015 20:27:40 +0000 (13:27 -0700)]
SkPDF: ResourceDict replaced by factory function

Motivation: Having a class here was unnecessary, since the only thing
that set this class apart was how it is created, not how it behaves.

BUG=skia:3585

Review URL: https://codereview.chromium.org/1068343003

9 years agoFix ASAN error
msarett [Thu, 9 Apr 2015 20:14:40 +0000 (13:14 -0700)]
Fix ASAN error

BUG=skia:

TBR=

Review URL: https://codereview.chromium.org/1072183002

9 years ago***Disables swizzles to 565.
msarett [Thu, 9 Apr 2015 19:43:10 +0000 (12:43 -0700)]
***Disables swizzles to 565.
We may want to enable swizzles to 565
for images that are encoded in a format
similar to 565, however, we do not want
to take images that decode naturally to
kN32 and then convert them to 565.

***Enable swizzles to kIndex_8.  For images
encoded in a color table format, we suggest
that they be decoded to kIndex_8.  When we
decode, we only allow conversion to kIndex_8
if it matches the suggested color type (except
wbmp which seems good as is).

***Modify dm to test images that decode to
kIndex_8.

BUG=skia:3257
BUG=skia:3440

Review URL: https://codereview.chromium.org/1055743003

9 years agoChange some more GMs to clear to opaque black, not transparent black.
senorblanco [Thu, 9 Apr 2015 18:13:24 +0000 (11:13 -0700)]
Change some more GMs to clear to opaque black, not transparent black.

N.B.: this will change results on the bots for all the tests modified.

BUG=skia:3319

Review URL: https://codereview.chromium.org/1077763002

9 years agoAvoid sending empty bitmaps through proxy canvas
tomhudson [Thu, 9 Apr 2015 16:20:19 +0000 (09:20 -0700)]
Avoid sending empty bitmaps through proxy canvas

Some back ends may crash when asked to draw an empty bitmap, so we
filter it out here.

BUG=skia:3692
R=djsollen@google.com,reed@google.com

Review URL: https://codereview.chromium.org/1072033002

9 years agoRemove ARM assembly memsets.
mtklein [Thu, 9 Apr 2015 16:16:28 +0000 (09:16 -0700)]
Remove ARM assembly memsets.

Step 1 of a zillion in the quest for NEON on iOS,
and step 1 of a different zillion in the Great Assembly Purge.

ios, arm, arm64, arm_v7, arm_v7_neon all build.

BUG=skia:

Review URL: https://codereview.chromium.org/1072063002

9 years ago[SkTextBlob] Custom run font record
fmalita [Thu, 9 Apr 2015 15:49:32 +0000 (08:49 -0700)]
[SkTextBlob] Custom run font record

Instead of using a full-blown SkPaint to store run font info, use a
custom structure.

This saves 96 bytes / run on 64bit platforms.

R=reed@google.com,mtklein@google.com,joshualitt@google.com

Review URL: https://codereview.chromium.org/1070943002

9 years agoadd test for opaque-preserving colormatrixfilters
reed [Thu, 9 Apr 2015 15:27:27 +0000 (08:27 -0700)]
add test for opaque-preserving colormatrixfilters

BUG=skia:

Review URL: https://codereview.chromium.org/1069463002

9 years agofix for perf regression on ugamsolutions / msaa16
joshualitt [Thu, 9 Apr 2015 15:22:37 +0000 (08:22 -0700)]
fix for perf regression on ugamsolutions / msaa16

BUG=skia:

Review URL: https://codereview.chromium.org/1076853002

9 years agoRename DistanceFieldTextureEffect.{cpp,h}
jvanverth [Thu, 9 Apr 2015 15:00:49 +0000 (08:00 -0700)]
Rename DistanceFieldTextureEffect.{cpp,h}

BUG=skia:

Review URL: https://codereview.chromium.org/1073473005

9 years agoBUG=skia:
stephana [Thu, 9 Apr 2015 14:57:54 +0000 (07:57 -0700)]
BUG=skia:

Review URL: https://codereview.chromium.org/1054073003

9 years agoRearrange SkRecord with small N in mind
mtklein [Thu, 9 Apr 2015 14:46:41 +0000 (07:46 -0700)]
Rearrange SkRecord with small N in mind

This rearranges the record pointers and types so they can go in a single array, then preallocates some space for them and for the SkVarAlloc.

picture_overhead_draw bench drops from ~1000ns to 500-600ns, with no effect on picture_overhead_nodraw.

I don't see any significant effect on large picture recording times from our .skps.

BUG=chromium:470553

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

Review URL: https://codereview.chromium.org/1061783002

9 years agoUpdate DEPS to use a cloned copy of libpng
djsollen [Thu, 9 Apr 2015 14:33:23 +0000 (07:33 -0700)]
Update DEPS to use a cloned copy of libpng

BUG=skia:3689

Review URL: https://codereview.chromium.org/1077673002

9 years agoAdd GM to repro crbug.com/472795
robertphillips [Thu, 9 Apr 2015 13:47:12 +0000 (06:47 -0700)]
Add GM to repro crbug.com/472795

This CL also adds a new parameter to SkBitmapSource which gives the user control of the filter quality.

BUG=472795

Review URL: https://codereview.chromium.org/1072603002

9 years agoRemove SK_SUPPORT_LEGACY_SCALAR_MAPPOINTS
fmalita [Thu, 9 Apr 2015 13:13:15 +0000 (06:13 -0700)]
Remove SK_SUPPORT_LEGACY_SCALAR_MAPPOINTS

No longer used in Chromium.

Also drop now-unused SkMatrix::Rot_pts() & SkMatrix::RotTrans_pts().

BUG=475022
R=reed@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1071833002

9 years agoMark SkPictureRecorder::endRecording as SK_WARN_UNUSED_RESULT.
jbroman [Thu, 9 Apr 2015 13:12:17 +0000 (06:12 -0700)]
Mark SkPictureRecorder::endRecording as SK_WARN_UNUSED_RESULT.

Ignoring the result is a memory leak.
Callers should always at least unref the result.

This bug has occurred in Blink:
  https://codereview.chromium.org/1068413002/

BUG=skia:3680

Review URL: https://codereview.chromium.org/1072633002

9 years agoValgrind sez: new[] wants delete[].
mtklein [Thu, 9 Apr 2015 10:20:04 +0000 (03:20 -0700)]
Valgrind sez: new[] wants delete[].

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/builds/17/steps/dm/logs/stdio

TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1075853002

9 years agoexpand pdf/worldjournal blacklist entry to cover the new skp too
Mike Klein [Thu, 9 Apr 2015 10:03:22 +0000 (06:03 -0400)]
expand pdf/worldjournal blacklist entry to cover the new skp too

BUG=skia:

Review URL: https://codereview.chromium.org/1070013002

9 years agoRevert of Rearrange SkRecord with small N in mind (patchset #8 id:120001 of https...
mtklein [Wed, 8 Apr 2015 21:09:41 +0000 (14:09 -0700)]
Revert of Rearrange SkRecord with small N in mind (patchset #8 id:120001 of https://codereview.chromium.org/1061783002/)

Reason for revert:
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug/builds/149/steps/dm/logs/stdio

Original issue's description:
> Rearrange SkRecord with small N in mind
>
> This rearranges the record pointers and types so they can go in a single array, then preallocates some space for them and for the SkVarAlloc.
>
> picture_overhead_draw bench drops from ~1000ns to 500-600ns, with no effect on picture_overhead_nodraw.
>
> I don't see any significant effect on large picture recording times from our .skps.
>
> BUG=chromium:470553
>
> Committed: https://skia.googlesource.com/skia/+/e2dd9408cd711777afaa9410427fb0d761ab004a

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

Review URL: https://codereview.chromium.org/1068383003

9 years agoRearrange SkRecord with small N in mind
mtklein [Wed, 8 Apr 2015 21:02:31 +0000 (14:02 -0700)]
Rearrange SkRecord with small N in mind

This rearranges the record pointers and types so they can go in a single array, then preallocates some space for them and for the SkVarAlloc.

picture_overhead_draw bench drops from ~1000ns to 500-600ns, with no effect on picture_overhead_nodraw.

I don't see any significant effect on large picture recording times from our .skps.

BUG=chromium:470553

Review URL: https://codereview.chromium.org/1061783002

9 years agoSkString: remove fStr member
halcanary [Wed, 8 Apr 2015 20:01:21 +0000 (13:01 -0700)]
SkString: remove fStr member

Motivation:  I'd like sizeof(SkString) to be the same in Debug and Release.

Review URL: https://codereview.chromium.org/1073473003

9 years agoRename the distance field geoprocs to something more reasonable.
jvanverth [Wed, 8 Apr 2015 19:37:51 +0000 (12:37 -0700)]
Rename the distance field geoprocs to something more reasonable.

Prep for adding Mali fix for distance field paths.

BUG=skia:3528

Review URL: https://codereview.chromium.org/1075543002

9 years agoUse opaque black not transparent black as imagefilter GM background.
senorblanco [Wed, 8 Apr 2015 19:36:08 +0000 (12:36 -0700)]
Use opaque black not transparent black as imagefilter GM background.

For some reason, GM's are now being composited against white
in some modes, where the alpha used to be ignored (or composited
against black, I'm not sure which). At any rate, it doesn't
make much sense to have alpha in the result anyway, so let's clear to
opaque black instead of transparent black and avoid the problem.

This is a trial balloon for bitmapsource and pictureimagefilter.
If all goes well, I'll make this change more widely.

R=scroggo
BUG=skia:3319

Review URL: https://codereview.chromium.org/1074513002

9 years agoFail gracefully when dm.json is not present
Derek Sollenberger [Wed, 8 Apr 2015 19:20:25 +0000 (15:20 -0400)]
Fail gracefully when dm.json is not present

Review URL: https://codereview.chromium.org/1073593002

9 years agoSkCanvas::resetForNextPicture()
mtklein [Wed, 8 Apr 2015 18:25:48 +0000 (11:25 -0700)]
SkCanvas::resetForNextPicture()

No diffs against head for DM --config 8888 gpu 2ndpic-8888 2ndpic-gpu.

  picture_overhead_draw 1.62us ->  1.6us 0.99x
picture_overhead_nodraw  792ns ->  342ns 0.43x

tiles and serialization modes will also test this a bit.

BUG=chromium:470553

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

Review URL: https://codereview.chromium.org/1067893002

9 years agoAdd mechanism to proactively purge old resources in GrResourceCache.
bsalomon [Wed, 8 Apr 2015 18:01:54 +0000 (11:01 -0700)]
Add mechanism to proactively purge old resources in GrResourceCache.

This change leaves the feature turned off by default.

Review URL: https://codereview.chromium.org/1032873002

9 years agoAdding a cache + memory pool for GPU TextBlobs
joshualitt [Wed, 8 Apr 2015 16:08:31 +0000 (09:08 -0700)]
Adding a cache + memory pool for GPU TextBlobs

BUG=skia:

Review URL: https://codereview.chromium.org/1055843002

9 years agoSkPDF: Remove Array's unused set(i) and get(i) (leaving only append())
halcanary [Wed, 8 Apr 2015 15:40:36 +0000 (08:40 -0700)]
SkPDF: Remove Array's unused set(i) and get(i) (leaving only append())

BUG=skia:3585

Review URL: https://codereview.chromium.org/1071583003

9 years agoAdd helper for creating a SkSurface from a client created texture.
bsalomon [Wed, 8 Apr 2015 15:38:40 +0000 (08:38 -0700)]
Add helper for creating a SkSurface from a client created texture.

Review URL: https://codereview.chromium.org/1071603002

9 years agochange isNestedRect to isNestedFillRect
caryclark [Wed, 8 Apr 2015 15:34:15 +0000 (08:34 -0700)]
change isNestedRect to isNestedFillRect

R=reed@google.com, bsalomon@google.com

Let isNested(Fill)Rect return true if drawn path describes filled
rectangles.

Review URL: https://codereview.chromium.org/1073473002

9 years agoMake --undefok a little louder now that we're using it all the time.
mtklein [Wed, 8 Apr 2015 15:30:38 +0000 (08:30 -0700)]
Make --undefok a little louder now that we're using it all the time.

BUG=skia:

Review URL: https://codereview.chromium.org/1073483002

9 years agoAdding bulk plot reffer to cached textblobs
joshualitt [Wed, 8 Apr 2015 15:07:59 +0000 (08:07 -0700)]
Adding bulk plot reffer to cached textblobs

This change will prevent the atlas from evicting glyphs the TextBlob
needs.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/7281c61e7bc689d484dcbda49be3cef4ce4f11c2

Review URL: https://codereview.chromium.org/1050113004

9 years agoRemove unused InstCounterClass.
bungeman [Wed, 8 Apr 2015 15:06:26 +0000 (08:06 -0700)]
Remove unused InstCounterClass.

This was added with r4719 (f7943035) to support testing
SkTRefArray. With 703d3c70 SkTRefArray and the associated test was
removed, but the supporting InstCounterClass was not.

Review URL: https://codereview.chromium.org/1063403003

9 years agoadd realloc method to SkAutoSTMalloc
joshualitt [Wed, 8 Apr 2015 14:33:33 +0000 (07:33 -0700)]
add realloc method to SkAutoSTMalloc

BUG=skia:

Review URL: https://codereview.chromium.org/1069013002

9 years agoAdd missing override of willSaveLayer()
tomhudson [Wed, 8 Apr 2015 13:52:58 +0000 (06:52 -0700)]
Add missing override of willSaveLayer()

Also tweak formatting.

BUG=3624
R=djsollen@google.com

Review URL: https://codereview.chromium.org/1068163004

9 years agoRevert of SkCanvas::resetForNextPicture() (patchset #4 id:60001 of https://codereview...
mtklein [Tue, 7 Apr 2015 22:27:14 +0000 (15:27 -0700)]
Revert of SkCanvas::resetForNextPicture() (patchset #4 id:60001 of https://codereview.chromium.org/1067893002/)

Reason for revert:
https://uberchromegw.corp.google.com/i/client.skia/builders/Linux%20Tests/builds/1816

Original issue's description:
> SkCanvas::resetForNextPicture()
>
> No diffs against head for DM --config 8888 gpu 2ndpic-8888 2ndpic-gpu.
>
>   picture_overhead_draw 1.62us ->  1.6us 0.99x
> picture_overhead_nodraw  792ns ->  342ns 0.43x
>
> tiles and serialization modes will also test this a bit.
>
> BUG=chromium:470553
>
> Committed: https://skia.googlesource.com/skia/+/f920e468ac66a36c9653d1b11181480295044c7d

TBR=mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:470553

Review URL: https://codereview.chromium.org/1062353002

9 years agoSkCanvas::resetForNextPicture()
mtklein [Tue, 7 Apr 2015 21:11:22 +0000 (14:11 -0700)]
SkCanvas::resetForNextPicture()

No diffs against head for DM --config 8888 gpu 2ndpic-8888 2ndpic-gpu.

  picture_overhead_draw 1.62us ->  1.6us 0.99x
picture_overhead_nodraw  792ns ->  342ns 0.43x

tiles and serialization modes will also test this a bit.

BUG=chromium:470553

Review URL: https://codereview.chromium.org/1067893002

9 years agoMove uninteresting MD5 check to after adding it to JSON.
mtklein [Tue, 7 Apr 2015 20:38:48 +0000 (13:38 -0700)]
Move uninteresting MD5 check to after adding it to JSON.

BUG=skia:3676

Review URL: https://codereview.chromium.org/1067053002

9 years agoFix formatting in the sheriff documentation
rmistry [Tue, 7 Apr 2015 19:17:00 +0000 (12:17 -0700)]
Fix formatting in the sheriff documentation

BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1066013002

Review URL: https://codereview.chromium.org/1066013002

9 years agoSwitch textures created by DeviceImageFilterProxy to
senorblanco [Tue, 7 Apr 2015 19:16:55 +0000 (12:16 -0700)]
Switch textures created by DeviceImageFilterProxy to
approx-match.

This revealed some further 0..1 texture coordinate
depedencies,specifically in SkDisplacementMapEffect and
SkXfermodeImageFilter, fixed through use of
GrTextureDomain.

Note: causes minor pixel diffs in pictureimagefilter,
testimagefilters GMs.

Also causes minor pixel diffs in some Blink layout tests,
suppressed here: https://codereview.chromium.org/1064943002

BUG=skia:3532

Review URL: https://codereview.chromium.org/1065683002

9 years agore-enable neon opts for some xfermodes
reed [Tue, 7 Apr 2015 18:14:10 +0000 (11:14 -0700)]
re-enable neon opts for some xfermodes

BUG=skia:

Review URL: https://codereview.chromium.org/1068783003

9 years agoSkPDF: SkPDFString is no longer aware of wide strings.
halcanary [Tue, 7 Apr 2015 17:40:03 +0000 (10:40 -0700)]
SkPDF: SkPDFString is no longer aware of wide strings.

Since wide strings are only used in SkPDFDevice, I have moved the
function that manages them to that directory.

Motivation: The SkPDFString will be refactored later along with the
other SkPFObject heirarchy.

BUG=skia:3585

Review URL: https://codereview.chromium.org/1064013003

9 years agoRevert of Adding bulk plot reffer to cached textblobs (patchset #7 id:110001 of https...
joshualitt [Tue, 7 Apr 2015 17:21:27 +0000 (10:21 -0700)]
Revert of Adding bulk plot reffer to cached textblobs (patchset #7 id:110001 of https://codereview.chromium.org/1050113004/)

Reason for revert:
Breaks linux builder

Original issue's description:
> Adding bulk plot reffer to cached textblobs
>
> This change will prevent the atlas from evicting glyphs the TextBlob
> needs.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7281c61e7bc689d484dcbda49be3cef4ce4f11c2

TBR=bsalomon@google.com,jvanverth@google.com,robertphillips@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1061713003

9 years agoAdding bulk plot reffer to cached textblobs
joshualitt [Tue, 7 Apr 2015 17:02:25 +0000 (10:02 -0700)]
Adding bulk plot reffer to cached textblobs

This change will prevent the atlas from evicting glyphs the TextBlob
needs.

BUG=skia:

Review URL: https://codereview.chromium.org/1050113004

9 years agoCalculate inverse scale for distance field text in vertex shader
jvanverth [Tue, 7 Apr 2015 16:06:00 +0000 (09:06 -0700)]
Calculate inverse scale for distance field text in vertex shader

This is for the uniform scale case only. Using the dFdx() function on certain
Mali GPUs causes issues because the precision is too low, so we have to
compute 1/scale from the view matrix instead.

BUG=skia:3528

Committed: https://skia.googlesource.com/skia/+/5b143038cb47763974d2750ed78d436eb6c38bea

Review URL: https://codereview.chromium.org/1029423003

9 years agoFix DM -r
mtklein [Tue, 7 Apr 2015 15:48:38 +0000 (08:48 -0700)]
Fix DM -r

source_options isn't always present.

BUG=skia:

Review URL: https://codereview.chromium.org/1067863002

9 years agoAdd a Via to DM that records into two pictures and draws using the second.
mtklein [Tue, 7 Apr 2015 15:30:32 +0000 (08:30 -0700)]
Add a Via to DM that records into two pictures and draws using the second.

I'm going to start hacking on SkCanvas a bit to allow a fast reset method,
and I want to have some testing checking me.

BUG=skia:

Review URL: https://codereview.chromium.org/1062043004

9 years agorestore clipstack to heap-ptr, so clients can ref it
reed [Tue, 7 Apr 2015 15:00:56 +0000 (08:00 -0700)]
restore clipstack to heap-ptr, so clients can ref it

BUG=skia:

Review URL: https://codereview.chromium.org/1068883004

9 years agoBypass owners check for dry run CLs.
rmistry [Tue, 7 Apr 2015 14:41:51 +0000 (07:41 -0700)]
Bypass owners check for dry run CLs.

BUG=skia:
NOTRY=true

Review URL: https://codereview.chromium.org/1068853002

9 years agoAttempted mitigation of font tables released early.
bungeman [Tue, 7 Apr 2015 14:34:36 +0000 (07:34 -0700)]
Attempted mitigation of font tables released early.

On Mac, it appears that sometimes fonts created from data have
their table data used after the table data copy is freed.
This appears to be most common with 'sbix' fonts for some reason,
so pin that table while in use.

Review URL: https://codereview.chromium.org/1061123002

9 years agoSet willReadFragmentPosition on XP when doing a DstCopy.
egdaniel [Tue, 7 Apr 2015 14:31:11 +0000 (07:31 -0700)]
Set willReadFragmentPosition on XP when doing a DstCopy.

BUG=472872

Review URL: https://codereview.chromium.org/1068463004

9 years agoRevert of Remove now-redundant SkPathOps enum. (patchset #1 id:1 of https://coderevie...
scroggo [Tue, 7 Apr 2015 13:53:21 +0000 (06:53 -0700)]
Revert of Remove now-redundant SkPathOps enum. (patchset #1 id:1 of https://codereview.chromium.org/1051113005/)

Reason for revert:
Android is still using this. See https://android-build.storage.googleapis.com/builds/git_master-skia-linux-razor-userdebug/1836783/4c2968b94c5f4b238ff5ba61111bf867ea872fd8dce930612f376711883419b8/logs/build_error.log?GoogleAccessId=701025073339-mqn0q2nvir9iurm6q5d00tdv7blbgvjr%40developer.gserviceaccount.com&Signature=ATvg9ZvwZGFDDVb%2B1Ue2WHVGaCCL1hAD7QjXeZv2gBT08I3JaKLcseUhV5K2G%2F%2BWUnsnSgNNjzjBnBLmnPbK9Uu8NC%2B%2F5J0dU3sKD8TU9dvMtkQhFQSp2x5t5Xxf5mczi2EPps%2FwoPHqTKQqrMgqStySzw206W1%2Fc135RrdrgYg%3D&Expires=1428415459

Original issue's description:
> Remove now-redundant SkPathOps enum.
>
> R=caryclark,reed
> BUG=473772
>
> Committed: https://skia.googlesource.com/skia/+/143244e27d95255807d8fa505ce0affef96d1fc8

TBR=caryclark@google.com,reed@google.com,schenney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=473772

Review URL: https://codereview.chromium.org/1068873002

9 years agoAdd sheriff documentation for rebaselining.
scroggo [Tue, 7 Apr 2015 13:41:22 +0000 (06:41 -0700)]
Add sheriff documentation for rebaselining.

Copied from notes Robert emailed me.
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1051653006

Review URL: https://codereview.chromium.org/1051653006

9 years agoSend SkPicture deletion message lazily.
mtklein [Tue, 7 Apr 2015 13:34:05 +0000 (06:34 -0700)]
Send SkPicture deletion message lazily.

If no one has read the picture's unique ID, there's no point invalidating it.

This is the same trick we pull with SkPixelRefs.

Before:
  26M 1 1.49µs 1.6µs 1.77µs 6.25µs 42% picture_overhead_draw
  13M 32 742ns 749ns 756ns 823ns 2% picture_overhead_nodraw

After:
  26M 1 1.27µs 1.33µs 1.49µs 5.51µs 45% picture_overhead_draw
  14M 43 677ns 680ns 681ns 701ns 1% picture_overhead_nodraw

BUG=skia:

Review URL: https://codereview.chromium.org/1061283002

9 years agosimplify xfers
reed [Tue, 7 Apr 2015 13:13:45 +0000 (06:13 -0700)]
simplify xfers

BUG=skia:

Review URL: https://codereview.chromium.org/1061193003

9 years agoreduce alloc overhead for SkCanvas
reed [Tue, 7 Apr 2015 11:40:48 +0000 (04:40 -0700)]
reduce alloc overhead for SkCanvas

use pre-allocated space in the canvas to avoid initial calls to malloc

BUG=skia:

Review URL: https://codereview.chromium.org/1060583007

9 years agoRevert of Calculate inverse scale for distance fields in vertex shader (patchset...
jvanverth [Mon, 6 Apr 2015 20:58:59 +0000 (13:58 -0700)]
Revert of Calculate inverse scale for distance fields in vertex shader (patchset #6 id:100001 of https://codereview.chromium.org/1029423003/)

Reason for revert:
This appears to be breaking large text on Nexus 7.

Original issue's description:
> Calculate inverse scale for distance field text in vertex shader
>
> This is for the uniform scale case only. Using the dFdx() function on certain
> Mali GPUs causes issues because the precision is too low, so we have to
> compute 1/scale from the view matrix instead.
>
> BUG=skia:3528
>
> Committed: https://skia.googlesource.com/skia/+/5b143038cb47763974d2750ed78d436eb6c38bea

TBR=bsalomon@google.com,joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3528

Review URL: https://codereview.chromium.org/1066613003

9 years agoRemove get_uploaded hashes
borenet [Mon, 6 Apr 2015 20:19:25 +0000 (13:19 -0700)]
Remove get_uploaded hashes

Replaced with an inline script in
https://codereview.chromium.org/1068503002/

BUG=skia:3521

Review URL: https://codereview.chromium.org/1062873002