platform/upstream/libSkiaSharp.git
8 years agoRestore old NEON blit_mask_d32_a8 methods.
mtklein [Tue, 1 Sep 2015 18:03:11 +0000 (11:03 -0700)]
Restore old NEON blit_mask_d32_a8 methods.

As you'll see from the BUG line, we have a strong indication that the new Sk4px
methods regress some devices.  This restores the old code back as literally as possible
while still fitting in SkOpts framework.

This is ideally temporary breathing room.

We should get an early indication of if those bugs will improve by watching https://perf.skia.org/#4004

BUG=skia:4117,525844,519596,524149

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

8 years agoDocumentation: C API comments
halcanary [Tue, 1 Sep 2015 17:45:09 +0000 (10:45 -0700)]
Documentation: C API comments

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

8 years agoCmake: fix to make linking work on Ubuntu
halcanary [Tue, 1 Sep 2015 17:11:44 +0000 (10:11 -0700)]
Cmake: fix to make linking work on Ubuntu

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

8 years agoC API: Add SK_API, also documentation of an example.
halcanary [Tue, 1 Sep 2015 17:01:38 +0000 (10:01 -0700)]
C API: Add SK_API, also documentation of an example.

SK_API = __declspec(dllexport) / __attribute__((visibility("default")))

Also, add documentation in experimental/c-api-example/c.md

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

8 years agoAdded SkComposeShader GPU implementation
wangyix [Tue, 1 Sep 2015 16:45:08 +0000 (09:45 -0700)]
Added SkComposeShader GPU implementation

moved onCreateGLInstance() to private in GrComposeEffect

Added SkComposeShader gpu implementation; composeshader gm is unchanged

BUG=skia:4182

TBR=bsalomon@google.com

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

8 years agoCMake tweaks
mtklein [Tue, 1 Sep 2015 16:22:31 +0000 (09:22 -0700)]
CMake tweaks
  - I think CMake 3.1 is enough for now.
  - Ubuntu works too.

BUG=skia:4269

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

8 years agoskia: Replace CommandBuffer_ with egl
hendrikw [Tue, 1 Sep 2015 16:08:00 +0000 (09:08 -0700)]
skia: Replace CommandBuffer_ with egl

I ended up exporting the egl functions directly, so this
needs to change on the skia side as well

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

8 years agoLimit lifetime of GrDrawContext objects
robertphillips [Tue, 1 Sep 2015 15:34:28 +0000 (08:34 -0700)]
Limit lifetime of GrDrawContext objects

GrDrawContext's are about to become real allocated objects. This CL sets up the machinery so they won't leak.

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

8 years agoRemove GrGpuTraceMarker hooks until we rethink the design
joshualitt [Tue, 1 Sep 2015 15:19:46 +0000 (08:19 -0700)]
Remove GrGpuTraceMarker hooks until we rethink the design

TBR=bsalomon@google.com
BUG=526308

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

8 years agoGrGLBlend::AppendPorterDuffBlend now supports kClear_Mode
wangyix [Tue, 1 Sep 2015 14:56:14 +0000 (07:56 -0700)]
GrGLBlend::AppendPorterDuffBlend now supports kClear_Mode

BUG=skia:4182

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

8 years agoVarious minor cross-platform changes
jvanverth [Tue, 1 Sep 2015 14:16:46 +0000 (07:16 -0700)]
Various minor cross-platform changes

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

8 years agoSkColorCubeFilter_opts: rounding is actually free here.
mtklein [Tue, 1 Sep 2015 14:09:22 +0000 (07:09 -0700)]
SkColorCubeFilter_opts: rounding is actually free here.

(Sk4f(float) is statically initializable, unlike the old SkPMFlor(SkPMColor).)

BUG=skia:4117

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

8 years agoMove PathRenderers to batches folder
joshualitt [Tue, 1 Sep 2015 13:50:55 +0000 (06:50 -0700)]
Move PathRenderers to batches folder

BUG=skia:

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

8 years agoCall standard libjpeg/libjpeg-turbo APIs
msarett [Tue, 1 Sep 2015 13:43:41 +0000 (06:43 -0700)]
Call standard libjpeg/libjpeg-turbo APIs

BUG=skia:

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

8 years agoRequire Sk4f::toBytes() clamps
mtklein [Tue, 1 Sep 2015 13:29:45 +0000 (06:29 -0700)]
Require Sk4f::toBytes() clamps

BUG=skia:4117

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.android:Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Release-Trybot

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

8 years agolink test to bug
caryclark [Tue, 1 Sep 2015 13:22:36 +0000 (06:22 -0700)]
link test to bug

