Commit Graph

23358 Commits

Author SHA1 Message Date
mtklein
091cb8d72d Delete SkARGBImageEncoder.
It appears to be unused now except by its unit test, also deleted.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2208433002

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

Review-Url: https://codereview.chromium.org/2208433002
2016-08-02 12:57:33 -07:00
mtklein
757a15fa2e not much point to SK_SUPPORT_PDF
It only controls a few minor things in testing tools,
which can always assume PDF support is present.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202203003

Review-Url: https://codereview.chromium.org/2202203003
2016-08-02 12:20:36 -07:00
msarett
15ee3deee8 Refactor of SkColorSpaceXformOpts
(1) Performance is better or stays the same.

(2) Code is split into functions (RasterPipeline-ish
    design).  IMO, it's not really more or less readable.
    But I think it's now much easier add capabilities,
    apply optimizations, or do more refactors.  Or to
    actually use RasterPipeline.  I help back from trying
    any of these to try to keep this CL sane.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2194303002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2194303002
2016-08-02 11:30:30 -07:00
bungeman
b605f89398 Remove now unused source files.
These files have been renamed and exist only as stubs for transition
reasons. Remove these now unused stubs.

CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/2197423003
2016-08-02 11:18:48 -07:00
mtklein
5dbd274846 gn: fix fiddle
- __SK_FORCE_IMAGE_DECODER_LINKING makes sure the PNG encoder is linked
  - updated path to make working with sample draw.cpp easier.

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

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202353002

Review-Url: https://codereview.chromium.org/2202353002
2016-08-02 11:13:49 -07:00
bungeman
b1dd067128 Remove 'Ulta' width.
All users of this old name appear to be updated.

TBR=reed
Removing unused and mis-spelled API.

Review-Url: https://codereview.chromium.org/2206453003
2016-08-02 10:43:29 -07:00
hstern
02aea1c92c Add Overstroke gm
Already exists as a sampleapp, but sampleapps don't get tested
automatically

BUG=skia:5405,5406,chrome:589769
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2161633002

Review-Url: https://codereview.chromium.org/2161633002
2016-08-02 10:35:57 -07:00
hstern
0b401ce663 Add code to lua paths to get the fill path and get lists of verbs and
points

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199823002

Review-Url: https://codereview.chromium.org/2199823002
2016-08-02 09:17:59 -07:00
borenet
86baf3d8de Fix build_command_buffer for Windows
BUG=skia:5597
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2207563002

Review-Url: https://codereview.chromium.org/2207563002
2016-08-02 08:37:50 -07:00
msarett
c573a40ed5 Add drawImageLattice() and drawBitmapLattice() APIs
The specified image/bitmap is divided into rects, which
can be draw stretched, shrunk, or at a fixed size.  Will be
used by Android to draw 9patch (which are acutally N-patch)
images.

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

Review-Url: https://codereview.chromium.org/1992283002
2016-08-02 08:05:56 -07:00
bungeman
7d0e3bc785 Rename FontConfigInterface font manager files.
These files are now so badly misnamed that it is causing problems.
The original files are kept as shells until Chromium and PDFium can
be updated. After Chromium and PDFium builds are updated, the old
files will be removed and the cmake and bzl builds will be updated.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199973002
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/2199973002
2016-08-02 07:07:33 -07:00
borenet
b6aafe66a0 Fix Chrome build for RecreateSKPs and CommandBuffer bots for GYP->GN
BUG=skia:5597
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199273002

Review-Url: https://codereview.chromium.org/2199273002
2016-08-02 07:02:52 -07:00
borenet
ed696276fd More fixes for SwarmBucket
BUG=skia:5581
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202053005
NOTRY=true

Review-Url: https://codereview.chromium.org/2202053005
2016-08-02 06:50:50 -07:00
reed
320a40d773 Always return ImageShader, even from SkShader::MakeBitmapShader
Lessons learned

1. ImageShader (correctly) always compresses (typically via PNG) during serialization. This has the surprise results of
- if the image was marked opaque, but has some non-opaque pixels (i.e. bug in blitter or caller), then compressing may "fix" those pixels, making the deserialized version draw differently. bug filed.
- 565 compressess/decompresses to 8888 (at least on Mac), which draws differently (esp. under some filters). bug filed.

2. BitmapShader did not enforce a copy for mutable bitmaps, but ImageShader does (since it creates an Image). Thus the former would see subsequent changes to the pixels after shader creation, while the latter does not, hence the change to the BlitRow test to avoid this modify-after-create pattern. I sure hope this prev. behavior was a bug/undefined-behavior, since this CL changes that.

BUG=skia:5595
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2195893002

