Commit Graph

30380 Commits

Author SHA1 Message Date
Robert Phillips
d375dbf155 Land scaffolding for explicit MDB resource allocation
Change-Id: I1cb30b50068e99181788181683e82e2421d0038a
Reviewed-on: https://skia-review.googlesource.com/46701
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-14 18:42:51 +00:00
Brian Osman
d27392f8a4 Remove invalid SkRRect asserts in GrShape
Due to floating point math, it's possible to add a round-rect to a path,
then pull it back out and have the type change.

Bug: skia:7037
Change-Id: I071b77378da08b873ff9d68fdac2373370faa71c
Reviewed-on: https://skia-review.googlesource.com/46585
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-14 18:35:51 +00:00
angle-deps-roller@chromium.org
5bfd3c4838 Roll skia/third_party/externals/angle2/ 9dfa628df..9c6cfffec (1 commit)
9dfa628dfc..9c6cfffec6

$ git log 9dfa628df..9c6cfffec --date=short --no-merges --format='%ad %ae %s'
2017-09-13 cwallez dEQP GLES2: Add suppressions for Mac

Created with:
  roll-dep skia/third_party/externals/angle2


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE
TBR=stephana@google.com

Change-Id: I5d1d86f242d9d02539251ec9075caef8d3b8cf74
Reviewed-on: https://skia-review.googlesource.com/46663
Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org>
Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org>
2017-09-14 17:58:11 +00:00
Cary Clark
b20154499a make kPathRefGenIDBitCnt private
kPathRefGenIDBitCnt is used only by SkPath.cpp and SkPathRef.cpp.
Curiously, there's no existing private declarations shared by
SkPath and SkPathRef, so I added kPathRefGenIDBitCnt to
SkPathPriv.h as the go-between. If there's an existing convention
I overlooked, please let me know.

R=reed@google.com,djsollen@google.com
Bug: skia: 6898
Change-Id: I929d780c3b4a10e5cf78e7176a7516abf912508e
Reviewed-on: https://skia-review.googlesource.com/46560
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-14 17:32:41 +00:00
Cary Clark
7265ea32e5 remove need for command flags cast
TBR=mtklein@google.com
Bug: skia: 6898
Change-Id: I1c83fe67cbfb978f15ebcbb9081ac4d4a8f00e4a
Reviewed-on: https://skia-review.googlesource.com/46680
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-14 17:32:31 +00:00
angle-deps-roller@chromium.org
8ed7204968 Roll skia/third_party/externals/angle2/ da8e257cb..9dfa628df (1 commit)
da8e257cba..9dfa628dfc

$ git log da8e257cb..9dfa628df --date=short --no-merges --format='%ad %ae %s'
2017-09-08 jmadill Add RequestExtension to static link.

Created with:
  roll-dep skia/third_party/externals/angle2


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=stephana@google.com

Change-Id: I72002d4657504a237c8f63120419518276c25a70
Reviewed-on: https://skia-review.googlesource.com/46660
Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org>
Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org>
2017-09-14 16:47:21 +00:00
Robert Phillips
9d6c64f29a Make GrCopySurfaceOp participate in the GrOplist DAG
Change-Id: Ic72884c8447ad950a91a2afe9566dd5a92dd6f11
Reviewed-on: https://skia-review.googlesource.com/46582
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-14 16:12:21 +00:00
Cary Clark
d0530ba8f4 wip pixmap docs
wip pixmap docs

Docs-Preview: https://skia.org/?cl=42522
Bug: skia: 6898
Change-Id: I85947bc36ea057ed008b87d7bef2efa82d7c89ad
Reviewed-on: https://skia-review.googlesource.com/42522
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-14 16:05:21 +00:00
Yuqian Li
d29f0e7ccb Do not divide loops in PathBench
That breaks the assumption that the work is proportional to loops.
For example, loops = 5 and loops = 7 would result in the same count
if count = loops / 4.

