Commit Graph

41948 Commits

Author SHA1 Message Date
Jim Van Verth
9756c36666 Metal: Add check for invalid shader functions
Bug: skia:8243
Change-Id: Ibcf34d72d06d06cbffc411afade277b6d94991b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214304
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-05-17 15:44:19 +00:00
Robert Phillips
9b16f81858 Switch over to using new direct allocation API in our tests (as much as possible at least)
To fully switch over we need the entry point that uploads data but most of the old call
sites can be switched over now.

Change-Id: I362b1dfde7d88bf8d3f8f90155f53d9ac442a329
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214300
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-17 15:41:50 +00:00
Greg Daniel
4f71cccb9d Appease compilers after swizzle change.
Change-Id: I9d9f4f84c72899780b59b5a20436b30b5c54ccc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214303
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-05-17 15:28:19 +00:00
Robert Phillips
dc62b64a72 Add helper method to fill in yuvaIndices given a yuv format
This is just a start. If we like it we can make it more public.

The general idea is to make it easier for clients to fill in the yuvaIndices array for the more esoteric YUV formats (e.g., YUY2).

Change-Id: Ie5684f52c0b2681f00a6b146476e46c71303a4e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214182
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-17 15:20:09 +00:00
Greg Daniel
eb4a827d5b Add GrCaps call to get swizzle from BackendFormat and ColorType.
This CL just adds the caps function. Follow on CL will use it thoughout
the gpu backend to remove GrPixelConfig dependency for swizzle.

Bug: skia:6718
Change-Id: Id299c72a9dc9f33411d8fd9c806158da20372474
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214188
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-17 14:38:08 +00:00
Brian Osman
4e93feba40 Interpreter: Implement ternary operator
Change-Id: If05661224d4a53e1854180d9b280ebb7a7ac2793
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214191
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-17 14:29:23 +00:00
Brian Osman
4c63a1eada Particles + Interpreter: Bind particle's SkRandom to "rand"
Update sample effects to use that (and remove the need for the
hacky workaround "random -> frame" affector I was using).

Current perf on my workstation, 6k particles updating:
native: 0.67 ms
interp: 0.97 ms

Change-Id: I3a2168c210d7431ffffe2b87ab6adade69f1dce7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214190
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-17 14:29:22 +00:00
Ethan Nicholas
48a75aa661 redesigned SkSL interpreter vector instructions
Bug: skia:
Change-Id: I7737eacdb5acd6b19d95fce7ee76945f0f9d0d7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214221
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-05-17 14:24:18 +00:00
Avinash Parchuri
0d380182d5 Apply layer in-point as a negative time-bias for multi-frame image assets.
The time argument to skottie::ImageAsset::getFrame() is expected to be relative to the in-point of the layer.