Review-Url: https://codereview.chromium.org/2195893002
2016-08-02 06:12:06 -07:00
borenet
d6dd44140d Roll recipe DEPS
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2205863002

Review-Url: https://codereview.chromium.org/2205863002
2016-08-02 05:11:16 -07:00
mtklein
7c1ae7af4f GN: add some missing SkCodec defines
TURBO_HAS_...
    WEBP_SWAP_16BIT_CSP

BUG=skia:5591
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196413003

Review-Url: https://codereview.chromium.org/2196413003
2016-08-01 15:50:27 -07:00
msarett
6fd4c05aaf Fix SkJpegCodec::onSkipScanlines when TURBO_HAS_SKIP is not defined
I think I just broke this in:
https://codereview.chromium.org/2174493002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202763002

Review-Url: https://codereview.chromium.org/2202763002
2016-08-01 15:08:03 -07:00
msarett
c213f0df22 Hide (mostly) unused SkColorSpace writeToICC() function
This originally was intended to be used for serialization, but
we've chosen another approach.

Includes a revert of:
https://codereview.chromium.org/2012133003/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193223002

Review-Url: https://codereview.chromium.org/2193223002
2016-08-01 14:23:32 -07:00
mtklein
1bb5fecbea Sketch SkPictureRecorder::optimizeFor(GrContext*).
I'm open to API suggestions.
We can pass this in finishAs(), up front, whatever.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2203453002

Review-Url: https://codereview.chromium.org/2203453002
2016-08-01 13:17:47 -07:00
mtklein
7a34b1cd02 GN: use the correct fontconfig font mugger.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202733002

Review-Url: https://codereview.chromium.org/2202733002
2016-08-01 13:08:46 -07:00
bungeman
d783e08004 Replace 'Ulta' with 'Ultra'.
Start fixing a typo in an enum name.

TBR=reed
This is just a typo fix.

Review-Url: https://codereview.chromium.org/2202703002
2016-08-01 12:37:13 -07:00
herb
35f3e59d1c Pick the right download tool for windows.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197423002

Review-Url: https://codereview.chromium.org/2197423002
2016-08-01 12:26:51 -07:00
dvonbeck
68f2f7dc42 Added distance vector support for CircleGeometryProcessor
This CL's base is the CL that sets up the distance vector field req. exposure: https://codereview.chromium.org/2114993002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190023002

Committed: https://skia.googlesource.com/skia/+/779e1924eaf7c5652dee93e0e8e975bbf5723b37
Review-Url: https://codereview.chromium.org/2190023002
2016-08-01 11:37:45 -07:00
reed
f1ac18229c implement isABitmap for imageshader, return localmatrix for bitmap's impl
For imageshader, I only return true if the image is explicitly raster-backed. I do not return true for texture, nor for generator (i.e. lazy/picture) backed. Is that ok?

BUG=skia:5592
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197323002

Review-Url: https://codereview.chromium.org/2197323002
2016-08-01 11:24:14 -07:00
mtklein
da574d17f8 Replace old SkRecords RefBox with sk_sp.
The main differences are that RefBox's constructor reffed and sk_sp's doesn't,
and that RefBox auto-casts to the underlying pointer while sk_sp doesn't.

I've added a bunch of sk_ref_sp() and .get() to compensate.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197243003

Review-Url: https://codereview.chromium.org/2197243003
2016-08-01 11:24:03 -07:00
reed
2dad769dc9 make an image from a mutable bitmap
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199813002

Review-Url: https://codereview.chromium.org/2199813002
2016-08-01 11:12:58 -07:00
dvonbeck
9b03e7b29d GrFP can express distance vector field req., program builder declares variable for it
This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates:

- from child FPs to their parent
- from parent FPs to the GrPaint
- from GrPaint through the PipelineBuilder into GrPipeline
- acessed from GrPipeline by GrGLSLProgramBuilder

GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method.

This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002

Committed: https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196
Review-Url: https://codereview.chromium.org/2114993002
2016-08-01 11:01:56 -07:00
mtklein
6be452c800 GN: only include headers in echo_headers.py
This keeps things like VIM .swp files out of skia.h.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202643002

Review-Url: https://codereview.chromium.org/2202643002
2016-08-01 10:39:10 -07:00
vjiaoblack
53da5ba619 adding new GM to demostrate new shadows
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2118553002

Review-Url: https://codereview.chromium.org/2118553002
2016-08-01 10:02:31 -07:00
msarett
abbd6d5e02 Add SkColorSpace::Equals() API
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196743002

Review-Url: https://codereview.chromium.org/2196743002
2016-08-01 09:43:08 -07:00
mtklein
8d7f5c3f29 Default fake gamma to sRGB.
No one appears to be using the default 2.2.
This makes SK_GAMMA_SRGB the default / a no-op, which seems more realistic.