Bug: skia:
Change-Id: Idae86d658cbfba8a7f49b983ed61a8b7fbea007a
Reviewed-on: https://skia-review.googlesource.com/46600
Commit-Queue: Yuqian Li <liyuqian@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-09-14 15:09:51 +00:00
Cary Clark
ed294b4e00 name SkPixmap missing params
a couple of missing names
trip up bookmaker

TBR=reed@google.com
Bug: skia: 6898
Change-Id: I224f3a0422474cb6d4d3558abb3e800d5abedd12
Reviewed-on: https://skia-review.googlesource.com/46580
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-09-14 14:58:51 +00:00
Ben Wagner
2388c5216b Remove redundant jobs.
Replacements added in:
https://skia-review.googlesource.com/c/skia/+/26365
https://skia-review.googlesource.com/c/skia/+/31143

Bug: skia:6881
No-Try: true
Change-Id: I35a212f55b9f2cd1240f2f072321ee118a3feecc
Reviewed-on: https://skia-review.googlesource.com/46306
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-09-14 14:02:31 +00:00
Mike Klein
f419c44193 fix android roll
Guarding loads of 8-15 with defined(__AVX2__) should prevent errors
like these:

    external/skia/src/jumper/SkJumper_stages_lowp.cpp:287:46: error:
    'memcpy' called with size bigger than buffer
            case 12: memcpy(&v, ptr, 12*sizeof(T)); break;

The loads of 8-15 were of course unreachable, given the &(N-1) == &7.

Change-Id: Ifcb5c177c6909e1df55cb564779a4d6610ff7b32
Reviewed-on: https://skia-review.googlesource.com/46521
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-14 13:44:42 +00:00
Robert Phillips
5f567c78dd Finish restoring GrOpList DAG
Change-Id: I2a674ce7442a444a78a53144279e88ba744eaf48
Reviewed-on: https://skia-review.googlesource.com/46462
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-14 13:02:31 +00:00
angle-deps-roller@chromium.org
177569b1fe Roll skia/third_party/externals/angle2/ 06ef36b98..da8e257cb (38 commits)
06ef36b988..da8e257cba

$ git log 06ef36b98..da8e257cb --date=short --no-merges --format='%ad %ae %s'
2017-09-12 mradev Number of views should match when Draw* is called
2017-09-13 geofflang Allow ReadPixels with GL_FLOAT type and EXT_color_buffer_half_float.
2017-09-12 geofflang Add GL_DEPTH_COMPONENT_24 as a depth format for surfaces.
2017-09-12 jmadill Remove Renderer11::markAllStateDirty.
2017-09-12 jmadill Lift AMD blit suppressions.
2017-09-12 jmadill Consolidate Index buffer application.
2017-09-12 jmadill D3D11: Consolidate Scissor state application.
2017-09-12 jmadill D3D11: Consolidate SRV and Sampler application.
2017-09-12 jmadill D3D11: Consolidate Viewport state application.
2017-09-12 jmadill D3D11: Consolidate Rasterizer State application.
2017-09-12 jmadill D3D11: Consolidate Blend State application.
2017-09-12 jmadill D3D11: Consolidate Depth Stencil State application.
2017-09-12 jmadill D3D11: Consolidate OMSetRenderTargets calls.
2017-09-12 jmadill Cleanup to Resource11's reset method.
2017-09-12 jmadill Context: Remove recompilation trigger impl method.
2017-09-12 jmadill Fix out-of-bounds reads in BlitFramebuffer.
2017-09-12 jmadill D3D11: Move TF state management to StateManager11.
2017-09-12 jmadill StateManager11: Add internal dirty bits for uniforms.
2017-09-12 jmadill D3D11: Consolidate constant buffer application.
2017-09-12 jmadill D3D11: Move Constant Buffer state to StateManager11.
2017-09-12 geofflang Include string.h for strncmp in ExtensionBehavior.cpp
2017-09-12 jmadill Cleanups to ResourceSerial.
2017-09-11 cwallez Allow compiling dEQP on Mac in Chromium checkout.
2017-09-11 jmadill Update Texture dirty bits documentation.
2017-09-12 mradev Fix viewport and scissor multiview updates in StatemanagerGL
2017-09-12 oetuaho GLSL: Fix initializing globals declared after main()
2017-01-09 yizhou.jiang ES31: Implement getMultisamplefv for D3D part.
2017-08-30 jie.a.chen ES31: Add glGetProgramInterfaceiv API
2017-07-14 oetuaho Refer to GLSL extensions through TExtension enum
2017-09-11 fjhenigman Add linux_angle_ozone_rel_ng to CQ.
2017-09-09 jmadill D3D: Refactor driver uniform application.
2017-09-09 jmadill ProgramD3D: Use more UniformTypeInfo.
2017-09-09 jmadill Fix EXTERNAL and 2D_ARRAY sampler type info.
2017-09-09 jmadill D3D: Only scan cached shader executable lists once.
2017-09-09 jmadill D3D11: Only update swizzles after a state change.
2017-09-09 jmadill D3D11: Implement dirty bits for texture updates.
2017-09-09 jmadill Move swizzling and program update to StateManager11.
2017-09-09 jmadill GL: Use dirty bits for texture and sampler bindings.