crbug.com/526025 includes a minimized SVG test case.
Translating that test case into native code (fuzzTNG)
did not reproduce the bug. That test case should
have not been included with skia issue 1323813003,
and is deleted here.

Running the minimal test case in a modified version
of chrome isolated the bug. The modified version
generated the test fuzz763_3 with the edit

#define DEBUGGING_PATHOPS_FROM_HOST 1

in src/pathops/SkPathopsOp.cpp line 188.

Rename fuzz763_3 to issue_526025 to associate the test
with the bug. Note that the bug contains the body of the
CL in comment $5.

R=reed@google.com

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

8 years agoMake GrTextContext no longer store a GrDrawContext
robertphillips [Tue, 1 Sep 2015 12:36:47 +0000 (05:36 -0700)]
Make GrTextContext no longer store a GrDrawContext

This, at least, makes GrTextContexts no longer bound to a single GrDrawContext. (Passing in a RenderTarget and praying it matched the DrawContext was always a bit fishy too).

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

8 years agoImage generator-backed SkPictureShader
fmalita [Tue, 1 Sep 2015 02:54:03 +0000 (19:54 -0700)]
Image generator-backed SkPictureShader

A respin of http://crrev.com/866773002

R=reed@google.com

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

8 years agoClean up remaining users of SkPMFloat
mtklein [Mon, 31 Aug 2015 22:26:08 +0000 (15:26 -0700)]
Clean up remaining users of SkPMFloat

This switches over SkXfermodes_opts.h and SkColorMatrixFilter to use Sk4f,
and converts the SkPMFloat benches to Sk4f benches.

No pixels should change here, and no code beyond the Sk4f_ benches should change speed.
The benches are faster than the old versions.

BUG=skia:4117

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

8 years agosimplify bitmap scaler and cache
reed [Mon, 31 Aug 2015 22:16:17 +0000 (15:16 -0700)]
simplify bitmap scaler and cache

BUG=skia:

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

8 years agoMove float<->byte conversions into Sk4f.
mtklein [Mon, 31 Aug 2015 21:39:59 +0000 (14:39 -0700)]
Move float<->byte conversions into Sk4f.

This lets us avoid conversions to [0.0, 1.0] space and rounding that aren't necessary
for SkColorCubeFilter_opts.h.

Dropping rounding on the way back to bytes means we'll see a bunch of off-by-1 diffs.

Rough perf effect:
  SSSE3: 110 -> 93  (~15%)
  NEON: 465 -> 375  (~20%)

This is the beginning of the end for SkPMFloat as an entity distinct from Sk4f.
I've kept it for now so I can convert sites one by one and think about how things
that really want to keep PM color order will work.

BUG=skia:4117

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

8 years agoDocument SkString::resize(int) as destructive.
bungeman [Mon, 31 Aug 2015 21:36:48 +0000 (14:36 -0700)]
Document SkString::resize(int) as destructive.

It is easy to think in some cases that SkString::resize(int) is not
destructive, since optimizations mean that most of the time the data
is still there after a resize. However, in the general case, the
original string's data is lost and the new SkString contains garbage.

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

8 years agoAdd empty files to empty targets to appease XCode.
mtklein [Mon, 31 Aug 2015 21:21:08 +0000 (14:21 -0700)]
Add empty files to empty targets to appease XCode.

BUG=skia:4117

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

8 years agoMinor cleanup in GrTessellatingPathRenderer.
senorblanco [Mon, 31 Aug 2015 19:42:23 +0000 (12:42 -0700)]
Minor cleanup in GrTessellatingPathRenderer.

Vertex counts are always exact, so don't bother handling the case
where they're different. Just assert.
Rename variables to reflect.

BUG=skia:

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

8 years agoRename flag from "distance field" to "device independent."
bsalomon [Mon, 31 Aug 2015 19:39:41 +0000 (12:39 -0700)]
Rename flag from "distance field" to "device independent."

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

8 years agoRevert of By default purge resources that haven't been used for 64 flushes (patchset...
bsalomon [Mon, 31 Aug 2015 18:37:57 +0000 (11:37 -0700)]
Revert of By default purge resources that haven't been used for 64 flushes (patchset #4 id:60001 of https://codereview.chromium.org/1316233003/ )

Reason for revert:
Breaking again

Original issue's description:
> By default purge resources that haven't been used for 64 flushes
>
> BUG=skia:4258
>
> Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104
>
> R=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/71d0c33068d41878cc3117f3761f49300f6b3d54
>
> Committed: https://skia.googlesource.com/skia/+/bd783cd5b62118277b75933c3cd7b9097129259a

TBR=robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4258

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

8 years agoAdd a GM for image filters applied to stroked primitives.
senorblanco [Mon, 31 Aug 2015 17:28:49 +0000 (10:28 -0700)]
Add a GM for image filters applied to stroked primitives.