Chrome's explicitly setting SK_GAMMA_EXPONENT or SK_GAMMA_SRGB.
We set Android platform explicitly to 1.4.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2198073002

Review-Url: https://codereview.chromium.org/2198073002
2016-08-01 09:22:12 -07:00
mtklein
9be6866e95 GN: define fake-gamma configuration to match our bots.
This should fix many of the GN text diffs in Gold.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2195393002

Review-Url: https://codereview.chromium.org/2195393002
2016-08-01 08:37:48 -07:00
mtklein
150d113db5 GN: Define SK_HAS_... in all Skia-private code, not just libskia.
SkForceLinking wasn't force-linking the WEBP encoder, or any encoder.
(The others must be explicitly used.)

This should help the GN Debug Perf bots progress past

    Running Encode_color_wheel.jpg_WEBP nonrendering
    ../../../bench/EncoderBench.cpp:58: fatal error: "assert(data)"

On my laptop, a debug nanobench run now finishes.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196243002

Review-Url: https://codereview.chromium.org/2196243002
2016-08-01 06:56:41 -07:00
robertphillips
12e9662cf7 Remove some ancillary users of SkSurface::MakeRenderTargetDirect
calved off of: https://codereview.chromium.org/2176333002/ (Remove SkSurface::MakeRenderTargetDirect)

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2198433003

Review-Url: https://codereview.chromium.org/2198433003
2016-08-01 05:53:23 -07:00
borenet
f5b675efbe Stop running nanobench on Test.*Debug bots
We'll need to add Perf.*Debug bots to achieve the same coverage.

