Commit Graph

46731 Commits

Author SHA1 Message Date
Jim Van Verth
d2d4c5e8c5 Add GrD3DGpu and GrD3DCaps.
With this, can specify d3d config for dm and it will create a GrContext
with GrD3DGpu (stubbed in).

Bug: skia:9935
Change-Id: I0b8635bc541c61833b08b60a9f6e1341d1373090
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271743
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-02-19 20:44:14 +00:00
Chris Dalton
dc2b15e99f Remove a GL optimization that disabled large scissors
Removes an optimization from GrGLGpu that disabled scissor when the
scissor rect contained the entire viewport. This is incompatible with
the dynamic state world where scissor test is enabled during pipeline
bind, and then only the scissor rect is updated between draws. It also
might actually be an un-optimization since scissor test enable state
can be more expensive to change than the rect.

Change-Id: Iadb14e2b5fbebde3fe71bc0dfdaeb979617bb80b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271939
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-19 20:40:24 +00:00
recipe-roller
a6350f021e Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (depot_tools) into this repository.

depot_tools:
  https://crrev.com/269640724f824eff2b21faeebb2b44bf84fa5881 (ehmaldonado@google.com)
    git-cl: Use scm.GIT.GetConfig in more places.

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I372ad88ccb59e8a304e152d1434445d5f62b8c59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272020
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2020-02-19 20:02:00 +00:00
Brian Osman
e3f57a4e62 Revert "Add SkSLCompiler::toHLSL, using SPIRV-Cross"
This reverts commit cf7c7e38e8.

Reason for revert: Breaking our Flutter build.

Original change's description:
> Add SkSLCompiler::toHLSL, using SPIRV-Cross
> 
> Change-Id: Ia7a11a726cac006f6acc36efe8fc2ff27f30af72
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270837
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I2a1353864e2225578271573a8f7157d95fb0c969
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271744
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-19 19:53:30 +00:00
recipe-roller
9bd3d98512 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (depot_tools, recipe_engine) into this repository.

depot_tools:
  https://crrev.com/1fbe7c0bb24be4d6460cf83b1aa4750ab4a46933 (tandrii@chromium.org)
    Roll lucicfg tool to @ 3b479f0e v1.12.3.
  https://crrev.com/10e0e6d6c19ac3ca5e1ac5667e7772f65f1f8ff8 (tandrii@chromium.org)
    Roll bb tool to @ 37d99607
recipe_engine:
  https://crrev.com/a7a70da79ed53f56f5150bb7d1eb577aca51c457 (yiwzhang@google.com)
    [bb] Fix the bug that search api only returns 1000 builds max when limit>1000
  https://crrev.com/90eb05b0df05f7840e58ff3c9f3685af0c89a27d (guterman@google.com)
    Add --stop flag to run/train which fails fast

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I5be97222dd94277b828f837dc99d98f5eb3ced86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271739
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2020-02-19 19:30:00 +00:00
Mike Reed
5263837748 add fling to rotating cube
Change-Id: I4eb9a64cf41b088fca239cc7877b9dc9870d14ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271863
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-19 19:29:27 +00:00
Brian Osman
cf7c7e38e8 Add SkSLCompiler::toHLSL, using SPIRV-Cross
Change-Id: Ia7a11a726cac006f6acc36efe8fc2ff27f30af72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270837
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-19 19:15:21 +00:00
Julia Lavrova
c7a9a074e1 Bug fixes
Change-Id: I2b4b210301584c23a3b9325ebfdfdd9e6c4712d1
Bug: skia:9881, skia:9882
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271865
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-02-19 19:01:21 +00:00
Mike Klein
28abea51fa dip our toes into c++11 style [[attributes]]
AFAIK, we can replace a lot of preprocessor tests now that we have
[[attributes]] and compilers are supposed to ignore unknown attributes.
Let's see if it works. If this sticks I'll get the rest in a big CL.

-Wattributes and MSVC warning C5030 are kind of annoying as errors,
so turn them off.  This does not bode well for rolling into clients.