BUG=skia:3194

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

8 years agoremove duplicate linked list adjustment
caryclark [Mon, 31 Aug 2015 16:46:20 +0000 (09:46 -0700)]
remove duplicate linked list adjustment

The list of intersection points on a curve segment may have
entries that can be safely removed when nearby points have
nearly the same t value and point value. When a path includes
very large curves as well as small ones, as is the case with
this fuzzer, additional points may lie between the similar
points that do not meet the nearby criteria.

After merging the nearby point with its doppelganger,
SkOpSegment::moveNearby() unnecessarily set the doppelganger's
next pointer to the one following the nearby point. While
this usually has no effect, since the merge already updated
the linked list, the explicit call removes the additional
outlier points from the segment.

TBR=reed@google.com
BUG=526025

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

8 years agoRun Appurify bot in release mode
borenet [Mon, 31 Aug 2015 16:30:57 +0000 (09:30 -0700)]
Run Appurify bot in release mode

BUG=skia:4093

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

8 years agoSuppress embedding fonts when the skp's fonts match the OS fonts.
caryclark [Mon, 31 Aug 2015 16:22:38 +0000 (09:22 -0700)]
Suppress embedding fonts when the skp's fonts match the OS fonts.

The million SKPs generated require >5T of storage. A good deal
of that are copies of system fonts.

Chrome built with
#DEFINE SK_WHITELIST_SERIALIZED_TYPEFACES
will omit the font data if the font matches a precomputed
checksum.

The captured SKP prepends sk_ to the names of fonts that
have their data omitted. The SKP consumer can either add
renamed fonts from the recording machine, or add

gDeserializeTypefaceDelegate = WhitelistDeserializeTypeface;

which strips the sk_ prefix when deserializing typefaces.

whitelist_typefaces --check
Computes the checksums of fallback
fonts and returns 0 if the checksums match the checked-in
file SkWhitelistChecksum.cpp.

whitelist_typefaces --generate
Writes an updated version of SkWhitelistChecksum.cpp.

(Added Mike since this modifies a public header)

R=bungeman@google.com,rmistry@google.com,reed@google.com

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

8 years agoUse a different download URL for Android toolchains
borenet [Mon, 31 Aug 2015 15:35:32 +0000 (08:35 -0700)]
Use a different download URL for Android toolchains

The current one isn't working on the Appurify bot

BUG=skia:4093

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

8 years agoBy default purge resources that haven't been used for 64 flushes
bsalomon [Mon, 31 Aug 2015 15:25:03 +0000 (08:25 -0700)]
By default purge resources that haven't been used for 64 flushes

BUG=skia:4258

Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104

R=robertphillips@google.com

Committed: https://skia.googlesource.com/skia/+/71d0c33068d41878cc3117f3761f49300f6b3d54

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

8 years agoProvide some detail about valentine password
benjaminwagner [Mon, 31 Aug 2015 14:27:24 +0000 (07:27 -0700)]
Provide some detail about valentine password

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

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

8 years agoCMake builds on Ubuntu now too.
mtklein [Mon, 31 Aug 2015 13:59:21 +0000 (06:59 -0700)]
CMake builds on Ubuntu now too.

Punted for now on GL on Linux.  Man that's a beast.

BUG=skia:4269

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

8 years agoScanline decoding for bmp
msarett [Mon, 31 Aug 2015 13:55:13 +0000 (06:55 -0700)]
Scanline decoding for bmp

Redesigns SkScanlineDecoder.h to indicate the ordering
in which the scanlines are provided

Refactors SkSwizzler::Fill() to include the zeroInit check
and to actually be correct.

BUG=skia:3257
BUG=skia:4198

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

8 years agoRevert of By default purge resources that haven't been used for 64 flushes (patchset...
bsalomon [Mon, 31 Aug 2015 10:24:13 +0000 (03:24 -0700)]
Revert of By default purge resources that haven't been used for 64 flushes (patchset #3 id:40001 of https://codereview.chromium.org/1316233003/ )

Reason for revert:
Blocking roll

Original issue's description:
> By default purge resources that haven't been used for 64 flushes
>
> BUG=skia:4258
>
> Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104
>
> R=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/71d0c33068d41878cc3117f3761f49300f6b3d54

TBR=robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4258

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

8 years agoBy default purge resources that haven't been used for 64 flushes
Brian Salomon [Mon, 31 Aug 2015 02:12:11 +0000 (22:12 -0400)]
By default purge resources that haven't been used for 64 flushes

BUG=skia:4258

Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104

R=robertphillips@google.com

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