BUG=skia:4768
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2189393002
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2189393002
2016-08-01 05:08:52 -07:00
mtklein
02aed95f9c Revert of GrFP can express distance vector field req., program builder declares variable for it (patchset #20 id:370001 of https://codereview.chromium.org/2114993002/ )
Reason for revert:
UBSAN says we're reading a bad bool here:
bool usesDistanceVectorField() const { return fUsesDistanceVectorField; }

../../../include/gpu/GrPaint.h:83:51: runtime error: load of value 239, which is not a valid value for type 'bool'
SUMMARY: AddressSanitizer: undefined-behavior ../../../include/gpu/GrPaint.h:83:51 in

Seems likely also the root of Valgrind failure:
https://luci-milo.appspot.com/swarming/task/30522e4f2241cb10

Original issue's description:
> GrFP can express distance vector field req.,  program builder declares variable for it
>
> This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates:
>
> - from child FPs to their parent
> - from parent FPs to the GrPaint
> - from GrPaint through the PipelineBuilder into GrPipeline
> - acessed from GrPipeline by GrGLSLProgramBuilder
>
> GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method.
>
> This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002
>
> Committed: https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196

TBR=egdaniel@google.com,robertphillips@google.com,bsalomon@google.com,dvonbeck@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review-Url: https://codereview.chromium.org/2201613002
2016-07-30 14:21:10 -07:00
mtklein
7c0db75f40 Revert of Tidy up SkNx_neon. (patchset #3 id:40001 of https://codereview.chromium.org/2196773002/ )
Reason for revert:
https://luci-milo.appspot.com/swarming/task/3055149a25621b10

Not Nexus 5 specific.   Reproduces on Pixel C with --gcc -t Debug -d arm_v7_neon.  Not sure about other configs yet.

Original issue's description:
> Tidy up SkNx_neon.
>
> This takes advantage of the fact that all the compilers we use that
> support NEON implement it with their own vector extensions.  This means
> normal things like c = a + b work on the underlying vector types already.
> Odd instructions like min or saturated add need to stay intrinsics.
>
> Also, rearrange functions to a more consistent order.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196773002
> CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/6ad22315eb6eacfcd35497cd118440a619d05b18

TBR=msarett@google.com,mtklein@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review-Url: https://codereview.chromium.org/2196953002
2016-07-30 14:18:49 -07:00
mtklein
570f8af473 Revert of Added distance vector support for CircleGeometryProcessor (patchset #4 id:60001 of https://codereview.chromium.org/2190023002/ )
Reason for revert:
Reverting so I can revert https://codereview.chromium.org/2114993002/

Original issue's description:
> Added distance vector support for CircleGeometryProcessor
>
> This CL's base is the CL that sets up the distance vector field req. exposure: https://codereview.chromium.org/2114993002/
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190023002
>
> Committed: https://skia.googlesource.com/skia/+/779e1924eaf7c5652dee93e0e8e975bbf5723b37

TBR=egdaniel@google.com,robertphillips@google.com,dvonbeck@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review-Url: https://codereview.chromium.org/2196053002
2016-07-30 13:31:53 -07:00
mtklein
73106225d1 Docs: ooops, debug is the default in GN.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2195173002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2195173002

TBR=jcgregorio@google.com

Review-Url: https://codereview.chromium.org/2195173002
2016-07-30 07:50:15 -07:00
mtklein
fe2042e60f SkRasterPipeline: new APIs for fusion
Most visibly this adds a macro SK_RASTER_STAGE that cuts down on the boilerplate of defining a raster pipeline stage function.

Most interestingly, SK_RASTER_STAGE doesn't define a SkRasterPipeline::Fn, but rather a new type EasyFn.  This function is always static and inlined, and the details of interacting with the SkRasterPipeline::Stage are taken care of for you: ctx is just passed as a void*, and st->next() is always called.  All EasyFns have to do is take care of the meat of the work: update r,g,b, etc. and read and write from their context.

The really neat new feature here is that you can either add EasyFns to a pipeline with the new append() functions, _or_ call them directly yourself.  This lets you use the same set of pieces to build either a pipelined version of the function or a custom, fused version.  The bench shows this off.

On my desktop, the pipeline version of the bench takes about 25% more time to run than the fused one.

The old approach to creating stages still works fine.  I haven't updated SkXfermode.cpp or SkArithmeticMode.cpp because they seemed just as clear using Fn directly as they would have using EasyFn.

If this looks okay to you I will rework the comments in SkRasterPipeline to explain SK_RASTER_STAGE and EasyFn a bit as I've done here in the CL description.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2195853002

Review-Url: https://codereview.chromium.org/2195853002
2016-07-29 14:27:41 -07:00
mtklein
79b59e6a38 simplify neon shifts
These still generate vshr/vshl with immediates with both GCC and Clang.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2194953002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Based on https://codereview.chromium.org/2196773002

Review-Url: https://codereview.chromium.org/2194953002
2016-07-29 12:28:44 -07:00
bsalomon
6d9a213694 If scissor would be empty in GrClipMaskManager::SetupClipping indicate draw can be skipped.
BUG=chromium:632185
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196803002

Review-Url: https://codereview.chromium.org/2196803002
2016-07-29 12:24:29 -07:00
csmartdalton
4c18b62a00 Add ES 3.0 fallback for instanced rendering
Adds the ability for GLInstancedRendering to use
glDrawElementsInstanced when glDrawElementsIndirect is not supported.

The only remaining 3.1 dependency now is EXT_texture_buffer.

Also moves the cap for glDraw*Instanced out of GrCaps and into
GrGLCaps.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193303002

Review-Url: https://codereview.chromium.org/2193303002
2016-07-29 12:19:28 -07:00
egdaniel
848904e5b3 Fix vulkan build
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193883002

Review-Url: https://codereview.chromium.org/2193883002
2016-07-29 11:47:58 -07:00
dvonbeck
779e1924ea Added distance vector support for CircleGeometryProcessor
This CL's base is the CL that sets up the distance vector field req. exposure: https://codereview.chromium.org/2114993002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190023002

Review-Url: https://codereview.chromium.org/2190023002
2016-07-29 11:11:51 -07:00
mtklein
6ad22315eb Tidy up SkNx_neon.
This takes advantage of the fact that all the compilers we use that
support NEON implement it with their own vector extensions.  This means
normal things like c = a + b work on the underlying vector types already.
Odd instructions like min or saturated add need to stay intrinsics.

Also, rearrange functions to a more consistent order.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196773002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2196773002
2016-07-29 11:11:12 -07:00
jcgregorio
01f696e30f perf: Upload results to gs://skia-perf, not gs://chromium-skia-gm.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197643002

Review-Url: https://codereview.chromium.org/2197643002
2016-07-29 10:54:30 -07:00
bungeman
aa8f39402c Conditionally define SK_SUPPORT_LEGACY_DATA_FACTORIES.
In order to remove this define it will first need to be defined in
Chromium. However, doing so causes redefinition warnings as errors.
Only define this macro if it is not already defined to avoid this.

TBR=reed
This doesn't change any API.

Review-Url: https://codereview.chromium.org/2198453002
2016-07-29 10:47:45 -07:00
egdaniel
31bc7df59b Properly recycle uniform buffers in vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2195713002

Review-Url: https://codereview.chromium.org/2195713002
2016-07-29 10:46:06 -07:00
mtklein
f6593a68d9 Add some GN builders to the CQ.
This parallels the set of bots we use to gate commits already.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2189283003

Review-Url: https://codereview.chromium.org/2189283003
2016-07-29 10:41:37 -07:00