Change-Id: I88b150bab746c5510ff94f604096bf0ee0c9f96a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271886
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-19 17:51:40 +00:00
Corentin Wallez
55a3ea0a11 Fix compilation of Dawn backend after GrMesh/GrPrimitiveType change
Change-Id: Ia37863dacffacd344086fa513baa9c274443554c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271836
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-02-19 17:32:31 +00:00
Julia Lavrova
212bf079de layout/relayout with different widths and justification
Change-Id: I2f6d9121a97d3dc12981e0aaf420c56a8f7e05eb
Bug: skia:9851, skia:9875
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271536
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-02-19 16:37:14 +00:00
Chris Dalton
5a5fe79ebf Improve the mechanism to suppress warning messages during testing
It's important to suppress warning messages during tests that
intentionally trigger them, in order to not confuse users. This CL
attempts to make the suppression mechanism more general, and then
suppresses another warning that has started coming out in dm.

Bug=skia:9927
Change-Id: I67b5bcd1865f4001964bbdc967b0327682b4258b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271177
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-02-19 16:34:09 +00:00
Jim Van Verth
71275fc37c Reland "Manage renderCmdEncoder over lifetime of GrMtlOpsRenderPass."
This is a reland of 53a72c1b50

Original change's description:
> Manage renderCmdEncoder over lifetime of GrMtlOpsRenderPass.
> 
> Rather than create a renderCmdEncoder per draw, we create it up front
> and each draw just uses it. On a clear or upload we switch away and
> then recreate it.
> 
> Bug: skia:
> Change-Id: Ic6d612119ed3f7c41183d0186083deae14f96398
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270841
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Bug: skia:
Change-Id: I0fe765a5fde7f6643adce2d5d5ab37c2ad930a5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271862
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-02-19 16:32:09 +00:00
Mike Klein
5f1ad0dc47 rm release swiftshader msan bots
They're not any faster than the debug ones.

Change-Id: I793706d36bd868277db2b6e39a53cb4e1075e0b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271880
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
2020-02-19 15:32:01 +00:00
Brian Osman
d3b3bf3567 Reland "Move runtime shader/colorfilter into SkRuntimeEffect.cpp"
This reverts commit 7281a86237.

Change-Id: I1759358ede39e2466362cc4d3f0b9530eff08c9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271656
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-19 15:29:09 +00:00
Florin Malita
f0d5ea1ae7 Clip-only tiling in Viewer
Use clipping for tile isolation, instead of separate surface.

Change-Id: I8ae09ef25962fe877d54b1154ab9b5bf9a5f5a1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271859
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-02-19 14:54:39 +00:00
Brian Osman
4156d33568 Switch SPIRV-Cross to use third_party GN template
Suppresses all warnings (nonportable include paths, etc.)

Change-Id: Ic1bbf2496a2fe259d5e7a9537e1d89ec74a99add
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271857
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-02-19 14:52:48 +00:00
Mike Reed
86b4388fdc Revert "Support adding attributes to PDF document structure nodes."
This reverts commit 80474156d1.

Reason for revert: breaking chrome roll

https://ci.chromium.org/p/chromium/builders/try/cast_shell_linux/533554

Original change's description:
> Support adding attributes to PDF document structure nodes.
> 
> This is an important part of writing a tagged PDF. Many of the nodes
> in the document structure tree need additional attributes, just like
> in HTML.
> 
> This change aims to add support for a few useful attributes, not to
> be comprehensive.
> 
> Bug: chromium:1039816
> 
> Change-Id: I64a6b36b0b4ec42fd27ae4ad702afce95c95af5d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268878
> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Dominic Mazzoni <dmazzoni@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>

TBR=djsollen@google.com,reed@google.com,dmazzoni@chromium.org,dmazzoni@google.com

Change-Id: Iedd397303e870144e8d282db0cb81c535a783e8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1039816
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271858
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-19 14:23:31 +00:00
Mike Reed
ba9e8171c1 allow client to pass null if there are no uniforms
Relies on https://skia-review.googlesource.com/c/skia/+/271738