Created with:
  roll-dep skia/third_party/externals/angle2
BUG=764036,762377


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=stephana@google.com

Change-Id: Ic6e7cc57ddde2bfb397f5fa1b7db707f939817ad
Reviewed-on: https://skia-review.googlesource.com/46440
Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org>
Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org>
2017-09-14 12:45:21 +00:00
Mike Klein
9b2f69b0aa grand unifried lowp stages
I have text_16_AA_FF -> 8888 (forcing RP) faster than head now on my
laptop.  I'm feeling confident that we can make this perform well.

After looking at performance a bit more today, it looks like everything
is within what I'd consider comparable in performance, especially on
ARM.  On x86-64 it looks like big bulk blits get a little slower and
small mask blits get a little faster.

Quality looks good, and maybe improved for 565.

There are fewer platform-specific differences now in _lowp, and I think
they're few enough now that we could even consider completing the
unification by folding the 8-bit and float code together.  Rename
"div255()" to "rebias()", slap on a few coats of paint...

Guarded for Chrome with SK_JUMPER_LEGACY_LOWP.

Change-Id: I36309c07cf736f3cb31952cca66030ad56026318
Reviewed-on: https://skia-review.googlesource.com/45982
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-14 12:16:51 +00:00
Herb Derby
0f96bb303a Sk4i version of blur.
For the blur_1.50_normal_low_quality benchmark, this code goes from about 120us to 85us.
The original implementation executes at about 95us.

This changed in controlled by the flag:

SK_SUPPORT_LEGACY_SLOW_SMALL_BLUR

BUG=chromium:759070

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: If722cb8ffd8c47a94b7a6b4e6dd26fd1474b6209
Reviewed-on: https://skia-review.googlesource.com/45300
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-09-14 03:42:50 +00:00
Robert Phillips
09dfc4759e Pull non-substantive changes out of explicit GPU resource allocation CL
Change-Id: Ib6a289553ecd15c722599b7dc0d347a7800801cb
Reviewed-on: https://skia-review.googlesource.com/46284
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-13 19:49:47 +00:00
Robert Phillips
b493eebca1 Add method to iterate over a GrOp's GrSurfaceProxies
The extra generality of having a std::function is for MDB reordering. In the current MDB reordering world there is one pass through the surfaceProxies at creation time and a second pass after flush to create the usage intervals.

Change-Id: I3f548417eddc1dad7503d919241301e404255ffe
Reviewed-on: https://skia-review.googlesource.com/46200
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-13 17:38:56 +00:00
nagarajan.n
08cda14d61 Share code for setting the out_color_space CMYK encoded colorspaces
Share code for setting the out_color_space CMYK encoded colorspaces