8 years agoUpdate SKP version
rmistry [Sun, 30 Aug 2015 07:19:11 +0000 (00:19 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

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

8 years agoFix leak in test create for perlin noise fp
bsalomon [Sat, 29 Aug 2015 13:27:29 +0000 (06:27 -0700)]
Fix leak in test create for perlin noise fp

TBR=robertphillips@google.com

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

8 years agoChange SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
bsalomon [Sat, 29 Aug 2015 01:46:56 +0000 (18:46 -0700)]
Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*

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

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

8 years agoRevert of Change SkShader;asFragmentProcessor signature to no longer take skpaint...
rmistry [Sat, 29 Aug 2015 00:16:50 +0000 (17:16 -0700)]
Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (patchset #8 id:140001 of https://codereview.chromium.org/1316513002/ )

Reason for revert:
Primary suspect in failing DEPS rolls:
* https://codereview.chromium.org/1315753006
* https://codereview.chromium.org/1308323006
* https://codereview.chromium.org/1320903004

Primary suspect because the failing win bots did not fail in https://codereview.chromium.org/1315753005

Original issue's description:
> Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
>
> Committed: https://skia.googlesource.com/skia/+/ecfdc251be71f3d634e76afdd6375bf55fc061aa

TBR=joshualitt@google.com,wangyix@google.com,robertphillips@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoChange SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
bsalomon [Fri, 28 Aug 2015 21:33:46 +0000 (14:33 -0700)]
Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*

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

8 years agofix bounds check for ctables (thanks Hal)
reed [Fri, 28 Aug 2015 19:38:04 +0000 (12:38 -0700)]
fix bounds check for ctables (thanks Hal)

BUG=skia:

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

8 years agoChange 900k to 910k in another location.
benjaminwagner [Fri, 28 Aug 2015 19:23:54 +0000 (12:23 -0700)]
Change 900k to 910k in another location.

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

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

8 years agoExample CMake build for Skia.
mtklein [Fri, 28 Aug 2015 18:51:06 +0000 (11:51 -0700)]
Example CMake build for Skia.

This works only on Mac, probably only on 64-bit,
and doesn't support SkCodec.

BUG=skia:4269

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

8 years agoUpdate CT documentation on Skia site.
benjaminwagner [Fri, 28 Aug 2015 17:34:47 +0000 (10:34 -0700)]
Update CT documentation on Skia site.

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

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

8 years agochange colortable to use factory for reinflating, check for empty
reed [Fri, 28 Aug 2015 17:14:18 +0000 (10:14 -0700)]
change colortable to use factory for reinflating, check for empty

BUG=525763

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

8 years agoReplace SkPin32 with SkTPin and remove.
bungeman [Fri, 28 Aug 2015 16:09:32 +0000 (09:09 -0700)]
Replace SkPin32 with SkTPin and remove.

SkPin32 is already just forwarding to SkTPin, so convert existing
users and remove SkPin32.

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

8 years agoRemove sys/types.h include from SkTypes.h.
bungeman [Fri, 28 Aug 2015 14:39:30 +0000 (07:39 -0700)]
Remove sys/types.h include from SkTypes.h.

It appears this was added to support SkToOffT, but SkToOffT
is no longer used, so it is removed as well.

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

8 years agoInterlaced gifs without the iterator
msarett [Fri, 28 Aug 2015 14:36:55 +0000 (07:36 -0700)]
Interlaced gifs without the iterator

BUG=skia:

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

8 years agoClean up SkTLogic.
bungeman [Fri, 28 Aug 2015 14:09:20 +0000 (07:09 -0700)]
Clean up SkTLogic.

This change regularizes Skia's type traits so that when <type_traits>
can finally be used the transition is easier. Various traits are
renamed to match <type_traits> and placed in the skstd namespace.
Current users of these traits are updated.

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

8 years agoConvert child FPs from refs to pending executions when parent converts
bsalomon [Thu, 27 Aug 2015 23:43:48 +0000 (16:43 -0700)]
Convert child FPs from refs to pending executions when parent converts

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

8 years agoSome codec code formatting cleanup.
bungeman [Thu, 27 Aug 2015 23:43:42 +0000 (16:43 -0700)]
Some codec code formatting cleanup.

While looking at users of SkTAddOffset, some unwanted casts were
found. These casts are removed and the lines reformatted. However,
the formatting of the rest of the file was unhappy, so this is really
just a formatting clean-up.

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

8 years agoRevert of By default purge resources that haven't been used for 64 flushes (patchset...
rmistry [Thu, 27 Aug 2015 20:53:48 +0000 (13:53 -0700)]
Revert of By default purge resources that haven't been used for 64 flushes (patchset #2 id:20001 of https://codereview.chromium.org/1316233003/ )

Reason for revert:
Suspect for the failed "webgl_conformance on Intel GPU on Mac" test on 2 DEPS rolls:
https://codereview.chromium.org/1320943002/
https://codereview.chromium.org/1315703003/

Example build: http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/105501

Original issue's description:
> By default purge resources that haven't been used for 64 flushes
>
> BUG=skia:4258
>
> Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104

TBR=robertphillips@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4258

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

8 years agoRemove overly complicated GR_CREATE_STATIC_PROCESSOR macro
mdempsky [Thu, 27 Aug 2015 19:57:01 +0000 (12:57 -0700)]
Remove overly complicated GR_CREATE_STATIC_PROCESSOR macro

This macro was responsible for producing code like:

    static SkAlignedStorage<sizeof(Foo)> g_gFoo_Storage;
    static Foo* gFoo = new(g_gFoo_Storage.get()) Foo;
    static SkAutoTDestroy<Foo> gFoo_ad(gFoo);

which would allocate static storage for an object of type Foo
(g_gFoo_Storage), lazily instantiate the object in that memory (via
gFoo's initializer), and then ensure that at global destruction time
the object is destroyed (via gFoo_Ad's destructor).

However, the exact same effect is achieved by just writing:

    static Foo gFoo;

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

8 years agoAdd a note about (x*y+255)/256.
mtklein [Thu, 27 Aug 2015 19:05:56 +0000 (12:05 -0700)]
Add a note about (x*y+255)/256.

BUG=skia:4117

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

8 years agoAdd trace event to SkPicture analysis.
mtklein [Thu, 27 Aug 2015 17:39:07 +0000 (10:39 -0700)]
Add trace event to SkPicture analysis.

RE: https://codereview.chromium.org/1319723002/

This should mark out the time spent to support hasText(),
willPlayBackBitmaps(), and numSlowPaths() in about:tracing.

BUG=skia:

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

8 years agoskia: add ability to load command_buffer_gles2
hendrikw [Thu, 27 Aug 2015 17:38:39 +0000 (10:38 -0700)]
skia: add ability to load command_buffer_gles2

BUG=skia:

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

8 years ago[tracing] Add support for skia caches to dump memory stats
ssid [Thu, 27 Aug 2015 16:23:54 +0000 (09:23 -0700)]
[tracing] Add support for skia caches to dump memory stats

Dump the memory statistics of resource cache and glyph cache using the
SkTraceMemoryDump interface.

BUG=chromium:503168

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

8 years agoBy default purge resources that haven't been used for 64 flushes
bsalomon [Thu, 27 Aug 2015 15:47:47 +0000 (08:47 -0700)]
By default purge resources that haven't been used for 64 flushes

BUG=skia:4258

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

8 years agonullptr isn't an int; this is what we want
halcanary [Thu, 27 Aug 2015 15:32:26 +0000 (08:32 -0700)]
nullptr isn't an int; this is what we want

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

8 years agoStyle Change: NULL->nullptr
halcanary [Thu, 27 Aug 2015 14:41:13 +0000 (07:41 -0700)]
Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

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

8 years agoSkColorCubeFilter_opts: start with a statically-initializable zero.
mtklein [Thu, 27 Aug 2015 13:46:03 +0000 (06:46 -0700)]
SkColorCubeFilter_opts: start with a statically-initializable zero.

SkPMFloat(0) and SkPMFloat(0,0,0,0) end up with the same value,
but the first goes through math to get there.  The second is a lot more
transparent to the compiler, and  should compile all the way down to
just `xorps xmmN,xmmN` or even be optimized away.

Didn't measure any additional benefit from hoisting the zero outside
the loop and writing `SkPMFloat color = zero;`.

Perf win is <2%.

BUG=skia:

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

8 years agoFix assertion about GPU memory size when the target is not FBO 0
chinmaygarde [Thu, 27 Aug 2015 13:36:33 +0000 (06:36 -0700)]
Fix assertion about GPU memory size when the target is not FBO 0

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

8 years agoRemove GrStagedProcessor, remove the word Stage as it applies to FPs
bsalomon [Thu, 27 Aug 2015 13:30:17 +0000 (06:30 -0700)]
Remove GrStagedProcessor, remove the word Stage as it applies to FPs

Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7

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

8 years agoRemove deprecated usage of SkNEW and SkDELETE
mdempsky [Wed, 26 Aug 2015 22:27:59 +0000 (15:27 -0700)]
Remove deprecated usage of SkNEW and SkDELETE

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

8 years agoFix clipped lighting image filters.
senorblanco [Wed, 26 Aug 2015 21:26:40 +0000 (14:26 -0700)]
Fix clipped lighting image filters.

The CPU path for lighting image filters was not adjusting the filter
matrix to accommodate srcOffset, resulting in incorrectly-positioned
lights.  (The GPU path was doing this correctly.)

This change adds a new test case to the imagefiltersclipped GM,
so it will need new baselines.

BUG=skia:

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

8 years agomake cacherator thread-safe
reed [Wed, 26 Aug 2015 21:16:43 +0000 (14:16 -0700)]
make cacherator thread-safe

hoisted from https://codereview.chromium.org/1282363002 as that CL is going to take a while to finish

BUG=skia:
TBR=

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

8 years agoAdd white variants to TextBench
mtklein [Wed, 26 Aug 2015 20:41:31 +0000 (13:41 -0700)]
Add white variants to TextBench

Might be worth a look.

BUG=skia:

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

8 years agoStyle Change: SkNEW->new; SkDELETE->delete
halcanary [Wed, 26 Aug 2015 20:07:48 +0000 (13:07 -0700)]
Style Change:  SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

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

8 years agotrifurcate blit_mask_d32_a8 into _black, _opaque, _general.
mtklein [Wed, 26 Aug 2015 19:35:14 +0000 (12:35 -0700)]
trifurcate blit_mask_d32_a8 into _black, _opaque, _general.

We used to split the NEON code this way, and just had one path for SSE.
It's unclear to me testing locally if there's any major win here, but there's at least a small one.

No pixel diffs or even any math changes, just folding constants through.

BUG=skia:4117

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

8 years agoWrite a gm to verify append large glyph as path works
joshualitt [Wed, 26 Aug 2015 18:19:55 +0000 (11:19 -0700)]
Write a gm to verify append large glyph as path works

BUG=chromium:522846

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

8 years agoAdd HangingS.ttf to test large flourish caps.
bungeman [Wed, 26 Aug 2015 17:44:48 +0000 (10:44 -0700)]
Add HangingS.ttf to test large flourish caps.

This is designed to allow local testing of the related bug.

BUG=chromium:522846

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

8 years agozero-length cap fix
caryclark [Wed, 26 Aug 2015 16:04:55 +0000 (09:04 -0700)]
zero-length cap fix

Re-land; layout tests are suppressed and gm differences are understood.
A merge conflict prevented a automatic reland.

If the endcap is not butt, draw the endcaps even when the line
has zero length.

If the dash length is zero, generate a zero length line segment.

Treat a move followed by a close as a move followed by a zero-length
line.

TBR=reed@google.com
BUG=422974

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

8 years agoHave SkPicture::willPlayBackBitmaps() count SkImages too.
mtklein [Wed, 26 Aug 2015 15:14:52 +0000 (08:14 -0700)]
Have SkPicture::willPlayBackBitmaps() count SkImages too.

New unit test fails at head but passes with this patch.

BUG=skia:4225

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

8 years agoRename GrBWFillRectBatch to GrNonAAFillRectBAtch
joshualitt [Wed, 26 Aug 2015 15:10:35 +0000 (08:10 -0700)]
Rename GrBWFillRectBatch to GrNonAAFillRectBAtch

TBR=bsalomon@google.com
BUG=skia:

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

8 years agoRevert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (patch...
rmistry [Wed, 26 Aug 2015 13:48:27 +0000 (06:48 -0700)]
Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (patchset #6 id:90001 of https://codereview.chromium.org/1307223004/ )

Reason for revert:
Causes bot failures:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1639

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/1702

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-NexusPlayer-GPU-PowerVR-x86-Debug/builds/1223

Original issue's description:
> Remove GrStagedProcessor, remove the word Stage as it applies to FPs
>
> Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7

TBR=joshualitt@google.com,egdaniel@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoModify GrBWFillRectBatch to use GrQuad
joshualitt [Wed, 26 Aug 2015 13:23:39 +0000 (06:23 -0700)]
Modify GrBWFillRectBatch to use GrQuad

BUG=skia:

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

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

8 years agostray malloc/free -> sk_malloc/sk_free
mtklein [Wed, 26 Aug 2015 12:43:22 +0000 (05:43 -0700)]
stray malloc/free -> sk_malloc/sk_free

BUG=skia:

TBR=bungeman@google.com

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

8 years agoRemove GrStagedProcessor, remove the word Stage as it applies to FPs
bsalomon [Wed, 26 Aug 2015 12:39:18 +0000 (05:39 -0700)]
Remove GrStagedProcessor, remove the word Stage as it applies to FPs

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

8 years agoRemove include of stdlib.h from SkTypes.h.
bungeman [Wed, 26 Aug 2015 12:15:46 +0000 (05:15 -0700)]
Remove include of stdlib.h from SkTypes.h.

Unfortunately, immintrin.h (which is also included by SkTypes)
includes xmmintrin.h which includes mm_malloc.h which includes
stdlib.h for malloc even though, from the implementation, it is
difficult to see why.

Fortunately, arm_neon.h does not seem to be involved in such
shenanigans, so building for Android will keep things sane.

TBR=reed@google.com
Doesn't change Skia API, just moves an include.

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

8 years agoAdd markdown for Infra troopers
rmistry [Tue, 25 Aug 2015 20:39:41 +0000 (13:39 -0700)]
Add markdown for Infra troopers

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

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

8 years agoReland of ix zero-length tangent (patchset #1 id:1 of https://codereview.chromium...
caryclark [Tue, 25 Aug 2015 20:19:06 +0000 (13:19 -0700)]
Reland of ix zero-length tangent (patchset #1 id:1 of https://codereview.chromium.org/1312243002/ )

Reason for revert:
Layout suppression has landed, and verified that Skia gm test changes are correct.

Original issue's description:
> Revert of fix zero-length tangent (patchset #2 id:20001 of https://codereview.chromium.org/1311273002/ )
>
> Reason for revert:
> causes layout test to draw differently -- new drawing is more correct. Reverting until layout test ignore is landed.
>
> Original issue's description:
> > fix zero-length tangent
> >
> > If the end point and the control point are the same, computing
> > the tangent will result in (0, 0). In this case, use the prior
> > control point instead.
> >
> > R=reed@google.com
> >
> > BUG=skia:4191
> >
> > Committed: https://skia.googlesource.com/skia/+/7544124fb8ee744f68f549a353f8a9163cd7432d
>
> TBR=reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4191
>
> Committed: https://skia.googlesource.com/skia/+/91298b47c547b2ab4697038c04685af957bd1416

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4191

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

8 years agoFix for MSAN unintialized value
joshualitt [Tue, 25 Aug 2015 19:10:54 +0000 (12:10 -0700)]
Fix for MSAN unintialized value

BUG=524094

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

8 years agoRemove SK_OFFSETOF from SkTypes, clean up offsetof usage.
bungeman [Tue, 25 Aug 2015 19:05:55 +0000 (12:05 -0700)]
Remove SK_OFFSETOF from SkTypes, clean up offsetof usage.

The motivation for this was to remove SK_OFFSETOF from SkTypes, but
this CL is mostly about cleaning up our use of offsetof generally.

SK_OFFSETOF is removed to SkTypes and added to the two places it is
actually used (for the non standard behavior of finding the offset of
fields in types which are not standard layout).

Older versions of gcc required POD for offsetof to be used without
warning. Newer versions require the more relaxed standard layout.
Now that we no longer build on older versions of gcc, remove the
old warning suppressions.

PODMatrix is renamed to AggregateMatrix. SkMatrix is already POD
(trivial and standard layout). The PODMatrix name implies that the
POD-ness is needed for the offsetof, but it is actually the aggregate
attribute which is needed for compile time constant initialization.
This makes it more obvious that this can be revisited after we can
rely on constexpr constructors.

This also adds skstd::declval since this allows removal of existing
awkward code which casts a constant to a pointer to find the size of
a field.

TBR=reed@google.com
No API change, only removes unused macro.

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

8 years agoFix for distance field draw large glyph as paths
joshualitt [Tue, 25 Aug 2015 19:05:50 +0000 (12:05 -0700)]
Fix for distance field draw large glyph as paths

BUG=skia:

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

8 years agoDM: "wb" (binary mode) may matter on Windows
mtklein [Tue, 25 Aug 2015 17:56:08 +0000 (10:56 -0700)]
DM: "wb" (binary mode) may matter on Windows

I suspect we might be doing some funky /n -> /r/n translations without 'b'.
This kills the PNG.

BUG=skia:

NOTREECHECKS=true

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

8 years agoRevert of fix zero-length tangent (patchset #2 id:20001 of https://codereview.chromiu...
caryclark [Tue, 25 Aug 2015 17:02:46 +0000 (10:02 -0700)]
Revert of fix zero-length tangent (patchset #2 id:20001 of https://codereview.chromium.org/1311273002/ )

Reason for revert:
causes layout test to draw differently -- new drawing is more correct. Reverting until layout test ignore is landed.

Original issue's description:
> fix zero-length tangent
>
> If the end point and the control point are the same, computing
> the tangent will result in (0, 0). In this case, use the prior
> control point instead.
>
> R=reed@google.com
>
> BUG=skia:4191
>
> Committed: https://skia.googlesource.com/skia/+/7544124fb8ee744f68f549a353f8a9163cd7432d

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4191

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

8 years agoSpeculative valgrind fix
robertphillips [Tue, 25 Aug 2015 16:53:10 +0000 (09:53 -0700)]
Speculative valgrind fix

I wasn't able to repro locally but it seems like it has to be this.

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

8 years agofix zero-length tangent
caryclark [Tue, 25 Aug 2015 15:03:01 +0000 (08:03 -0700)]
fix zero-length tangent

If the end point and the control point are the same, computing
the tangent will result in (0, 0). In this case, use the prior
control point instead.

R=reed@google.com

BUG=skia:4191

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

8 years agoSkip scaled_tilemodes_npot on Galaxy S4
borenet [Tue, 25 Aug 2015 13:53:37 +0000 (06:53 -0700)]
Skip scaled_tilemodes_npot on Galaxy S4

It's hanging.

BUG=skia:3932

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

8 years agoAdd build targets for advanced Intel instruction sets (1.5 of 3)
mtklein [Tue, 25 Aug 2015 13:30:07 +0000 (06:30 -0700)]
Add build targets for advanced Intel instruction sets (1.5 of 3)

This is a follow-up to https://codereview.chromium.org/1290423007/,
with a couple small changes:

   - turn on AVX and AVX2 for Windows using /arch ('EnabledEnhancedInstructionSet')
   - reformat and de-conditionalize where possible / irrelevant

Picked up this while poking around in libvpx's Chrome GYPs.

And yes, AVX = 3, AVX2 = 5.  Don't even ask what 4 means...

BUG=skia:4117

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

8 years agoEnable debug builds in the Android framework
djsollen [Mon, 24 Aug 2015 21:21:23 +0000 (14:21 -0700)]
Enable debug builds in the Android framework

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

8 years agoDM: use SkBitmap::reset()
mtklein [Mon, 24 Aug 2015 21:13:29 +0000 (14:13 -0700)]
DM: use SkBitmap::reset()

BUG=skia:

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

8 years agoHave DM manually encode its .png outputs.
mtklein [Mon, 24 Aug 2015 20:27:01 +0000 (13:27 -0700)]
Have DM manually encode its .png outputs.

This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7

CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Debug-Trybot

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

8 years agoAdd buildbot_spec info for Appurify bot
borenet [Mon, 24 Aug 2015 19:50:59 +0000 (12:50 -0700)]
Add buildbot_spec info for Appurify bot

BUG=skia:4093

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

8 years agoExplicitly friend ::SkPrivateEffectInitializer to flattenables.
mtklein [Mon, 24 Aug 2015 19:33:19 +0000 (12:33 -0700)]
Explicitly friend ::SkPrivateEffectInitializer to flattenables.

Looks like the -Wmicrosoft warnings in the bug are coming up specificically
because many the effects in SkLightingImageFilter are defined inside an
anonymous namespace (spanning, I think, lines 33-702 today).

BUG=skia:4091

No public API changes.
TBR=reed@google.com

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

8 years agoUpdate giflib to 5.1.1 (AOSP hash)
msarett [Mon, 24 Aug 2015 19:00:15 +0000 (12:00 -0700)]
Update giflib to 5.1.1 (AOSP hash)

This also disables warnings in giflib and fixes
compile warnings in icu, in order to fix a skia
bug.

BUG=skia:4220

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

8 years agoAdd build targets for advanced Intel instruction sets (1 of 3).
mtklein [Mon, 24 Aug 2015 17:32:02 +0000 (10:32 -0700)]
Add build targets for advanced Intel instruction sets (1 of 3).

CL (1 of 3) adds empty lists in our .gypi,
and builds the files in those empty lists with the appropriate flags.

CL (2 of 3) will have Chrome's GYP and GN files read these lists,
and build them with the appropriate flags.

CL (3 of 3) will add runtime detection and stub files to the lists
with empty Init_sse42(), Init_avx(), Init_avx2() methods.

After that, we should be able to use SSE 4.2, AVX, and AVX2 if desired.

Some motivation:
  - SSE 4.2 adds some sweet string-oriented methods that
    can help us write fast high quality 32-bit hashes.
  - AVX is SSE doubled, e.g. 8 floats or two SkPMFloat at a time.
  - AVX2 is SSE2 doubled, e.g. 8 pixels at a time.

BUG=skia:4117

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

8 years agoRevert of Modify GrBWFillRectBatch to use GrQuad (patchset #3 id:40001 of https:...
joshualitt [Mon, 24 Aug 2015 17:26:01 +0000 (10:26 -0700)]
Revert of Modify GrBWFillRectBatch to use GrQuad (patchset #3 id:40001 of https://codereview.chromium.org/1311793002/ )

Reason for revert:
on some bots this patch creates bad diffs

Original issue's description:
> Modify GrBWFillRectBatch to use GrQuad
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c611b5afbef6df6c02e949fdf092aab2bb7e0e2e

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

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