Change-Id: I990ed71c847af472252b6efc3abde83fc741abfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271698
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-19 14:21:39 +00:00
skia-autoroll
c5ff41f297 Roll third_party/externals/angle2 c8676d4ba37d..fa9eff37c38a (11 commits)
c8676d4ba3..fa9eff37c3

git log c8676d4ba37d..fa9eff37c38a --date=short --first-parent --format='%ad %ae %s'
2020-02-18 shawn.p.huang@gmail.com Disable GL_EXT_semaphore_fd for Mesa version < 19.3.5 on AMD GPUs
2020-02-18 julien.isorce@chromium.org Provide default implementation of rx::DisplayEGL
2020-02-18 jmadill@chromium.org Vulkan: Throttle when way ahead of device.
2020-02-18 jmadill@chromium.org Vulkan: Command graph linearization for SemaphoreVk.
2020-02-18 lexa.knyazev@gmail.com Move sampleAlphaToCoverage out of blendState
2020-02-18 jmadill@chromium.org Use non-mutating getQuery in validation.
2020-02-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 211ee9c4eec1..873e416c2d07 (3 commits)
2020-02-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src c731adec183b..0bd30e43c007 (1 commits)
2020-02-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 481daed34f15..0bbf7ba9f909 (5 commits)
2020-02-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src ae59435606fc..113d07a6ebda (1 commits)
2020-02-18 cnorthrop@google.com Vulkan: Update ES 3.1 test expectations