Bug: NONE
Change-Id: I17318aa6c04f4105dd9b7c453ccbc3c3ed563e8f
Reviewed-on: https://skia-review.googlesource.com/43420
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-09-13 14:10:52 +00:00
Brian Osman
b433c5691b Adjust GPU YUV -> RGB (JPG) conversion
All of the published coefficients assume math is being done on bytes, and
that 128 is the encoding of 0 (in the biased Cb and Cr values). When
sampling an A8 texture, though, GPUs typically decode as byte/255. Thus,
128 ends up slightly larger than 0.5. To fix this, just adjust the bias
terms to be scaled by 128/255, rather than 0.5.

I also changed some of the other coefficients to be higher precision,
based on the values in ITU-T T.871.

This originally surfaced as a Chromium bug where an all-black JPG decoded
to (1/255, 0, 1/255) on GPU. I've added a GM that encodes a color cube to
JPG, then draws from the encoded data. GPU and CPU (libjpeg) still
disagree in many cases, but the newer version performs much better
(diffing gl and 8888 configs):

Previously: 95.2% of pixels differ, max diff of 2, avg diff of 1
Now       : 65.4% of pixels differ, max diff of 1, avg diff of 0

Bug: skia:7038 chromium:763605
Change-Id: I4801db9f6e2fc4d4109eb5e27c9499f214084d38
Reviewed-on: https://skia-review.googlesource.com/45842
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-13 14:10:50 +00:00
Ravi Mistry
489bef054e Use Chrome-GPU pool for CT GPU runs
Bug: chromium:700053
NoTry: true
Change-Id: Ib62ea29f5192df1b03e9d8caecb6af4daeee0e49
Reviewed-on: https://skia-review.googlesource.com/46060
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-09-13 12:25:40 +00:00
Ben Wagner
adf17dc52f Add new task to run the float-cast-overflow sanitizer.
Bug: skia:4632
No-Try: true
Change-Id: I85a0b23037d5885e5d762788d8bf5b7cc6fc19b2
Reviewed-on: https://skia-review.googlesource.com/45980
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-09-13 03:59:40 +00:00
Ben Wagner
56e9d4a579 Update omitted Bazel tests.
Match based on the whole test name.

No-Try: true
Change-Id: I03c180195f5854f30e521e2772dcb7e44f1cc3b8
Reviewed-on: https://skia-review.googlesource.com/46000
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-09-13 00:55:50 +00:00
Ben Wagner
79a3aafc34 Add Clang GPU tasks.
No-Try: true
Change-Id: I5290942396a903fcaac94feaab83a5db31af1f93
Reviewed-on: https://skia-review.googlesource.com/45844
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-09-12 23:37:20 +00:00
Chris Dalton
db91c6e7fb Improve heuristics for when to use ccpr
Gives the convex and tessellating renderers first claim on larger
paths, and the distance field renderer first claim on complex,
non-volatile paths. This also requires plumbing the clip bounds
through GrPathRenderer::CanDrawPathArgs.

Bug: skia:
Change-Id: I16e1d35ad5ee63251e33f113b1579cbba60456da
Reviewed-on: https://skia-review.googlesource.com/42224
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-09-12 20:04:20 +00:00
Chris Dalton
a640c49b7e Minor cleanups for CCPR
Bug: skia:
Change-Id: Ic4838f0e242ded0c3d0cb5c86715ed67d8152f5c
Reviewed-on: https://skia-review.googlesource.com/44520
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-09-12 18:08:21 +00:00
Ravi Mistry
6f0751e50f Fix behavior of automatically adding 'Cq-Include-Trybots' in presubmit
NoTry: true
Bug: skia:7041
Change-Id: I4660db5e9526b29e2135bf4d5f0d134f1f9a5dce
Reviewed-on: https://skia-review.googlesource.com/45880
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-09-12 18:06:35 +00:00
Ravi Mistry
a70cb8ae9b Add checks for 'DO NOT''SUBMIT' in description and file content
NoTry: true
Bug: skia:
Change-Id: I5ce8c40a7deae690b04e7fbe4ac22fa63888ffc7
Reviewed-on: https://skia-review.googlesource.com/45882
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-09-12 18:02:20 +00:00
Xianzhu Wang
0fa353c6c2 Optimize filterBounds() of SkArithmeticImageFilter/SkXfermodeImageFilter
This brings the optimization in blink's FEComposit::MapRect() [1]
into skia.