Change-Id: I9299e07af2254353e0799a827813c1bd75bdec26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213800
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2019-05-17 14:24:17 +00:00
skia-autoroll
3c9fc2d3b2 Roll third_party/externals/swiftshader d61595f367af..ab1e2b49fe88 (8 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/d61595f367af..ab1e2b49fe88


git log d61595f367af..ab1e2b49fe88 --date=short --no-merges --format='%ad %ae %s'
2019-05-16 chrisforbes@google.com Unbreak some synchronization edge cases
2019-05-16 chrisforbes@google.com Various fixes for VS-only pipeline
2019-05-16 chrisforbes@google.com Remove asserts blocking atomic load/store in Image storage class
2019-05-16 chrisforbes@google.com Whitelist supported capabilities
2019-05-16 chrisforbes@google.com Use provided VkPipelineLayout in BindDescriptorSets
2019-05-16 chrisforbes@google.com Avoid RValue<SIMD::Int>(int)
2019-05-16 bclayton@google.com SpirvShader: Precision fixes for GLSLstd450Ldexp
2019-05-16 swiftshader.regress@gmail.com Regres: Update test lists @ d61595f3


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

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
TBR=michaelludwig@google.com

Change-Id: Ia7fac7908d2e92f80bc5816f7f2b950fbc7cffc5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214260
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-05-17 14:19:13 +00:00
Michael Ludwig
4325270445 Remove rounding on explicit clip geometry
The rounding that was introduced as part of https://skia-review.googlesource.com/c/skia/+/213132
creates more problems than it is worth, leading to inconsistencies between
the CPU and GPU rounding during non-AA rasterization.

This removes the rounding so that solid-color axis-aligned draws and clipped
draws are always consistent. This reduces the likelihood of running into the
issues seen in 423834 (although follow-up changes are needed to apply this
same clip consolidation to all SkPaints and texture draws). It does re-expose
the background-clip: content-box issue is 957946, but this should be addressed
in Blink instead (see https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/paint/box_painter_base.cc?rcl=6269d3758afa9216aa560a0406851a4e628f5a11&l=818)

Bug: chromium:957946, chromium:423834
Change-Id: I64540c7d9ceaf46e410ac16c5cdccc6c4bad0089
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214189
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-05-17 14:19:12 +00:00
skia-autoroll
e5b3e400b6 Roll ../src 8c742b264faa..5ca9f9560554 (448 commits)
8c742b264f..5ca9f95605


Created with:
  gclient setdep -r ../src@5ca9f95605

The AutoRoll server is located here: https://autoroll.skia.org/r/chromium-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
TBR=michaelludwig@google.com

Change-Id: I7d1c47a0687cc6561f1ef8d2087767d76e1dc834
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214262
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-05-17 14:14:09 +00:00
skia-autoroll
1eb4557ff2 Roll third_party/externals/angle2 6ddb7768fa25..06de90c66c18 (9 commits)
6ddb7768fa..06de90c66c


git log 6ddb7768fa25..06de90c66c18 --date=short --no-merges --format='%ad %ae %s'
2019-05-16 syoussefi@chromium.org Vulkan: Re-enable a handful of suppressed ES3 tests
2019-05-16 jmadill@chromium.org Break debugger on assertion failure.
2019-05-16 jmadill@chromium.org Fix Clang warning in dEQP-KHR tests.
2019-05-16 syoussefi@chromium.org Add a note regarding RenderDoc+Android+Vulkan+dEQP
2019-05-16 jmadill@chromium.org Add KHR-GLES dEQP tests.
2019-05-16 syoussefi@chromium.org Vulkan: make sure default uniforms are in std140
2019-05-16 aleino@nvidia.com Use D3D11 GetDimensions driver workaround for integer cube maps
2019-05-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll ./third_party/spirv-tools/src f815e6fe51af..9dfd4b835807 (6 commits)
2019-05-16 jiajia.qin@intel.com Do struct mapping under conditions


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

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=michaelludwig@google.com

Change-Id: I1ca80f9a38c962fd5be6208ae2b6c7080384a7bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214261
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-05-17 14:14:08 +00:00
Robert Phillips
0c6daf034b Direct backend object allocation API
Change-Id: Ie8733a4db8061c67678a41cf239ce4407e967df7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212965
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-05-17 12:14:48 +00:00
Brian Osman
c6568afa0b Remove Nima from DEPS, experiments, Viewer, etc.
Change-Id: Ide69d3c9f0f02e886bd0d52723d425a548edd2e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214187
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-16 17:02:11 +00:00
Jim Van Verth
d063e8b6f1 Revise Mac windowing and context creation.
Windowing and events:
* Use a NSTrackingArea to only capture mouse events within the view.
* Use ViewDelegate to track events rather than pulling them out of the
  event pump.
* Sets up the autoreleasepool correctly to clear out old events

Context creation:
* Don't use a subview for OpenGL (it's not necessary).
* For Metal, use a CAMetalLayer rather than MTKView.
* Add vsync support to Metal.

