platform/upstream/libSkiaSharp.git
8 years agoRemove check for platform_tools/android/third_party/externals.
mtklein [Fri, 12 Feb 2016 20:54:15 +0000 (12:54 -0800)]
Remove check for platform_tools/android/third_party/externals.

We don't sync anything into it anymore, so a fresh gclient sync won't create it.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1694813004

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

8 years agoAdd support for caching font files in the Android SkFontMgr.
khushalsagar [Fri, 12 Feb 2016 20:42:48 +0000 (12:42 -0800)]
Add support for caching font files in the Android SkFontMgr.

SkFontMgr_Android lazily access font files from disk, which is not
possible when it is used in the renderer sandbox on Linux. Add a flag to
SkFontMgr_Android_CustomFonts for caching readonly FILE streams when
creating the font mgr.

Since the font mgr is created before the sandbox is initialized, it can
access these files on initialization, and use these cached streams safely
for its lifetime.

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

8 years agoMake SkJpegCodec compatible with libjpeg
msarett [Fri, 12 Feb 2016 20:35:48 +0000 (12:35 -0800)]
Make SkJpegCodec compatible with libjpeg

BUG=skia:4470
BUG=skia:4520
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1687863003

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

8 years agoChange ScalarTo256 to more efficient implementation.
benjaminwagner [Fri, 12 Feb 2016 20:19:14 +0000 (12:19 -0800)]
Change ScalarTo256 to more efficient implementation.

The previous implementation was likely more efficient when SkScalar was SkFixed.

BUG=skia:4632
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1693683002

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

8 years agoPut all XSAN bots on the same DEPS-sourced build of Clang.
mtklein [Fri, 12 Feb 2016 20:15:23 +0000 (12:15 -0800)]
Put all XSAN bots on the same DEPS-sourced build of Clang.

This adds LLVM, Clang, and compiler-rt (*san tools) to DEPS,
then uses them from xsan_build, building them if needed.

This is similar to how the CMake bots bootstrap CMake if needed.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1693733003

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

8 years agoUse noperspective interpolation for 2D draws
cdalton [Fri, 12 Feb 2016 20:14:06 +0000 (12:14 -0800)]
Use noperspective interpolation for 2D draws

Adds a mechanism to notify GrGLSLVaryingHandler that a shader will not
emit geometry in perspective. This gives it a chance to use the
noperspective keyword if it is supported.

Updates the existing processors to notify the varying handler when
there is no perspective.

Begins using the noperspective keyword in GrGLGpu internal shaders.

Web scenes with observable benefit (Pixel C, gpu config):

  tabl_nofolo.skp        4.62 -> 3.33 ms   28%
  desk_tigersvg.skp      26.5 -> 24 ms      9%
  desk_pokemonwiki.skp   16.1 -> 14.9 ms    7%
  tabl_deviantart.skp    3.97 -> 3.7 ms     7%
  desk_gws.skp           3.85 -> 3.65 ms    5%

Also adds new methods for creating varyings with flat interpolation.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1673093002

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

8 years agoMake copySurface work in more situations.
bsalomon [Fri, 12 Feb 2016 20:10:14 +0000 (12:10 -0800)]
Make copySurface work in more situations.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1693923002

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

8 years agoadded clip visualization to skiaserve
ethannicholas [Fri, 12 Feb 2016 20:06:53 +0000 (12:06 -0800)]
added clip visualization to skiaserve
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1690023004

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

8 years agoAdd a dependency from the debugger on tools.gyp:url_data_manager.
jbroman [Fri, 12 Feb 2016 19:29:23 +0000 (11:29 -0800)]
Add a dependency from the debugger on tools.gyp:url_data_manager.

BUG=skia:4947
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1695753003

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

8 years agoPut back the 0.5 bias in the shader. Only adjust the radii for the geometry, not...
brianosman [Fri, 12 Feb 2016 18:20:00 +0000 (10:20 -0800)]
Put back the 0.5 bias in the shader. Only adjust the radii for the geometry, not the radii constants.

After working through this with Jim, this is more mathematically correct, and also accounts for the inner radius.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1692683003

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

8 years agoskiaserve now retains the graphics context rather than creating a new one each request
ethannicholas [Fri, 12 Feb 2016 18:09:34 +0000 (10:09 -0800)]
skiaserve now retains the graphics context rather than creating a new one each request
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1693893002

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

8 years agoUpdate Android framework makefile to build static and shared libs
djsollen [Fri, 12 Feb 2016 16:44:39 +0000 (08:44 -0800)]
Update Android framework makefile to build static and shared libs

Also use static lib for testing tools and expose includes needed for
other framework testing tools to statically link in Skia.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1696483002

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

8 years agoDocumantation: nanobench
halcanary [Fri, 12 Feb 2016 16:08:27 +0000 (08:08 -0800)]
Documantation: nanobench