Previously for these classes we used the default SkImageFilter::
onFilterBounds() which returns the union of the bounds of input filters.
However, this was not optimized if some input filters don't contribute
to the output. When we switch blink SPv2 paint invalidation from using
blink's FilterOperations to cc/skia's filter classes, the non-
optimization caused over-raster-invalidations.

Now override SkImageFilter::onFilterBounds() in these classes to make
their filterBounds() return the same results as the blink counterparts.

Also fix a bug of SkArithmeticImageFilter when k4 is non-zero by
overriding affectsTransparentBlack() to return true in the case, so
that we will use the crop as the final bounds.

[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/graphics/filters/FEComposite.cpp?l=115

Change-Id: I91d4cadc267e6262ee3f050a0ddac90154419775
Reviewed-on: https://skia-review.googlesource.com/38921
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2017-09-12 18:01:31 +00:00
Ben Wagner
79a1256c22 Simpler version of wait-for-device.
This is a followup to https://skia-review.googlesource.com/43564

No-Try: true
Change-Id: I4bc2a24fe08e6b07f5512e3a1e03eac7e3397155
Reviewed-on: https://skia-review.googlesource.com/45120
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2017-09-12 17:25:30 +00:00
Jim Van Verth
a950b63b44 Add support for additional textures in GrDrawOpAtlas
Step two in supporting growable/shrinkable atlases.

Bug: skia:3550
Change-Id: I0cdec2a9f59cc8ced071bfeec2f8ed5a228c4b7a
Reviewed-on: https://skia-review.googlesource.com/43260
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-12 17:16:00 +00:00
Brian Osman
2ab4b2b871 Remove symmetric three stop special case
Just let the general three-stop shader handle all three-stop gradients.
Also, pre-compute values derived from the middle stop to remove all
division (and actually convert computation to FMA form).

Bug: skia:
Change-Id: I1aae069d929d1a942c38aa2e2f3fd5fb7d9b2f10
Reviewed-on: https://skia-review.googlesource.com/45800
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-12 15:39:00 +00:00
Ravi Mistry
a6b646986b Break up the prefix to make some presubmits stop complaining
NoTry: true
Bug: skia:7016
Change-Id: If2f405d8309fc63d8592a97b668f826cd606097b
Reviewed-on: https://skia-review.googlesource.com/45801
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-09-12 15:24:00 +00:00
Stephan Altmueller
74dac54548 Make output of all tests verbose
Re-enable more verbose output across all bots. 
There is no good reason why we shouldn't collect additional
information that helps triaging failure. 
Some of the current output might have to be expanded down the road. 

Bug: skia:
Change-Id: I5ff89a803f1e390bbd859756cba53a359d2801ba
Reviewed-on: https://skia-review.googlesource.com/45140
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Stephan Altmueller <stephana@google.com>
2017-09-12 14:20:00 +00:00
Ravi Mistry
ff72a0857f Add SK_DEBUG to SkUserConfig.h from upload_to_android.py if "--debug" flag is specified
Example uploaded change: https://googleplex-android-review.git.corp.google.com/#/c/platform/external/skia/+/2884102/

NoTry: true
Bug: skia:7016
Change-Id: Ia213e04532c7e4b8c90d01b8138a720f267bfa56
Reviewed-on: https://skia-review.googlesource.com/44822
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-09-12 13:54:30 +00:00
Brian Osman
a8e5744afa Add general three-stop analytic gradient shader
This fixes an Android rendering bug where radial gradients were being used
for "clipping"  (via DstIn blend mode). The gradient stops were placed at
(0, 0.999, 1), which caused our table quantization to drop the last stop.

kThree_ColorType now means "0, any t, 1". The old (special-case)
kThree_ColorType is now called kSymmetricThree_ColorType.

Bug: skia:
Change-Id: I96a0b9e679f2d537862a3e097f7e3446474914ea
Reviewed-on: https://skia-review.googlesource.com/45260
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-11 23:48:49 +00:00
Brian Salomon
3261eb219f Remove repeated conditional in TextureOp.
Change-Id: I57ef380202183580a953dec2617c8210ccab8927
Reviewed-on: https://skia-review.googlesource.com/45160
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-09-11 21:45:22 +00:00
Ethan Nicholas
5b5f096a03 Revert "Revert "Switch to the new SkSL lexer.""
This reverts commit 358515491a.

Bug: skia:
Change-Id: I013fac0ed83774d8ae7c6ee6819045cab37f5e97
Reviewed-on: https://skia-review.googlesource.com/45180
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-11 21:45:20 +00:00
angle-deps-roller@chromium.org
9194706e8c Roll skia/third_party/externals/angle2/ ef97c613f..06ef36b98 (2 commits)
ef97c613f8..06ef36b988

$ git log ef97c613f..06ef36b98 --date=short --no-merges --format='%ad %ae %s'
2017-09-09 jmadill Add top-level state sync for Samplers.
2017-09-09 jmadill Add top-level dirty bits for texture and samplers.

Created with:
  roll-dep skia/third_party/externals/angle2


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=stephana@google.com

Change-Id: I16db214539809d92a7c5296b96b55912a62d2e25
Reviewed-on: https://skia-review.googlesource.com/44882
Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org>
Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org>
2017-09-11 19:01:21 +00:00
Brian Osman
5d034744ab Do software clip mask generation with worker threads
Also refactor the prepare callback stuff to share logic
between software path rendering and clip mask generation.

Bug: skia:
Change-Id: I0c56c6df8703eb59d2d49a4c3985bd4f5ef20f01
Reviewed-on: https://skia-review.googlesource.com/44421
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-11 17:58:00 +00:00
angle-deps-roller@chromium.org
3b67faa561 Roll skia/third_party/externals/angle2/ 1aa66bc73..ef97c613f (1 commit)
1aa66bc73d..ef97c613f8

$ git log 1aa66bc73..ef97c613f --date=short --no-merges --format='%ad %ae %s'
2017-09-09 jmadill Roll GYP for VS2017 project support.

Created with:
  roll-dep skia/third_party/externals/angle2


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=stephana@google.com

Change-Id: I06ee5422131c3e32bed926441af4e5b6d12c38f3
Reviewed-on: https://skia-review.googlesource.com/44920
Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org>
Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org>
2017-09-11 17:04:00 +00:00
Xianzhu Wang
0bff418eef Add a benchmark for SkXfermodeImageFilter mode kSrcIn
This should exercise the performance benefits of
https://skia-review.googlesource.com/c/skia/+/38921.
Change-Id: Ic9b4c280308aeadbc50152d17ee5d38387be6913
Reviewed-on: https://skia-review.googlesource.com/42181
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2017-09-11 16:43:50 +00:00
Ethan Nicholas
358515491a Revert "Switch to the new SkSL lexer."
This reverts commit c576e93d17.

Reason for revert: ASAN failures

Original change's description:
> Switch to the new SkSL lexer.
> 
> This completely replaces flex with a new in-house lexical analyzer generator,
> which we have done for performance and memory usage reasons. Flex requires us
> to copy strings every time we need the text of a token, whereas this new lexer
> allows us to handle strings as a (non-null-terminated) pointer and length
> everywhere, eliminating most string copies.
> 
> Bug: skia:
> Change-Id: I2add26efc9e20cb699520e82abcf713af3968aca
> Reviewed-on: https://skia-review.googlesource.com/39780
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com

Change-Id: If27b750a5f696d06a6bcffed12fe9f0598e084a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/44881
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-11 16:34:02 +00:00
Ethan Nicholas
c576e93d17 Switch to the new SkSL lexer.
This completely replaces flex with a new in-house lexical analyzer generator,
which we have done for performance and memory usage reasons. Flex requires us
to copy strings every time we need the text of a token, whereas this new lexer
allows us to handle strings as a (non-null-terminated) pointer and length
everywhere, eliminating most string copies.

Bug: skia:
Change-Id: I2add26efc9e20cb699520e82abcf713af3968aca
Reviewed-on: https://skia-review.googlesource.com/39780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-11 16:17:00 +00:00
Ravi Mistry
a2bdf005f3 Add a "[DO NOT SUBMIT]" prefix to the uploaded Android change
Since the script cannot do anything to prevent submission via the API it might
help to atleast add a "[DO NOT SUBMIT]" prefix.

NoTry: true
Bug: skia:7016
Change-Id: I825f28947df85a4d54ead764f8d363e12f83fbfb
Reviewed-on: https://skia-review.googlesource.com/44840
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-09-11 15:28:05 +00:00
Jim Van Verth
6a7a704aa4 Add multitexture support to text and path shaders, take 3.
This does not add additional textures to the atlases, just adds the
ability to access those textures in the shaders.

Bug: skia:3550
Change-Id: I4c1da2bc374a76131f5f4ad946543e03e0ab3126
Reviewed-on: https://skia-review.googlesource.com/44841
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-09-11 15:24:30 +00:00
Ravi Mistry
b816322422 Sync only the current branch and use a shallow checkout
Tried this out locally and it shrunk the size of the checkout from 1010M
to 586M and shaved a few seconds off the running time as well.

NoTry: true
Bug: skia:7016
Change-Id: I472712e88d2cf30f0cfd71a373630d12a4937684
Reviewed-on: https://skia-review.googlesource.com/44820
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-09-11 15:23:00 +00:00
Roger Johannesson
b5f3b656de Add missing stdarg.h include
This file makes use of va_list so it should include stdarg.h. This was handled
implictly by SkString.h before https://skia-review.googlesource.com/34381
landed.

Bug: skia:
Change-Id: I74fc50463549481a0e8835943823e627bc288dd8
Reviewed-on: https://skia-review.googlesource.com/44740
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-09-11 14:09:30 +00:00
Ben Wagner
cf9365a0bc Retry adb commands on flaky devices.
No-Try: true
Change-Id: I3519131cf064d0a9676abd0fb9d7e946646ce27f
Reviewed-on: https://skia-review.googlesource.com/43564
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-09-11 14:09:20 +00:00
Justin Novosad
8b1360dcfa Reland "Optimize SkColorSpaceXformCanvas for GPU-acceleration"
This is a reland of 1d3df3848f
Original change's description:
> Optimize SkColorSpaceXformCanvas for GPU-acceleration
> 
> This change ensures that SkImages are uploaded to the GPU before
> applying the xform when the destination canvas is on the GPU. This
> makes it possible to get hits in the texture cache and it ensures
> that transforms get computed on the GPU.
> 
> This fixes a severe performance regression in Chrome that happened
> when color correction was enabled.
> 
> Associated chromium patch for layout test rebaselines:
> https://chromium-review.googlesource.com/c/chromium/src/+/655483
> 
> Merge dependency: Merging this change to the M-62 and M-61
> branches also requires merging the following change, otherwise
> there will be rendering errors:
> https://skia-review.googlesource.com/c/skia/+/43562
> 
> BUG=chromium:760738
> 
> Change-Id: I49fd5ef7968272d311249c3824fe15bee4648b73
> Reviewed-on: https://skia-review.googlesource.com/43183
> Commit-Queue: Justin Novosad <junov@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>

Bug: chromium:760738
Change-Id: I94a3482713dc4ff824ae21ea640c04d06bb7e29d
Reviewed-on: https://skia-review.googlesource.com/44760
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Justin Novosad <junov@chromium.org>
2017-09-11 14:01:00 +00:00