Created with:
  gclient setdep -r third_party/externals/angle2@fa9eff37c38a

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC lovisolo@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
Tbr: lovisolo@google.com
Change-Id: I5a134c57fca3196087d77969fdf1bcdb9e13094f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271766
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-19 04:59:08 +00:00
skia-autoroll
a037445e07 Roll third_party/externals/swiftshader 0bbf7ba9f909..8def9063c4fd (2 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/0bbf7ba9f909..8def9063c4fd

git log 0bbf7ba9f909..8def9063c4fd --date=short --first-parent --format='%ad %ae %s'
2020-02-18 cwallez@chromium.org Only call updateBorders on ranges that can be cubemaps.
2020-02-18 capn@google.com Fix sRGB conversion precision issues

Created with:
  gclient setdep -r third_party/externals/swiftshader@8def9063c4fd

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC lovisolo@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: lovisolo@google.com
Change-Id: I99a1e6aa3d404913664c43133c3999f2ca66927a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271767
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-19 04:56:38 +00:00
skia-autoroll
0ea9facc14 Roll ../src 0f78b5868284..f5ddd865c430 (448 commits)
0f78b58682..f5ddd865c4


Created with:
  gclient setdep -r ../src@f5ddd865c4

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC lovisolo@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
Tbr: lovisolo@google.com
Change-Id: I43d78eb61b5928ca3963788afcc66f21eb59471d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271768
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-19 04:41:38 +00:00
Mike Reed
33b1ecc466 Use careful_memcpy in case one of the args is null
Change-Id: I945c2c76a0134d609e88d6c38051b0bc6a6787e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271738
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-19 04:13:08 +00:00
Herb Derby
b5ea378a32 Move memory usage calculation to SkStrikeCache::Strike
Change-Id: I96f5581b6a8dcc2c245590ae180a304e4b2ecbdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271657
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-02-19 04:09:48 +00:00
Brian Salomon
d0d033a125 GrBicubicEffect uses GrTextureEffect.
This opens the door to, but doesn't add support for, applying this
effect to other child processor types.

Fixes issue when applying effect to rectangle textures where steps were
done using increments of 1/w and 1/h instead of 1.

Change-Id: I74e20d6c96931c337b22b156a61c8e279c6fbc62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259420
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-02-19 00:16:36 +00:00
Mike Klein
cfdfb229fc remove -Wno-bad-function-cast
Doesn't seem to trigger.

Change-Id: I481b90a4e7fa0a4badc9acff9df1ec232a62417d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271680
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-02-18 23:59:15 +00:00
Mike Klein
a9609ea8c5 turn on -Wreturn-std-move-in-c++11
This CL has a complicated back story, but it's concrete change is
simple, just turning the warning on and converting a bunch of

    return foo;

to

    return std::move(foo);

These changes are exclusively in places where RVO and NRVO do not apply,
so it should not conflict with warnings like -Wpessimizing-move.

Since C++11, when you return a named local and its type doesn't match
the declared return type exactly, there's an implicit std::move()
wrapped around the value (what I'm making explicit here) so the move
constructor gets an opportunity to take precedence over the copy
constructor.  You can read about this implicit move here under the
section "automatic move from local variables and parameters":
https://en.cppreference.com/w/cpp/language/return#Notes.

This situation comes up for us with smart pointers: a function declares
its return type as std::unique_ptr<Base> or sk_sp<Base>, and we return a
std::unique_ptr<Impl> or sk_sp<Impl>.  Those types don't match exactly,
so RVO and NRVO don't come into play.  They've always been going through
move constructors, and that's not changed here, just made explicit.

There was apparently once a bug in the C++11 standard and compilers
implementing that which made these copy instead of move, and then this
sort of code would do a little unnecessary ref/unref dance for sk_sp,
and would entirely fail to compile for uncopyable std::unique_ptr.
These explicit moves ostensibly will make our code more compatible with
those older compilers.

That compatibility alone is, I think, a terrible reason to land this CL.
Like, actively bad.  But... to balance that out, I think the explicit
std::move()s here actually help remind us that RVO/NRVO are not in play,
and remind us we're going to call the move constructor.  So that C++11
standard bug becomes kind of useful for us, in that Clang added this
warning to catch it, and its fix improves readability.

So really read this all as, "warn about implicit std::move() on return".
In the end I think it's just about readability.  I don't really hold any
hope out that we'll become compatible with those older compilers.

Bug: skia:9909
Change-Id: Id596e9261188b6f10e759906af6c95fe303f6ffe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271601
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-18 23:55:35 +00:00
Herb Derby
799a23cf06 Have SkScalerCache return memory used
The SkScalerCache now returns the amount of memory allocated
for each operation. The SkStrikeCache can now start using this
information to track cache size.

Change-Id: Ie0e8138015c6692257126a7bb02a3773b10a7b0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271476
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-02-18 23:52:35 +00:00
Brian Osman
fe6fe6c5a8 Revert "allow client to pass null if there are no uniforms"
This reverts commit 0185eb19d4.

Reason for revert: Asserts on ASAN bots

Original change's description:
> allow client to pass null if there are no uniforms
> 
> Change-Id: I788574ccd1f66cfa29556d7d84ae813d108a39c7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271318
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=brianosman@google.com,reed@google.com

Change-Id: I497b657095570055066c4964150bfb16cd33b027
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271697
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-18 21:11:45 +00:00
Brian Osman
70f24af3ef Fix path to GN on Windows when running presubmit hooks
I think this fixes issues with `git cl upload` on Windows machines.
Note that fetch-gn grabs gn.exe (not gn.bat).

Change-Id: Iba64ec62cce00e8ba0076ce83d47e4e6e6ef6197
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271604
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-18 20:41:16 +00:00
Robert Phillips
f6a0b45414 Store ProgramDesc on DDLs alongside the GrProgramInfo
We already have the program desc bc we uniquify the programs stored
on the DDL. This CL just preserves them on the snapped DDL to speed
up precompilation.

Bug: skia:9455
Change-Id: Ie0e0b607e2e96beca7128f4083386b34ad469072
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270998
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-18 20:35:55 +00:00
Mike Reed
0185eb19d4 allow client to pass null if there are no uniforms
Change-Id: I788574ccd1f66cfa29556d7d84ae813d108a39c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271318
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-18 20:35:25 +00:00
Robert Phillips
1daa239f64 Make GrGLGpu's program cache be held as a unique_ptr
This seems a little bit less fussy.

Change-Id: If62fca188c83f1317351e1f18342a26e54355c07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271597
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-18 20:16:17 +00:00
Jim Van Verth
b01e12b716 Start adding D3D backend
Bug: skia:
Change-Id: Id24ed653adb80fe9b2ad597a34e459eb91ca53ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271057
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-18 20:14:15 +00:00
Brian Osman
584582662c Roll SPIRV-Cross to latest (2020-02-14)
Change-Id: Icbc853dd599d33358b6885c05d38a7b34f82a008
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271599
Reviewed-by: Stephen White <elsenorblanco@gmail.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-18 20:11:15 +00:00
Brian Osman
7281a86237 Revert "Move runtime shader/colorfilter into SkRuntimeEffect.cpp"
This reverts commit 8980acd623.

Reason for revert: Win-Shared

Original change's description:
> Move runtime shader/colorfilter into SkRuntimeEffect.cpp
> 
> Better organization that lets us share a bunch of code between these
> (very similar) objects.
> 
> Change-Id: Ie559d6e144d8588b98a95d4170e2e6c19d9623bd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270736
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,reed@google.com

Change-Id: Ic13d85b7c4f2d593a6c15dde067f118ea5753eb6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271600
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-18 19:31:14 +00:00
Brian Osman
8980acd623 Move runtime shader/colorfilter into SkRuntimeEffect.cpp
Better organization that lets us share a bunch of code between these
(very similar) objects.

Change-Id: Ie559d6e144d8588b98a95d4170e2e6c19d9623bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270736
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-18 19:15:05 +00:00
Mike Reed
cfee8ee525 add skotties to cube demo
Change-Id: I2e1db9d4255cfcac4c589b726a371adfb0c5786e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271576
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-02-18 18:31:15 +00:00
Dominic Mazzoni
80474156d1 Support adding attributes to PDF document structure nodes.
This is an important part of writing a tagged PDF. Many of the nodes
in the document structure tree need additional attributes, just like
in HTML.

This change aims to add support for a few useful attributes, not to
be comprehensive.

Bug: chromium:1039816

Change-Id: I64a6b36b0b4ec42fd27ae4ad702afce95c95af5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268878
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-02-18 18:14:36 +00:00
Florin Malita
2e941d00c8 [skottie] Store scalar keyframe values inline
Generally, keyframe values live in dedicated storage, and are tracked in
keyframes based on their index.

This separation is not necessary for float values, as their storage size
is the same as their index's:

  - update keyframes to store value records (VRecs), which can hold
    either external value indices or inline floats

  - introduce a scalar animator specialization which operates on float
    VRecs and doesn't require dedicated value storage

Change-Id: Icd8f1608c28c761303bdc44a23f562a2d2810d4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270844
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-02-18 17:31:15 +00:00
Ben Wagner
3c4a9d347d Run fetch-gn in PRESUBMIT if needed
Change-Id: I3f2f3713fc27207c26d02c29358cd582440e8e65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271037
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-02-18 15:45:05 +00:00
Ben Wagner
f8b21d5913 [infra] Merge SwiftShader into CPU dimensions logic
Followup to https://skia-review.googlesource.com/c/skia/+/270838

Change-Id: I5b6146abc6f84499a1e1014610221d276254f962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271060
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-02-18 15:34:15 +00:00
Leon Scroggins III
a09d2328e8 Enable Windows host build for Skia
The issue with compiler warnings was fixed in
https://skia-review.googlesource.com/c/skia/+/270096.

Bug: b/149286037
Test: lunch sdk && m libskia

Uploaded previously as ag/10306975, but that will get overwritten by our
automatic merger. Update the source so the change will stick.

Change-Id: I5dced8a51cec6a16aa9f93f36b90d3194d00ced4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271059
Auto-Submit: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Jerome Gaillard <jgaillard@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-02-18 15:15:15 +00:00
Yi Xu
55bca410f9 Update SkSurface::ReplaceBackendTexture to take ContentChangeMode
In SkSurface::ReplaceBackendTexture, it used to always retain a copy
of the the current content. The ContentChangeMode is added as a
parameter to allow the callers to decide whether retain or discard the
current content.

Bug: 1014246

Change-Id: I8736e7795b4755bbde94009ffe4d943c75112b98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271016
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
2020-02-18 15:15:06 +00:00
Robert Phillips
c1bb9cba16 Revert "Manage renderCmdEncoder over lifetime of GrMtlOpsRenderPass."
This reverts commit 53a72c1b50.

Reason for revert: Mac 10.13 bot is red

Original change's description:
> Manage renderCmdEncoder over lifetime of GrMtlOpsRenderPass.
> 
> Rather than create a renderCmdEncoder per draw, we create it up front
> and each draw just uses it. On a clear or upload we switch away and
> then recreate it.
> 
> Bug: skia:
> Change-Id: Ic6d612119ed3f7c41183d0186083deae14f96398
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270841
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=egdaniel@google.com,jvanverth@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: Ibc2697c127ec3e309ed4bb5fe84982f6047e5915
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271496
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-18 14:44:45 +00:00
Ben Wagner
78b471760d [infra] fix recipe bug
We shouldn't modify self.m.vars.extra_tokens in the docker flavor.

I noticed this when doing some debugging. It doesn't seem to be causing
any problems currently.

Change-Id: I2239787f8aec8a25a6a26418c633e68840f74e04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271058
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-02-18 12:22:05 +00:00
skia-autoroll
4af17e434c Roll third_party/externals/swiftshader 481daed34f15..0bbf7ba9f909 (5 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/481daed34f15..0bbf7ba9f909

git log 481daed34f15..0bbf7ba9f909 --date=short --first-parent --format='%ad %ae %s'
2020-02-17 amaiorano@google.com Cache callstack results to avoid expensive lookup
2020-02-17 amaiorano@google.com Subzero: add REACTOR_EMIT_PRINT_LOCATION support
2020-02-17 bclayton@google.com third_party: Add shell script that updates marl.
2020-02-17 amaiorano@google.com Implement rr::Print support for Subzero
2020-02-17 amaiorano@google.com Subzero: fix another load from constant data

Created with:
  gclient setdep -r third_party/externals/swiftshader@0bbf7ba9f909

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC lovisolo@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: lovisolo@google.com
Change-Id: I23715da549973117e42687f98435b14d1e7a12fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271437
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-18 07:15:02 +00:00
skia-autoroll
4bdd08e3ef Roll third_party/externals/angle2 2dd40d7fa75c..c8676d4ba37d (10 commits)
2dd40d7fa7..c8676d4ba3

git log 2dd40d7fa75c..c8676d4ba37d --date=short --first-parent --format='%ad %ae %s'
2020-02-18 xinghua.cao@intel.com Unlimit texture size on relatively new linux
2020-02-18 jmadill@chromium.org Revert "Use newer OSX SDK for iOS"
2020-02-17 jmadill@chromium.org Use newer OSX SDK for iOS
2020-02-17 lehoangq@gmail.com Metal: Fixed memory leak due to the CAMetalLayer still attached to super layer
2020-02-17 khushalsagar@chromium.org Only enable robust client memory if the context supports validation.
2020-02-17 cwallez@chromium.org Revert "Provide default implementation of rx::DisplayEGL"
2020-02-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 6c218ec60b5f..77fefe765c06 (1 commits)
2020-02-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 73d377fae66e..211ee9c4eec1 (3 commits)
2020-02-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-headers/src 726435870206..9bd3f561bcee (1 commits)
2020-02-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader f9f999f5a2eb..481daed34f15 (2 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@c8676d4ba37d

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC lovisolo@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
Tbr: lovisolo@google.com
Change-Id: I90479aa67b385fcd51c907b43d626e205d380b7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271436
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-18 06:13:12 +00:00
skia-autoroll
9dbb98007b Roll ../src 5d89b446d290..0f78b5868284 (234 commits)
5d89b446d2..0f78b58682


Created with:
  gclient setdep -r ../src@0f78b58682

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC lovisolo@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
Tbr: lovisolo@google.com
Change-Id: I3c955691c3f5e7bc1b7d4848841603180c01d3c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271438
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-18 04:37:42 +00:00
Mike Reed
4d1700125c move SkDeque.h into private
Perhaps just make this SkTStack...

Change-Id: Iefdbb1e33acec96aec5f885e3e16ac2d97fd5f73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271320
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-18 02:05:08 +00:00