Bug: skia:8737
Change-Id: I8ea5cc865df65f8dc2fef47082bf6a4d1657cf03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213672
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-16 16:46:11 +00:00
Brian Osman
1091f02b40 Interpreter: Change all Load/Store ops to use immediate indices
Avoids the need for a PushImmediate (which usually also required
a Nop for alignment) on every load/store. And it makes the codegen
for local vs. global identical, which simplifies the byte-code
generator in a few spots.

This means that places previously using DupDown now need something that
dupes the *top* N elements of the stack. Just use Vector + Dup, and
remove the (now unused) DupDown instruction.

Also add/implement kStoreSwizzleGlobal, which was the last missing
load/store op (and add a test case).

Change-Id: Id450272c11f4f1842c9d57bc5114e7f81e9e926e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214062
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-16 14:19:51 +00:00
Robert Phillips
f0ced62f91 Make createTestingOnlyBackendTexture and deleteTestingOnlyBackendTexture no longer be behind GR_TEST_UTILS (take 2)
Change-Id: Id00d0692c99c7eaec685788fec29ee189f020f2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214180
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-16 14:07:20 +00:00
skia-autoroll
3f4b4dcb51 Roll ../src a01010a50904..8c742b264faa (455 commits)
a01010a509..8c742b264f


Created with:
  gclient setdep -r ../src@8c742b264f

The AutoRoll server is located here: https://autoroll.skia.org/r/chromium-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
TBR=michaelludwig@google.com

Change-Id: I116e1d83aafcbe057bbccd38a53e1c32c6561e7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214131
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-05-16 06:00:11 +00:00
skia-autoroll
9ad72e7928 Roll third_party/externals/angle2 bff32703c75b..6ddb7768fa25 (10 commits)
bff32703c7..6ddb7768fa


git log bff32703c75b..6ddb7768fa25 --date=short --no-merges --format='%ad %ae %s'
2019-05-16 jmadill@chromium.org Remove angle:: prefix in angle_deqp_gtest.
2019-05-16 jmadill@chromium.org Add IsDirectory helper function to system_utils.
2019-05-15 tobine@google.com Vulkan:Allow same-named var in nested scope
2019-05-15 timvp@google.com Android: Fix symbol compression logic
2019-05-15 jmadill@chromium.org dEQP: Make deqp_path GN variable public.
2019-05-15 jmadill@chromium.org Suppress flaky OpenGL ES3 test.
2019-05-15 jmadill@chromium.org Update dEQP build config to use GN templates.
2019-05-15 geofflang@chromium.org Use clamp cast for stencil mask in all versions.
2019-05-15 courtneygo@google.com Add support for OES_depth_texture
2019-05-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll ./third_party/spirv-tools/src e935dac9ef8a..f815e6fe51af (1 commits)


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

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=michaelludwig@google.com