DOCS_PREVIEW= https://skia.org/dev/testing/tests?cl=1696723002
              https://skia.org/dev/testing/tests?cl=1696723002#bench
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1696723002
NOTRY=true

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

8 years agoRemove the 0.5 bias from the ellipse edge function. This makes coverage drop to zero...
brianosman [Fri, 12 Feb 2016 15:45:56 +0000 (07:45 -0800)]
Remove the 0.5 bias from the ellipse edge function. This makes coverage drop to zero before we get clipped by the rasterizer (i.e. ensures the generated ellipse is inscribed in the geometry).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683843006

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

8 years agoSkDocument: remove use of SkTArray (part 3/3).
halcanary [Fri, 12 Feb 2016 15:26:46 +0000 (07:26 -0800)]
SkDocument: remove use of SkTArray (part 3/3).

TBR=reed
Removal only. Verbal lgtm.

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

8 years agofixed SkDebugCanvas' handling of drawPicture
ethannicholas [Fri, 12 Feb 2016 15:15:45 +0000 (07:15 -0800)]
fixed SkDebugCanvas' handling of drawPicture
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685133008

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

8 years agoEnable RAW codec for Google3.
benjaminwagner [Fri, 12 Feb 2016 00:00:24 +0000 (16:00 -0800)]
Enable RAW codec for Google3.

This CL depends on internal cl/113089689.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1692513003

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

8 years agoDelete SkDecodingImageGenerator
msarett [Thu, 11 Feb 2016 22:17:17 +0000 (14:17 -0800)]
Delete SkDecodingImageGenerator

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1692053002

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

8 years agoSwitch to vertex colors rather than uniforms for color in Ellipse/Circle/RRect/DRRect
brianosman [Thu, 11 Feb 2016 22:15:18 +0000 (14:15 -0800)]
Switch to vertex colors rather than uniforms for color in Ellipse/Circle/RRect/DRRect

[Notes:]
- Performance delta on desktop looked like noise. I'm curious what the results will be on low-end mobile GPUs. I'm still trying to figure out how I determine that with perf, etc...
- There appeared to be a single one-pixel image diff while running dm, if I'm understanding the results of skdiff correctly, so that's probably good news?
- Should I include anyone else on the review?

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1675833002

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

8 years agoAdd #define directives to GrGLSLShaderBuilder
cdalton [Thu, 11 Feb 2016 22:10:38 +0000 (14:10 -0800)]
Add #define directives to GrGLSLShaderBuilder

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1660813002

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

8 years agoImplement onSkipScanlines() for bmp and wbmp
msarett [Thu, 11 Feb 2016 21:29:36 +0000 (13:29 -0800)]
Implement onSkipScanlines() for bmp and wbmp

TBR=reed@google.com
BUG=skia:4270
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691083002

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

8 years agofixed off-by-one error in skiaserve /cmd
ethannicholas [Thu, 11 Feb 2016 21:10:37 +0000 (13:10 -0800)]
fixed off-by-one error in skiaserve /cmd
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1692683002

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

8 years agoAdd GrShaderFlags enum
cdalton [Thu, 11 Feb 2016 20:49:47 +0000 (12:49 -0800)]
Add GrShaderFlags enum

Replaces GrGLSLUniformHandler::ShaderVisibility with GrShaderFlags.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684063006

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

8 years agonew version of SkHalfToFloat_01
mtklein [Thu, 11 Feb 2016 20:48:23 +0000 (12:48 -0800)]
new version of SkHalfToFloat_01

This is a little faster than the previous version, and much better explained.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1688233002

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

8 years agostart to chip away at friending of GrAtlasTextBatch/GrAtlasTextBlob
joshualitt [Thu, 11 Feb 2016 20:42:02 +0000 (12:42 -0800)]
start to chip away at friending of GrAtlasTextBatch/GrAtlasTextBlob

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684253002

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