Change-Id: I79d44180e941315190d04bc78d3365f368f497c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214130
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-05-16 05:55:21 +00:00
skia-autoroll
7921042df7 Roll third_party/externals/swiftshader 3d7b7ea134d1..d61595f367af (10 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/3d7b7ea134d1..d61595f367af


git log 3d7b7ea134d1..d61595f367af --date=short --no-merges --format='%ad %ae %s'
2019-05-15 hliatis@google.com Have final present function perform a VkQueueWaitIdle()
2019-05-15 capn@google.com Fix negation of unsigned value warning treated as error
2019-05-15 chrisforbes@google.com Fix color blend state handling for multiple attachments
2019-05-15 chrisforbes@google.com Move constant specialization to SpirvShader
2019-05-15 sugoi@google.com 32 bit safe code
2019-05-15 chrisforbes@google.com Remove Context::separateAlphaBlendEnable etc
2019-05-15 chrisforbes@google.com Now that we have swizzles forced, don't bother with channel replacement
2019-05-15 chrisforbes@google.com Override imageview swizzles for channel replacement edge cases
2019-05-15 bclayton@google.com CMakeLists: Silence pedantic MSVC warning about switch with no cases
2019-05-15 swiftshader.regress@gmail.com Regres: Update test lists @ 3d7b7ea1


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

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
TBR=michaelludwig@google.com

Change-Id: I770e8de2018fa834792c77e14beace4b0ac35c9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214129
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-05-16 05:40:41 +00:00
Mike Klein
b3c0bf6426 Revert "manually register codecs in DM"
This reverts commit 9b2633e294.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> manually register codecs in DM
> 
> We'll want to do this when we've got Google3 refactored
> to slice out each of these four codecs into its own little target.
> 
> Small tweaks to make SkPngCodec match the pattern of the rest.
> 
> Should be harmless to have both the compile-time and runtime
> registration, right?
> 
> Change-Id: Ic72394764ac267758dc1023e85f3d0c4b655d420
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213872
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,scroggo@google.com,brianosman@google.com

Change-Id: If3272ef1985757a93ada229f833408d4bf83ddfb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214108
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 22:03:02 +00:00
Mike Klein
4bf6fd68db Revert "add runtime registration for encoders"
This reverts commit 940c3f136d.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> add runtime registration for encoders
> 
> If we want to make these external dependencies mix-and-match in Google3,
> we'll need to group together the encoders and decoders, everything that
> dependends on each external library.
> 
> I was tempted to try to remove these generic encoder entrypoints and
> replace them with calls to the direct equivalents, but I'm not sure
> that's necessary.  I think we can just register encoders like decoders.
> 
> Change-Id: I41d2d1bb3ceb1daafa62c95d345eb6a70249be75
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213880
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,scroggo@google.com,brianosman@google.com

Change-Id: I3ee9353ca6b3c6c11feba0503b672d8986a347be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214107
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 22:02:39 +00:00
Mike Klein
0af9929416 Revert "remove #if guards in SkAndroidCodec.cpp"
This reverts commit 8ae07c319d.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> remove #if guards in SkAndroidCodec.cpp
> 
> I'm not sure I entirely understand what's going on here, but it looks
> like these removed guards aren't needed?  Can you walk me through what
> they're for?  I think they're getting in the way of runtime registered
> codecs working with SkAndroidCodec.
> 
> Change-Id: I078bfb77797b4a3419f02a20d77d0aa8d7bce09d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213876
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>

TBR=mtklein@google.com,scroggo@google.com

Change-Id: I92883e0e8e334766b6004faf0801689d6f4cde9d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214106
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 22:02:14 +00:00
Mike Klein
c9deffaed2 Revert "skip runtime registration on iOS"
This reverts commit 017126fe1d.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> skip runtime registration on iOS
> 
> These encoders and decoders are not built and linked
> in Google3 iOS builds.  We just need to hack a bit to
> get DM to build there... we never run it.
> 
> Change-Id: I6cdfbb6df3c4fe30096b2715cad004bccec0bcaa
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214002
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Id8e9d8ccb79f5cae6d7af4a42dfbe514f77fc417
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214103
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 22:01:45 +00:00
Mike Klein
ab737e433a Revert "unguard SkFooEncoder.cpp"
This reverts commit 32c32b9a6c.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> unguard SkFooEncoder.cpp
> 
> We used to define SkFooEncoder::Encode() either
> here or as failing stubs in SkImageEncoder.cpp.
> 
> Now that we're not defining them in SkImageEncoder.cpp,
> we can lift these guards here.
> 
> Change-Id: Id916811225450e4c3a84f1e7f38ae510be1d6268
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214004
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,scroggo@google.com

Change-Id: I089a21d2fd4928969d956e47981a36efa71d9378
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214101
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 22:01:34 +00:00
Mike Klein
9509e04550 Revert "move encoders into codec_srcs"
This reverts commit 6a89611353.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> move encoders into codec_srcs
> 
> This is a stepping stone towards runtime registration.
> 
> This should work in concert with all the other CLs
> that are in the roll pipeline to get things building.
> 
> Change-Id: Id95f1e0bbea2f48f7b5fa438f4310f8db1d5b978
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214083
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,scroggo@google.com,brianosman@google.com

Change-Id: I4808404f0968e8a4deaf259a46e366152b7590fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214100
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 21:57:59 +00:00
Mike Klein
9098c28d92 Revert "format public.bzl"
This reverts commit f4c2c8e31b.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> format public.bzl
> 
> Change-Id: Ie92b366e5d6e6fcb99c56e80f34e315ad1be8831
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214093
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com

Change-Id: I66f11062ea21127e5d4c44eec932bd41f99d4f2d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214099
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 21:57:31 +00:00
Ethan Nicholas
f9ef1b893d fixed SkSL interpreter copying from nullptr
Bug: skia:
Change-Id: I15aa378cfd3c2425b111c639c25995c0e6ace634
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214063
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-05-15 21:23:47 +00:00
Mike Klein
f4c2c8e31b format public.bzl
Change-Id: Ie92b366e5d6e6fcb99c56e80f34e315ad1be8831
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214093
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-15 20:54:00 +00:00
Mike Klein
6a89611353 move encoders into codec_srcs
This is a stepping stone towards runtime registration.

This should work in concert with all the other CLs
that are in the roll pipeline to get things building.

Change-Id: Id95f1e0bbea2f48f7b5fa438f4310f8db1d5b978
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214083
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 20:40:57 +00:00
Ethan Nicholas
91164d1c01 added external value support to SkSL interpreter
Bug: skia:
Change-Id: I1806e1f6abaef322ecd3ba0d9bfaa9d7ca7a44c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212983
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-15 20:05:45 +00:00
Brian Salomon
fc1dddbb8d Reland "Get EGLimage functions out of GrGLInterface."
This reverts commit 753836fcad.

Reason for revert: fixed

Original change's description:
> Revert "Get EGLimage functions out of GrGLInterface."
>
> This reverts commit bc233135e4.
>
> Reason for revert:
> EGLImageTest and TextureBindingTest broken on Windows ANGLE
> Build failures on Debian9, unable to link
>   ld.lld: error: undefined symbol: eglCreateImageKHR
>
> Original change's description:
> > Get EGLimage functions out of GrGLInterface.
> >
> > Only used in test code which can just directly call these.
> >
> > Also removed related code in interface assemble/validate generator.
> >
> > Change-Id: I7e821ebb9328bdd2a54d8ab3af929399ca0517d5
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213480
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com
>
> Change-Id: I622fadf22c5d79f5b1d335a8a81455978d49a86a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213960
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com

EXTRA_TRYBOTS=Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE

Change-Id: I71397072fa79ae3c72f3835c5e991b9ef2465a9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214040
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-05-15 19:58:45 +00:00
Mike Klein
c2dd348e41 clean up some .gitignores
I'd be tempted to remove even another half of these,
but I'm not really clear on what they are.

Change-Id: Ib18f02d651f32d4437f55e79c2d05b5e34b0b1e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213844
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 19:55:45 +00:00
Chris Dalton
703fe686ad Silence a spurious GL error
glDeleteSamplers should silently ignore "zero" values, however they
are triggering GL errors on NVIDIA. This change removes those errors
from our debug output so we don't have to worry about them anymore.

Bug: skia:
Change-Id: I9ab634c8c0cc538a23ed68333f1bf137fa1fcd5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214010
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-05-15 19:46:45 +00:00
Mike Klein
32c32b9a6c unguard SkFooEncoder.cpp
We used to define SkFooEncoder::Encode() either
here or as failing stubs in SkImageEncoder.cpp.

Now that we're not defining them in SkImageEncoder.cpp,
we can lift these guards here.

Change-Id: Id916811225450e4c3a84f1e7f38ae510be1d6268
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214004
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 19:38:09 +00:00
Michael Ludwig
8ad0cbd34a Revert "Make createTestingOnlyBackendTexture and deleteTestingOnlyBackendTexture no longer be behind GR_TEST_UTILS"
This reverts commit 50a4e6e3b1.

Reason for revert: Chrome fails to compile:

../../third_party/skia/src/gpu/vk/GrVkGpu.cpp:143:29: error: allocating an object of abstract class type 'GrVkGpu'
    return sk_sp<GrGpu>(new GrVkGpu(context, options, backendContext, interface, instanceVersion,
                            ^
../../third_party/skia/src/gpu/GrGpu.h:405:30: note: unimplemented pure virtual method 'createTestingOnlyBackendTexture' in 'GrVkGpu'
    virtual GrBackendTexture createTestingOnlyBackendTexture(int w, int h, const GrBackendFormat&,
                             ^
../../third_party/skia/src/gpu/GrGpu.h:414:18: note: unimplemented pure virtual method 'deleteTestingOnlyBackendTexture' in 'GrVkGpu'
    virtual void deleteTestingOnlyBackendTexture(const GrBackendTexture&) = 0;
                 ^
../../third_party/skia/src/gpu/vk/GrVkGpu.cpp:1525:15: error: out-of-line definition of 'createTestingOnlyVkImage' does not match any declaration in 'GrVkGpu'
bool GrVkGpu::createTestingOnlyVkImage(GrPixelConfig config, int w, int h, bool texturable,
              ^~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/skia/src/gpu/vk/GrVkGpu.cpp:1893:27: error: out-of-line definition of 'createTestingOnlyBackendTexture' does not match any declaration in 'GrVkGpu'
GrBackendTexture GrVkGpu::createTestingOnlyBackendTexture(int w, int h,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/skia/src/gpu/vk/GrVkGpu.cpp:1933:15: error: out-of-line definition of 'deleteTestingOnlyBackendTexture' does not match any declaration in 'GrVkGpu'
void GrVkGpu::deleteTestingOnlyBackendTexture(const GrBackendTexture& tex) {
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Original change's description:
> Make createTestingOnlyBackendTexture and deleteTestingOnlyBackendTexture no longer be behind GR_TEST_UTILS
> 
> Change-Id: Iec44bc46aa2ab2899af3f6df130a93adf3f26e2a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213821
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: I6b234ae436842eb292c7a8a725c1a55f3f5fd440
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214061
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-05-15 19:32:11 +00:00
Mike Klein
017126fe1d skip runtime registration on iOS
These encoders and decoders are not built and linked
in Google3 iOS builds.  We just need to hack a bit to
get DM to build there... we never run it.

Change-Id: I6cdfbb6df3c4fe30096b2715cad004bccec0bcaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214002
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-15 18:59:27 +00:00
Mike Klein
8ae07c319d remove #if guards in SkAndroidCodec.cpp
I'm not sure I entirely understand what's going on here, but it looks
like these removed guards aren't needed?  Can you walk me through what
they're for?  I think they're getting in the way of runtime registered
codecs working with SkAndroidCodec.

Change-Id: I078bfb77797b4a3419f02a20d77d0aa8d7bce09d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213876
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2019-05-15 18:55:43 +00:00
Mike Klein
940c3f136d add runtime registration for encoders
If we want to make these external dependencies mix-and-match in Google3,
we'll need to group together the encoders and decoders, everything that
dependends on each external library.

I was tempted to try to remove these generic encoder entrypoints and
replace them with calls to the direct equivalents, but I'm not sure
that's necessary.  I think we can just register encoders like decoders.

Change-Id: I41d2d1bb3ceb1daafa62c95d345eb6a70249be75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213880
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-15 18:52:43 +00:00
Michael Ludwig
753836fcad Revert "Get EGLimage functions out of GrGLInterface."
This reverts commit bc233135e4.

Reason for revert:
EGLImageTest and TextureBindingTest broken on Windows ANGLE
Build failures on Debian9, unable to link
  ld.lld: error: undefined symbol: eglCreateImageKHR

Original change's description:
> Get EGLimage functions out of GrGLInterface.
>
> Only used in test code which can just directly call these.
>
> Also removed related code in interface assemble/validate generator.
>
> Change-Id: I7e821ebb9328bdd2a54d8ab3af929399ca0517d5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213480
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I622fadf22c5d79f5b1d335a8a81455978d49a86a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213960
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-05-15 17:45:48 +00:00
Brian Osman
b745129ceb Interpreter: Implement/fix vectorized load/store of globals
Also has swizzled loads of globals. Swizzle stores are still broken.

Change-Id: I0c01a309592c0aa460e1459de2636a2e1ef2ee6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213830
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-15 17:40:45 +00:00
Robert Phillips
50a4e6e3b1 Make createTestingOnlyBackendTexture and deleteTestingOnlyBackendTexture no longer be behind GR_TEST_UTILS
Change-Id: Iec44bc46aa2ab2899af3f6df130a93adf3f26e2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213821
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-05-15 17:40:44 +00:00
Mike Klein
9b2633e294 manually register codecs in DM
We'll want to do this when we've got Google3 refactored
to slice out each of these four codecs into its own little target.

Small tweaks to make SkPngCodec match the pattern of the rest.

Should be harmless to have both the compile-time and runtime
registration, right?

Change-Id: Ic72394764ac267758dc1023e85f3d0c4b655d420
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213872
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 17:03:09 +00:00
Brian Salomon
bc233135e4 Get EGLimage functions out of GrGLInterface.
Only used in test code which can just directly call these.

Also removed related code in interface assemble/validate generator.

Change-Id: I7e821ebb9328bdd2a54d8ab3af929399ca0517d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213480
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-15 16:29:18 +00:00
Mike Klein
945d1e538c simplify rtree loops in Skia too
Sorry for yanking you around on whether on not this is worth doing.
Seems like SkRTrees are going to stick around for now for Flutter,
so I think we might as well keep both implementations up to date.

This ripples out a little further than in Chromium, as the math we're
deleting here was the only use of the aspect ratio of the passed-in
bounds, that itself the only use of those bounds themselves.  So we can
un-plumb all that too.  I'd still like to see how much we can minimize
the need for those user-provided bounds at all, especially when we're
calculating them all here.

Change-Id: Iea07e8e3d23a4dd31da8bcde512b24caabc96a10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213840
Reviewed-by: James Bankoski <jimbankoski@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 15:42:10 +00:00
Ben Wagner
6bb79bbfdc Add SkShaper which just shapes.
This adds and SkShaper which doesn't wrap or re-order. This allows for
users to write their own implementations of shape-then-wrap logic.

Change-Id: I8bd8931ac9534c33883fc303be25f379c02da4b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213829
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-15 15:37:08 +00:00
Ben Wagner
21bca28bda Move SkMessageBus.h into src/core
Not used by anything else in the include directory, probably don't want
to accidentially expose it either.

Change-Id: I50d255e2cac43d8405305a825fd194bb36edd8fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213826
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-15 15:33:48 +00:00
Michael Ludwig
6e17f1d4d1 Revert "Clear and discard stencil buffers on tilers"
This reverts commit 7b2c85577d.

Reason for revert: nanobench hangs on chromebook bots during mipmap regeneration

Original change's description:
> Clear and discard stencil buffers on tilers
>
> Bug: skia:
> Change-Id: I42e99cb75567825ac7751fc0ec56e4c45132628b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210425
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com

Change-Id: I69e04c4797b6bde934d86c83bf0348c8abadcfc3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213824
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-05-15 15:17:19 +00:00
Robert Phillips
1f09898e9a Add GrVkFormatIsCompressed and GrVkFormatCompressedDataSize to rm uses of GrPixelConfig
Bug: skia:6718
Change-Id: Ib0b0d2800e5c6d7e1b74a89ebe0a4d9ef6dbf4b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213827
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-15 14:59:07 +00:00