8 years agoRevert of Make copySurface work for texture dsts, return a bool, & add unit test...
kjlubick [Thu, 11 Feb 2016 20:05:24 +0000 (12:05 -0800)]
Revert of Make copySurface work for texture dsts, return a bool, & add unit test. (patchset #6 id:100001 of https://codereview.chromium.org/1684313002/ )

Reason for revert:
Copy surface tests are not happy for Windows, Android and probably others:
https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release/builds/4161
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Release/builds/3694

Original issue's description:
> Make copySurface work for texture dsts, return a bool, & add unit test.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002
>
> Committed: https://skia.googlesource.com/skia/+/7ea5e28065e5eb797e95f5d81c1a65cf3209d741

TBR=robertphillips@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoRemove GrContext* from GrTextContext
joshualitt [Thu, 11 Feb 2016 20:00:33 +0000 (12:00 -0800)]
Remove GrContext* from GrTextContext

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686143003

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

8 years agoMake copySurface work for texture dsts, return a bool, & add unit test.
bsalomon [Thu, 11 Feb 2016 19:42:31 +0000 (11:42 -0800)]
Make copySurface work for texture dsts, return a bool, & add unit test.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002

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

8 years agoenable ThermalManager on Android
joshualitt [Thu, 11 Feb 2016 19:42:19 +0000 (11:42 -0800)]
enable ThermalManager on Android

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684653002

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

8 years agoSupport more color types for ICOs
msarett [Thu, 11 Feb 2016 18:49:31 +0000 (10:49 -0800)]
Support more color types for ICOs

BUG=skia:4620
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1694513002

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

8 years agoAvoid initializing memory twice on incomplete RLE bmps
msarett [Thu, 11 Feb 2016 18:35:48 +0000 (10:35 -0800)]
Avoid initializing memory twice on incomplete RLE bmps

BUG=skia:4582
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689983002

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

8 years agointegrated SkDebugCanvas JSON support with UrlDataManager
ethannicholas [Thu, 11 Feb 2016 18:35:21 +0000 (10:35 -0800)]
integrated SkDebugCanvas JSON support with UrlDataManager
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686143004

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

8 years agoTest SkAndroidCodec for more types
scroggo [Thu, 11 Feb 2016 18:24:55 +0000 (10:24 -0800)]
Test SkAndroidCodec for more types

Now that SkAndroidCodec supports all types, stop selectively running
its tests for the types supported by BRD.

For the tests that actually require BRD support (i.e. partial
scanlines), change the method name from supports_scaled_codec to
supports_partial_scanlines to be more accurate today.

Use the name SkAndroidCodec instead of SkScaledCodec.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691823002

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

8 years agoFurther reduce the number of primitives in the donut tests. Avoids crashes on iOS.
brianosman [Thu, 11 Feb 2016 17:07:02 +0000 (09:07 -0800)]
Further reduce the number of primitives in the donut tests. Avoids crashes on iOS.

BUG=skia:4937
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691813002

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

8 years agoClarify bmp comment about when we support the alpha mask
msarett [Thu, 11 Feb 2016 16:41:53 +0000 (08:41 -0800)]
Clarify bmp comment about when we support the alpha mask

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689183002

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

8 years agoFix scanline decoding of rare RLE bmps
msarett [Thu, 11 Feb 2016 16:41:01 +0000 (08:41 -0800)]
Fix scanline decoding of rare RLE bmps

This also exposed a bug in rewinding RLE bmps, which I have also
fixed in this CL.

This should fix testcase7.bmp on Gold.

The image that I am adding to resources is in the
public domain.

BUG=skia:4730
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689953002

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

8 years agoSkNx refactoring
mtklein [Thu, 11 Feb 2016 16:10:22 +0000 (08:10 -0800)]
SkNx refactoring

  - add back Sk4i typedef
  - define SSE casts in terms of Sk4i
      * uint8  <-> float becomes uint8  <-> int <-> float
      * uint16 <-> float becomes uint16 <-> int <-> float

    This has the nice side effect of specializing uint8 <-> int
    and uint16 <-> int, which are useful in their own right.

There are many cast specializations now, some of which call each other.
I have tried to arrange them in some sort of sensible order, subject to
the constraint that those called must precede those who call.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1690633003
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoRemove SK_SUPPORT_LEGACY_BITMAP_FILTER guard
fmalita [Thu, 11 Feb 2016 16:06:39 +0000 (08:06 -0800)]
Remove SK_SUPPORT_LEGACY_BITMAP_FILTER guard

TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1695443002

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

8 years agoSkDocument: remove use of SkTArray (part 1/3).
halcanary [Thu, 11 Feb 2016 15:59:59 +0000 (07:59 -0800)]
SkDocument: remove use of SkTArray (part 1/3).

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689683002

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

8 years agowire up new json code in skiaserve
joshualitt [Thu, 11 Feb 2016 15:09:51 +0000 (07:09 -0800)]
wire up new json code in skiaserve

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691773002

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

8 years agofix for gpu valgrind bot
joshualitt [Thu, 11 Feb 2016 14:53:36 +0000 (06:53 -0800)]
fix for gpu valgrind bot

TBR=egdaniel@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689823004

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

8 years agoPass a GrContext pointer in GrDrawContext constructor
joshualitt [Thu, 11 Feb 2016 14:46:52 +0000 (06:46 -0800)]
Pass a GrContext pointer in GrDrawContext constructor

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691503002

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

8 years agoAdd AndroidCodecBench to time scaled decodes
msarett [Thu, 11 Feb 2016 14:45:51 +0000 (06:45 -0800)]
Add AndroidCodecBench to time scaled decodes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685693003

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

8 years agoSkHalfToFloat_01 / SkFloatToHalf_01
mtklein [Thu, 11 Feb 2016 14:30:03 +0000 (06:30 -0800)]
SkHalfToFloat_01 / SkFloatToHalf_01

These are basically inlined, 4-at-a-time versions of our existing functions,
but cut down to avoid any work that's only necessary outside [0,1].

Both f16 and f32 denorms should work fine modulo the usual ARMv7 NEON denorm==zero caveat.

In exchange for a little speed, f32->f16 does not round properly.
Instead it truncates, so it's never off by more than 1 bit.

Support for finite values >1 or <0 is straightforward to add back.
>1 might already work as-is.

Getting close to _u16 performance:
    micros    bench
    261.13   xferu64_bw_1_opaque_u16
   1833.51   xferu64_bw_1_alpha_u16
   2762.32 ? xferu64_aa_1_opaque_u16
   3334.29   xferu64_aa_1_alpha_u16
    249.78   xferu64_bw_1_opaque_f16
   3383.18   xferu64_bw_1_alpha_f16
   4214.72   xferu64_aa_1_opaque_f16
   4701.19   xferu64_aa_1_alpha_f16

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685133005

Committed: https://skia.googlesource.com/skia/+/9ea11a4235b3e3521cc8bf914a27c2d0dc062db9

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoRevert of SkHalfToFloat_01 / SkFloatToHalf_01 (patchset #11 id:200001 of https:/...
mtklein [Thu, 11 Feb 2016 14:00:49 +0000 (06:00 -0800)]
Revert of SkHalfToFloat_01 / SkFloatToHalf_01 (patchset #11 id:200001 of https://codereview.chromium.org/1685133005/ )

Reason for revert:
Gotta fix Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Original issue's description:
> SkHalfToFloat_01 / SkFloatToHalf_01
>
> These are basically inlined, 4-at-a-time versions of our existing functions,
> but cut down to avoid any work that's only necessary outside [0,1].
>
> Both f16 and f32 denorms should work fine modulo the usual ARMv7 NEON denorm==zero caveat.
>
> In exchange for a little speed, f32->f16 does not round properly.
> Instead it truncates, so it's never off by more than 1 bit.
>
> Support for finite values >1 or <0 is straightforward to add back.
> >1 might already work as-is.
>
> Getting close to _u16 performance:
>     micros    bench
>     261.13   xferu64_bw_1_opaque_u16
>    1833.51   xferu64_bw_1_alpha_u16
>    2762.32 ? xferu64_aa_1_opaque_u16
>    3334.29   xferu64_aa_1_alpha_u16
>     249.78   xferu64_bw_1_opaque_f16
>    3383.18   xferu64_bw_1_alpha_f16
>    4214.72   xferu64_aa_1_opaque_f16
>    4701.19   xferu64_aa_1_alpha_f16
>
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685133005
>
> Committed: https://skia.googlesource.com/skia/+/9ea11a4235b3e3521cc8bf914a27c2d0dc062db9

TBR=jvanverth@google.com,reed@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoSkHalfToFloat_01 / SkFloatToHalf_01
mtklein [Thu, 11 Feb 2016 13:56:08 +0000 (05:56 -0800)]
SkHalfToFloat_01 / SkFloatToHalf_01

These are basically inlined, 4-at-a-time versions of our existing functions,
but cut down to avoid any work that's only necessary outside [0,1].

Both f16 and f32 denorms should work fine modulo the usual ARMv7 NEON denorm==zero caveat.

In exchange for a little speed, f32->f16 does not round properly.
Instead it truncates, so it's never off by more than 1 bit.

Support for finite values >1 or <0 is straightforward to add back.
>1 might already work as-is.

Getting close to _u16 performance:
    micros    bench
    261.13   xferu64_bw_1_opaque_u16
   1833.51   xferu64_bw_1_alpha_u16
   2762.32 ? xferu64_aa_1_opaque_u16
   3334.29   xferu64_aa_1_alpha_u16
    249.78   xferu64_bw_1_opaque_f16
   3383.18   xferu64_bw_1_alpha_f16
   4214.72   xferu64_aa_1_opaque_f16
   4701.19   xferu64_aa_1_alpha_f16

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685133005

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

8 years agoMove surface props off of GrTextContext
joshualitt [Thu, 11 Feb 2016 13:42:30 +0000 (05:42 -0800)]
Move surface props off of GrTextContext

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685653004

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

8 years agoskia: Add support for CHROMIUM_image backed textures.
erikchen [Thu, 11 Feb 2016 00:32:34 +0000 (16:32 -0800)]
skia: Add support for CHROMIUM_image backed textures.

I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

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

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

8 years agoAdd bench and gm for shapes
cdalton [Wed, 10 Feb 2016 22:54:21 +0000 (14:54 -0800)]
Add bench and gm for shapes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1677253002

patch from issue 1686673002 at patchset 20001 (http://crrev.com/1686673002#ps20001)

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

8 years agoskiaserve: Fix /cmd/N and /cmd/N[0|1], the response was never queued.
jcgregorio [Wed, 10 Feb 2016 22:10:37 +0000 (14:10 -0800)]
skiaserve: Fix /cmd/N and /cmd/N[0|1], the response was never queued.

BUG=skia:
R=joshualitt@google.com, ethannicholas@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686553006

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

8 years agoadded JSON support for various lesser-used features
ethannicholas [Wed, 10 Feb 2016 22:05:02 +0000 (14:05 -0800)]
added JSON support for various lesser-used features
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1690613002

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

8 years agoMore efficient Jpeg skipScanlines for older versions of libjpeg-turbo
msarett [Wed, 10 Feb 2016 21:49:36 +0000 (13:49 -0800)]
More efficient Jpeg skipScanlines for older versions of libjpeg-turbo

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683283002

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

8 years agoFix bug processing bmp bit masks
msarett [Wed, 10 Feb 2016 21:40:10 +0000 (13:40 -0800)]
Fix bug processing bmp bit masks

BUG=skia:4866
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1688003002

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

8 years agoadded SkDebugCanvas::toJSON
ethannicholas [Wed, 10 Feb 2016 20:57:30 +0000 (12:57 -0800)]
added SkDebugCanvas::toJSON
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684233002

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

8 years agoDocumentation for accessing the different repositories of SKPs
rmistry [Wed, 10 Feb 2016 20:55:06 +0000 (12:55 -0800)]
Documentation for accessing the different repositories of SKPs

BUG=skia:2306
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683233002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1683233002

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

8 years agoStart whittling down GrTextContext
joshualitt [Wed, 10 Feb 2016 20:52:21 +0000 (12:52 -0800)]
Start whittling down GrTextContext

TBR=
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684733005

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

8 years agoadded some missing static modifiers
ethannicholas [Wed, 10 Feb 2016 20:10:00 +0000 (12:10 -0800)]
added some missing static modifiers
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1690683002

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

8 years agoRemove GrTextBlobCache/GrAtlasTextBlob friendliness
joshualitt [Wed, 10 Feb 2016 19:55:52 +0000 (11:55 -0800)]
Remove GrTextBlobCache/GrAtlasTextBlob friendliness

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686113002

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

8 years agodisable flaky gm for now
reed [Wed, 10 Feb 2016 19:36:06 +0000 (11:36 -0800)]
disable flaky gm for now

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689653002

TBR=

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

8 years agoRevert of Make SkPicture/SkImageGenerator default to SkCodec (patchset #7 id:120001...
kjlubick [Wed, 10 Feb 2016 19:25:07 +0000 (11:25 -0800)]
Revert of Make SkPicture/SkImageGenerator default to SkCodec (patchset #7 id:120001 of https://codereview.chromium.org/1671193002/ )

Reason for revert:
Breaks Ubuntu and Mac CMAKE

Original issue's description:
> Make SkPicture/SkImageGenerator default to SkCodec
>
> Remove reference to SkImageDecoder from SkPicture. Make the default
> InstallPixelRefProc passed to CreateFromStream use
> SkImageGenerator::NewFromEncoded instead.
>
> Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
> Remove the old version that used SkImageDecoder.
>
> Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
> now behaves lazily.
>
> Update all clients to use the default.
>
> Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.
>
> BUG=skia:4691
> BUG=skia:4290
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002
>
> Committed: https://skia.googlesource.com/skia/+/026388a01864c74208ad57d1ba4f711602d101c6

TBR=msarett@google.com,reed@google.com,scroggo@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4691

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

8 years agoMake SkPicture/SkImageGenerator default to SkCodec
scroggo [Wed, 10 Feb 2016 19:15:21 +0000 (11:15 -0800)]
Make SkPicture/SkImageGenerator default to SkCodec

Remove reference to SkImageDecoder from SkPicture. Make the default
InstallPixelRefProc passed to CreateFromStream use
SkImageGenerator::NewFromEncoded instead.

Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
Remove the old version that used SkImageDecoder.

Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
now behaves lazily.

Update all clients to use the default.

Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.

BUG=skia:4691
BUG=skia:4290
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002

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

8 years agoTurn on conservative raster clip for GPU canvases
bsalomon [Wed, 10 Feb 2016 18:41:01 +0000 (10:41 -0800)]
Turn on conservative raster clip for GPU canvases
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1682223002

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

8 years agoFinalize gpu shaders in ProgramBuilding.
egdaniel [Wed, 10 Feb 2016 17:50:38 +0000 (09:50 -0800)]
Finalize gpu shaders in ProgramBuilding.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689703002

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

8 years agoFix for mips build
joshualitt [Wed, 10 Feb 2016 17:47:28 +0000 (09:47 -0800)]
Fix for mips build

TBR=scroggo@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1688823002

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

8 years agomove compose-shader into base-class as factory
reed [Wed, 10 Feb 2016 16:53:15 +0000 (08:53 -0800)]
move compose-shader into base-class as factory

next steps:
1. this lands
2. update android to call the new factory
3. move SkComposeShader.h into private

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686803003

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

8 years agocleanup textblob cache sanity check and prevent it from bitrotting
joshualitt [Wed, 10 Feb 2016 16:52:24 +0000 (08:52 -0800)]
cleanup textblob cache sanity check and prevent it from bitrotting

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684513004

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

8 years agoClean up comments in SkSwizzler
msarett [Wed, 10 Feb 2016 16:39:37 +0000 (08:39 -0800)]
Clean up comments in SkSwizzler

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1690583002

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

8 years agoSk4f: floor() via int32_t roundtrip.
mtklein [Wed, 10 Feb 2016 15:55:56 +0000 (07:55 -0800)]
Sk4f: floor() via int32_t roundtrip.

About 25% faster on both x86 and ARMv7.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1682953002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoEnable ImageGenerator tests on direct raster and direct gpu backends
msarett [Wed, 10 Feb 2016 14:48:21 +0000 (06:48 -0800)]
Enable ImageGenerator tests on direct raster and direct gpu backends

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1682973004

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

8 years agoMoved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas.
ethannicholas [Wed, 10 Feb 2016 13:40:46 +0000 (05:40 -0800)]
Moved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas.
SkJSONCanvas and SkJSONRenderer will be deleted once the debug server
has been updated.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1681643002

Committed: https://skia.googlesource.com/skia/+/32fff1ba0c759d97ab78320b7ae46dd7696a4e6e

Committed: https://skia.googlesource.com/skia/+/46cb6d6b82b0ab71033aef91419e8beae25bb8a4

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

8 years agoRevert of Moved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas. ...
caryclark [Wed, 10 Feb 2016 12:34:08 +0000 (04:34 -0800)]
Revert of Moved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas. (patchset #3 id:40001 of https://codereview.chromium.org/1681643002/ )

Reason for revert:
breaks various android builds, e.g.

https://android-build.storage.googleapis.com/builds/git_master-skia-linux-bullhead-userdebug/2596406/acb02999d48ace628601452700d4b4f8dcd5ed71b426e6ecdb1c7f5bc5452f7b/logs/build_error.log?Signature=BkLEdMOdi0LelP0v939QECdTZzznSD2dLFIkPu52E7%2BPr5Oj1ktq5nNlxGZn%2F4ZhCKXAw2%2FNHxy27nNJ8lffcgXn7PhQpa82bP%2B8F%2Bbyo9j%2BT%2B3etmOdQFEejJSRsEv2RrVWtKsKYRX%2FuZinrF9yD37jUpSbKNZvmvIbKa4V4IQ%3D&GoogleAccessId=701025073339-mqn0q2nvir9iurm6q5d00tdv7blbgvjr%40developer.gserviceaccount.com&Expires=1455108483

external/skia/bench/../tools/debugger/SkDrawCommand.cpp:602:9: error: use of undeclared identifier 'free'
        free(data);

Original issue's description:
> Moved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas.
> SkJSONCanvas and SkJSONRenderer will be deleted once the debug server
> has been updated.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1681643002
>
> Committed: https://skia.googlesource.com/skia/+/32fff1ba0c759d97ab78320b7ae46dd7696a4e6e
>
> Committed: https://skia.googlesource.com/skia/+/46cb6d6b82b0ab71033aef91419e8beae25bb8a4

TBR=jcgregorio@google.com,joshualitt@chromium.org,ethannicholas@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoRevert of skia: Add support for CHROMIUM_image backed textures. (patchset #19 id...
caryclark [Wed, 10 Feb 2016 00:28:46 +0000 (16:28 -0800)]
Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #19 id:380001 of https://codereview.chromium.org/1623653002/ )

Reason for revert:
Breaks ASAN bot:

Direct leak of 56 byte(s) in 1 object(s) allocated from:
...
test_CustomTexture

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/2676/steps/dm/logs/stdio

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55
>
> Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b
>
> Committed: https://skia.googlesource.com/skia/+/b8d6e088590160f1198110c2371b802c1d541a36

TBR=bsalomon@chromium.org,cblume@chromium.org,bsalomon@google.com,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

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

8 years agoturn off debug svg file
caryclark [Wed, 10 Feb 2016 00:02:58 +0000 (16:02 -0800)]
turn off debug svg file

TBR=fmalita@chromium.org
BUG=skia:4549
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1674303004

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

8 years agoSk4f: add floor()
mtklein [Tue, 9 Feb 2016 23:41:36 +0000 (15:41 -0800)]
Sk4f: add floor()

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685773002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/86c6c4935171a1d2d6a9ffbff37ec6dac1326614

CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release-Trybot,Test-Android-GCC-Nexus9-GPU-TegraK1-Arm64-Release-Trybot

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

8 years agoRevert of Sk4f: add floor() (patchset #3 id:40001 of https://codereview.chromium...
mtklein [Tue, 9 Feb 2016 23:10:56 +0000 (15:10 -0800)]
Revert of Sk4f: add floor() (patchset #3 id:40001 of https://codereview.chromium.org/1685773002/ )

Reason for revert:
build break must be this, right?

Original issue's description:
> Sk4f: add floor()
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685773002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/86c6c4935171a1d2d6a9ffbff37ec6dac1326614

TBR=herb@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoMoved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas.
ethannicholas [Tue, 9 Feb 2016 22:37:55 +0000 (14:37 -0800)]
Moved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas.
SkJSONCanvas and SkJSONRenderer will be deleted once the debug server
has been updated.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1681643002

Committed: https://skia.googlesource.com/skia/+/32fff1ba0c759d97ab78320b7ae46dd7696a4e6e

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

8 years agomake test consistent
caryclark [Tue, 9 Feb 2016 22:32:42 +0000 (14:32 -0800)]
make test consistent

Don't pass rand() to a function as a pair of
parameters, since the order of evaluation
is unknown

TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1682203002

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

8 years agoSk4f: add floor()
mtklein [Tue, 9 Feb 2016 21:46:49 +0000 (13:46 -0800)]
Sk4f: add floor()

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685773002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoskia: Add support for CHROMIUM_image backed textures.
erikchen [Tue, 9 Feb 2016 21:30:55 +0000 (13:30 -0800)]
skia: Add support for CHROMIUM_image backed textures.

I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

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

8 years agoadd drawCircle to c api
reed [Tue, 9 Feb 2016 21:25:51 +0000 (13:25 -0800)]
add drawCircle to c api

BUG=skia:4927
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684763002

TBR=

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

8 years agoadd helper to create fancy underlines
caryclark [Tue, 9 Feb 2016 21:25:45 +0000 (13:25 -0800)]
add helper to create fancy underlines

Add a couple of utility functions to SkPaint that return the bounds
of glyphs between a pair of lines.

The common use case envisioned generates the edges of descenders
between the top and bottom bounds of an underline to allow computing
a stroke that skips those descenders.

The implementation stores a linked list in each glyph containing
the bounds of the lines parallel to the advance and the outermost
intersections within those bounds.

When the glyph cache is constructed, the glyph path is intersected
with the bounds and the extreme min and max values within the bounds
is added to an intercept.

Share the text to path iter to construct the data.

Make a half-hearted attempt to support vertical text; while the
vertical implementation is complete; surrounding code (e.g. paint
align) has short-comings with vertical.

R=fmalita@chromium.org, reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1654883003

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

8 years agomoved debugger support files from src/utils/debugger to tools/debugger
ethannicholas [Tue, 9 Feb 2016 20:44:06 +0000 (12:44 -0800)]
moved debugger support files from src/utils/debugger to tools/debugger
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1678893003

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

8 years agoDisable indirect backends for image decode tests
msarett [Tue, 9 Feb 2016 20:39:17 +0000 (12:39 -0800)]
Disable indirect backends for image decode tests

BUG=skia:4924
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684713002

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

8 years agoupdate DM deps in g3 build
mtklein [Tue, 9 Feb 2016 20:32:52 +0000 (12:32 -0800)]
update DM deps in g3 build

Added https://skia.googlesource.com/skia/+/f1d415188ffb4c34e2886c2cfceb363a148333f1

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683803002

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

8 years agoimplement more xfermodeproc4f and add GM
reed [Tue, 9 Feb 2016 19:59:24 +0000 (11:59 -0800)]
implement more xfermodeproc4f and add GM

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1677293004

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

8 years agoRemove SkNEW_APPEND_TO_TARRAY.
bungeman [Tue, 9 Feb 2016 19:32:56 +0000 (11:32 -0800)]
Remove SkNEW_APPEND_TO_TARRAY.

The use of SkNEW_APPEND_TO_TARRAY is now better served by
SkTArray::emplace_back(...) which should now be used instead. The
existing users of SkNEW_APPEND_TO_TARRAY are converted and the code
relating to SkNEW_APPEND_TO_TARRAY is removed.

TBR=reed
This only removes code. The file should also be made private.

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

8 years agorestore sk4i SSE specialization
mtklein [Tue, 9 Feb 2016 19:32:51 +0000 (11:32 -0800)]
restore sk4i SSE specialization

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1679343003
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoSlim down Sk4fRoundtrip benches.
mtklein [Tue, 9 Feb 2016 19:03:40 +0000 (11:03 -0800)]
Slim down Sk4fRoundtrip benches.

Looks like the conversions are complicated enough to not compile away.
No need to mess with random number generation, etc.
We still need to blackhole it into a volatile in the end.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1682793002

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

8 years agosknx refactoring
mtklein [Tue, 9 Feb 2016 18:35:27 +0000 (10:35 -0800)]
sknx refactoring

  - trim unused specializations (Sk4i, Sk2d) and apis (SkNx_dup)
  - expand apis a little
    * v[0] == v.kth<0>()
    * SkNx_shuffle can now convert to different-sized vectors, e.g. Sk2f <-> Sk4f
  - remove anonymous namespace

I believe it's safe to remove the anonymous namespace right now.
We're worried about violating the One Definition Rule; the anonymous namespace protected us from that.

In Release builds, this is mostly moot, as everything tends to inline completely.
In Debug builds, violating the ODR is at worst an inconvenience, time spent trying to figure out why the bot is broken.

Now that we're building with SSE2/NEON everywhere, very few bots have even a chance about getting confused by two definitions of the same type or function.  Where we do compile variants depending on, e.g., SSSE3, we do so in static inline functions.  These are not subject to the ODR.

I plan to follow up with a tedious .kth<...>() -> [...] auto-replace.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683543002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoAdd unit test to feed valid SVG sequences to make sure that
caryclark [Tue, 9 Feb 2016 18:30:22 +0000 (10:30 -0800)]
Add unit test to feed valid SVG sequences to make sure that
path strings can be parsed without returning an error.

Draw the output through Skia and SVG to make sure they are
parsed correctly.

R=fmalita@chromium.org
BUG=skia:4549
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1675053002

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

8 years agoShot in the dark to fix 581472
joshualitt [Tue, 9 Feb 2016 18:09:55 +0000 (10:09 -0800)]
Shot in the dark to fix 581472

BUG=581472
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1679743005

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

8 years agoAdd some backend flexibility for shader declarations in ProgramBuilding.
egdaniel [Tue, 9 Feb 2016 17:54:43 +0000 (09:54 -0800)]
Add some backend flexibility for shader declarations in ProgramBuilding.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1682703003

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

8 years agostart experimenting with 64bit frame-buffers
reed [Tue, 9 Feb 2016 17:14:59 +0000 (09:14 -0800)]
start experimenting with 64bit frame-buffers

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1680523002

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

8 years agoSkTArray to move when moving.
bungeman [Tue, 9 Feb 2016 17:14:28 +0000 (09:14 -0800)]
SkTArray to move when moving.

This updates SkTArray to move elements when possible, instead of always
copying them.

TBR=reed
Agreed moving is good. This should also become private.

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

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

8 years agoUse skstd::remove_pointer_t in GrGLFunction
bsalomon [Tue, 9 Feb 2016 16:28:54 +0000 (08:28 -0800)]
Use skstd::remove_pointer_t in GrGLFunction
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684513003

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

8 years agoRelocate anisotropic mipmap logic to SkMipMap::extractLevel()
fmalita [Tue, 9 Feb 2016 16:20:18 +0000 (08:20 -0800)]
Relocate anisotropic mipmap logic to SkMipMap::extractLevel()

Pass a full x/y scale and defer the anisotropic heuristic to SkMipMap.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686563002

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

8 years agoskeleton for float <-> half optimized procs
mtklein [Tue, 9 Feb 2016 16:18:10 +0000 (08:18 -0800)]
skeleton for float <-> half optimized procs

Nothing fancy yet, just calls the serial code in a loop.

I will try to folow this up with at least some of:
   - SSE2 version of serial code
   - NEON version of serial code
   - NEON version using vcvt.f32.f16/vcvt.f16.f32
   - F16C (between AVX and AVX2) version using vcvtph2ps/vcvtps2ph
The last two are fastest but need runtime detection.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686543003

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

8 years agoUse min scale when selecting mip level
fmalita [Tue, 9 Feb 2016 15:41:48 +0000 (07:41 -0800)]
Use min scale when selecting mip level

R=reed@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1681953004

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

8 years agoCreate a thermal manager class and wire it in to nanobench behind a flag
joshualitt [Tue, 9 Feb 2016 15:18:08 +0000 (07:18 -0800)]
Create a thermal manager class and wire it in to nanobench behind a flag

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671573002

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

8 years agoRevert of SkTArray to move when moving. (patchset #3 id:40001 of https://codereview...
mtklein [Tue, 9 Feb 2016 13:14:04 +0000 (05:14 -0800)]
Revert of SkTArray to move when moving. (patchset #3 id:40001 of https://codereview.chromium.org/1672063002/ )

Reason for revert:
Broke the Chrome roll:

https://codereview.chromium.org/1680563005

Original issue's description:
> SkTArray to move when moving.
>
> This updates SkTArray to move elements when possible, instead of always
> copying them.
>
> TBR=reed
> Agreed moving is good. This should also become private.
>
> Committed: https://skia.googlesource.com/skia/+/3c69348e725131150e4ab962dec1b3ff1148a6bd

TBR=reed@google.com,bungeman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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