Commit Graph

46543 Commits

Author SHA1 Message Date
John Rosasco
7475ac0d37 Add validation layer support.
Change-Id: I74bd02180d01504faf6f22e9c2b8c4de179e46f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269510
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-10 14:57:19 +00:00
skia-autoroll
6b552161a8 Roll ../src d7612decf133..437a856b0a5d (508 commits)
d7612decf1..437a856b0a


Created with:
  gclient setdep -r ../src@437a856b0a

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 stani@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: stani@google.com
Change-Id: I567d510422d76177d6a0abfe8fb64b136a9221a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269716
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-10 04:52:29 +00:00
skia-autoroll
8fa935ee78 Roll third_party/externals/angle2 e02f4996c6e9..a8e6a463121b (8 commits)
e02f4996c6..a8e6a46312

git log e02f4996c6e9..a8e6a463121b --date=short --first-parent --format='%ad %ae %s'
2020-02-09 jmadill@chromium.org Suppress Vulkan RobustResourceInit tests.
2020-02-09 b.schade@samsung.com Change g_Mutex from std::mutex to std::recursive_mutex
2020-02-08 cnorthrop@google.com Capture/Replay: Add 2DArray and 3D texture support for MEC
2020-02-08 jmadill@chromium.org Make Debug marker functions return angle::Result.
2020-02-07 jmadill@chromium.org Vulkan: Clamp vertex buffer offsets.
2020-02-07 jmadill@chromium.org Vulkan: Add missing wrapper functions for XFB.
2020-02-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 1f03ac10270a..fe10239f92f4 (1 commits)
2020-02-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 656650f461c8..95c414ffee64 (2 commits)

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

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 stani@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: stani@google.com
Change-Id: I33a6d40f4f8908792c29014029a27ecece5e340d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269717
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-10 04:45:09 +00:00
skia-autoroll
07b4ce2b23 Roll third_party/externals/swiftshader dd48b7e2d06e..b3b2a4fc756f (11 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/dd48b7e2d06e..b3b2a4fc756f

git log dd48b7e2d06e..b3b2a4fc756f --date=short --first-parent --format='%ad %ae %s'
2020-02-08 bclayton@google.com Fix Android build: Add missing .cpp to Android.bp
2020-02-08 amaiorano@google.com Subzero: fix cosh/sinh deqp failures
2020-02-08 amaiorano@google.com ReactorUnitTests: fix clang-format messing up test suites
2020-02-08 bclayton@google.com Reactor: Copy System/Debug code to Reactor copy
2020-02-08 bclayton@google.com SpirvShaderDebugger: Ignore non-statements
2020-02-07 bclayton@google.com Debug: Control logging level using a compile time knob
2020-02-07 bclayton@google.com Fix chromium build.
2020-02-07 bclayton@google.com Debugging: Merge VkDebug into System/Debug
2020-02-07 bclayton@google.com VkDebug: Android - log messages to logcat.
2020-02-07 bclayton@google.com ReactorBenchmarks: Sweep coroutine perf.
2020-02-07 bclayton@google.com vscode: Add third_party/benchmark to include dirs

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

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 stani@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: stani@google.com
Change-Id: Id3bcddb3125e073eb6d4c6fc6bddc39eb5346a8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269718
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-10 04:36:09 +00:00
skia-recreate-skps
be7a92c487 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: I16375f352411cbb5a23d4c09c6c74426914bb766
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269658
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-02-09 08:30:26 +00:00
Stephen White
c03e6982f9 GrTessellator: fix for performance issue on many intersections.
On some paths with many self-intersections, performance can approach
O(N^2) in intersections, due to
"GrTessellator: always rewind to edge top when splitting",
aka b67b2354cf.

This patch reverts that change, brings back rewind_if_necessary(), and
fixes the underlying issue by continuing to rewind past any AEL
violations.

Bug: 1030306
Change-Id: I64cea1d09bf383c245a5fd2ddb6569b4041b6638
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269238
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-02-08 05:00:34 +00:00
Brian Osman
8c80b19936 Interpreter: Support returns from runStriped
Change-Id: Id84c3fb35cb61fa839691471d03a44152964bedb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268941
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-08 02:09:04 +00:00
Florin Malita
8dad1ffd81 [sksg] Improved layer elision heuristic
We can skip effect layers when none of the child nodes overlap (treat as
atomic draws, with effects applied on their paint).

The initial heuristic was simply checking for more than one child.

This version relaxes the heuristic to check each child bounds against
the union of preceding siblings.

Change-Id: I2dc6d30d945697f410100db0c46a8a8377d5b569
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269482
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-02-07 23:20:34 +00:00
Lam Lu
a9405c2a29 Compress color using hex instead of rgb in SkSVGDevice.
By using hex color instead of RGB in SkSVGDevice, SVG byte size can be
reduced. For example, Quora landing page SVG size: 1588515 bytes (RGB)
vs. 1587899 bytes (Hex). Size reduces by 616 bytes.

Bug: NONE
Test: dm -v --match SVGDevice
Change-Id: I1d557c9d8a925c2dde96899e23833dfb89264903
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269260
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-07 22:48:34 +00:00
Greg Daniel
e810d839a1 Use views where needed in CCPR.
Bug: skia:9556
Change-Id: Ib8c97a85ff76d3b2a9b501c2372f60e851cee46f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269479
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-02-07 22:48:14 +00:00
Joe Gregorio
dff41733f9 Revert "fiddle - Don't make warnings into errors."
This reverts commit b2031d4255.

Reason for revert: Breaks fiddle.

Original change's description:
> fiddle - Don't make warnings into errors.
> 
> Bug: skia:
> Change-Id: I01327003aa6a674dda9f8959fa69a386d0c017a8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/183982
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Auto-Submit: Joe Gregorio <jcgregorio@google.com>

TBR=rmistry@google.com,jcgregorio@google.com

Change-Id: If85a7da4a523277208d197dc01e534aec2cc6d67
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269490
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2020-02-07 21:39:38 +00:00
Joe Gregorio
ae797958a5 Remove all the bookmaker generated docs.
Bug: skia:9787
Change-Id: I71ba5e0f31be28fdf8c56794918e4689ceae3cbf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269485
Auto-Submit: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2020-02-07 21:36:23 +00:00
Mike Klein
dfec731dbf build both tsan and msan libc++
std::call_once() will trigger false positive races without
a libc++ (specifically __call_once()) built with TSAN itself.

Interestingly, there's a built-in interceptor for this
use case, only on Mac: https://reviews.llvm.org/D24188.

Fixes: skia:9884
Change-Id: I7b2c031c15b78ec7302c42b4e4ac365d596c2c33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265567
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
2020-02-07 21:33:03 +00:00
Joe Gregorio
b2031d4255 fiddle - Don't make warnings into errors.
Bug: skia:
Change-Id: I01327003aa6a674dda9f8959fa69a386d0c017a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/183982
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Auto-Submit: Joe Gregorio <jcgregorio@google.com>
2020-02-07 21:08:27 +00:00
Chris Dalton
a550cf2e40 Extract a GrDynamicAtlas base class from GrCCAtlas
Change-Id: I85fd3a3ccc34b5616a75e2c7ddcc33af18809144
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268723
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-07 21:05:04 +00:00
Weston Tracey
1b14aa25a3 [infra] Reland "Use ccache for linux default builds."
This reverts commit 5e27550437.

Reason for revert: Will be modified with fix.

Original change's description:
> Revert "Use ccache for linux default builds."
>
> This reverts commit 9f3eef796f.
>
> Reason for revert: breaking https://chromium-swarm.appspot.com/tasklist?f=sk_name%3AHousekeeper-PerCommit-CheckGeneratedFiles
>
> Original change's description:
> > Use ccache for linux default builds.
> >
> > Change-Id: I6bd2439c59f165d56f093185aba818d186b62761
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268903
> > Commit-Queue: Weston Tracey <westont@google.com>
> > Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
>
> TBR=benjaminwagner@google.com,westont@google.com
>
> Change-Id: I3c5a8f456d03c880a24294e61ae116bd5a1e3db8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269481
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=benjaminwagner@google.com,scroggo@google.com,westont@google.com

Change-Id: I6937e44421d8705ca80649bc7df474944d7206bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269483
Commit-Queue: Weston Tracey <westont@google.com>
Reviewed-by: Weston Tracey <westont@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
2020-02-07 20:58:23 +00:00
Brian Osman
7353dc5490 Change SkSL main() from (float x, float y) to (float2 p)
Change-Id: Id046199edd63535ef07e1dfa65fbc7c0f8cefd00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269371
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-07 20:19:13 +00:00
Leon Scroggins
5e27550437 Revert "Use ccache for linux default builds."
This reverts commit 9f3eef796f.

Reason for revert: breaking https://chromium-swarm.appspot.com/tasklist?f=sk_name%3AHousekeeper-PerCommit-CheckGeneratedFiles

Original change's description:
> Use ccache for linux default builds.
> 
> Change-Id: I6bd2439c59f165d56f093185aba818d186b62761
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268903
> Commit-Queue: Weston Tracey <westont@google.com>
> Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>

TBR=benjaminwagner@google.com,westont@google.com

Change-Id: I3c5a8f456d03c880a24294e61ae116bd5a1e3db8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269481
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-02-07 20:09:43 +00:00
Brian Salomon
a56a746b7e Remove GrSurfaceDesc
Replace with SkISize.
Also change some const SkISize& params to just SkISize.

Change-Id: I3c72d961662eefeda545fba17d63e877cd5ca813
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269374
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-07 19:48:13 +00:00
Leon Scroggins III
42a604f431 Allow decoding without color conversion - part 2
Bug: b/135133301

Follow-on to 196f319b.

- Add SkCodec::getICCProfile to match the SkAndroidCodec version.
- Update comments on getPixels() regarding how the SkColorSpace on the
SkImageInfo is treated.
- Add two new images that have ICC profiles that do not map to an
SkColorSpace. Add a test to verify that they have the un-transformed
color we expect.
- Stop uploading ColorCodecSrc images decoded to a null SkColorSpace to
Gold. Though they may be correct, they do not match other images they're
compared against. The new test above verifies that we do not do color
conversion with a null SkColorSpace.

Change-Id: I08635e4262f16500fab32ef97511d305c2c06483
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269236
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-02-07 19:24:33 +00:00
Michael Ludwig
949ceb249f Add ClipToW0 utility function for GrQuads,
and improve perspective handling in rest of quad pipeline

This function produces 0, 1, or 2 quads clipped to w > 0, with proper
local coords. To make its signature a little easier to reason about,
I added a simple 'DrawQuad' struct that represents the combination of
device and local coordinates, and edge AA flags. I am open to suggestions
for the name.

GrQuad::bounds() remains perspective aware so that it is always correct.
I updated CropToRect to check for w < 0 and not attempt to crop in that
scenario. Theoretically, we could clip to w = 0 first and then go through
the CropToRect optimization path. However, with the current state of the
GrFillRectOp and GrTextureOp, that made it more annoying to have the bulk
APIs handle the w clipping as well.

So for now, the w plane clipping is entirely the responsibility of the
ops. A benefit of this approach is that GrRenderTargetContext doesn't need
to be modified, and in the case where the clipping produces 2 quads they
are automatically put in the same op w/o going through any batching code.

However, it is becoming clear to me that managing 4 effective code paths
(fill + texture X simple + bulk API) is more maintenance than it's worth.
I added skbug:9869 to work out how to simplify these op creation APIs further,
and if we succeed there, I think it will make applying the W plane clipping
more convenient as well.

For now, since this affects SkiaRenderer on Linux stable, I am pushing
for correctness.

Bug: skia:9779, chromium:224618
Change-Id: I4218a956cbe0bbc2b5c9cf133a069d54c93848e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268686
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-07 19:06:51 +00:00
Brian Osman
788b91678f Remove SkTMin and SkTMax
Use std::min and std::max everywhere.

SkTPin still exists. We can't use std::clamp yet, and even when
we can, it has undefined behavior with NaN. SkTPin is written
to ensure that we return a value in the [lo, hi] range.

Change-Id: I506852a36e024ae405358d5078a872e2c77fa71e
Docs-Preview: https://skia.org/?cl=269357
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269357
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-07 18:40:09 +00:00
Jim Van Verth
3a17a32305 Reset current context on Mac GLContext destruction.
Looks like the OS now holds on to the current GL context and doesn't
release it unless explicitly told to.

Bug: skia:9885
Change-Id: Ic7bc6860ec96d88e278682b7f2f67e1ac365d27b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269369
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
2020-02-07 18:20:28 +00:00
Brian Osman
46b2b00584 Fix bump3d use of sample()
Change-Id: I75d7a4bdbfb2a5d22b85bca0cae2975378b19a53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269365
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-07 17:36:58 +00:00
Chris Dalton
d2e4de1c33 Add a fast codepath for SkPath.addPath(kAppend)
Change-Id: I49469f29cc10032d687b938ded379ef7e2f52da2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269190
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-02-07 17:01:29 +00:00
Weston Tracey
9f3eef796f Use ccache for linux default builds.
Change-Id: I6bd2439c59f165d56f093185aba818d186b62761
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268903
Commit-Queue: Weston Tracey <westont@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
2020-02-07 16:42:28 +00:00
Greg Daniel
2f3cd4ff2b Views for all draw texture calls in SkGpuDevice and RenderTargetContext.
Bug: skia:9556
Change-Id: Ibb0e0cff3301554e988d5900455766b6428484ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269360
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-02-07 16:39:38 +00:00
Stephen White
511af2e086 Skia-Dawn: update to new GrGLSLProgramBuilder constructor.
Change-Id: I9b5929bbfea046e3ca7df45de2507536f12b3cf9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269359
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-02-07 16:31:08 +00:00
Mike Klein
4bb619554e move instruction specialization later
This adds a specialization pass to Builder::optimize() and moves the
x86-specific _imm ops there, rewriting with the Builder API itself.  I'm
only using the private Builder::push() call for the moment, but that's
enough to make me feel confident that this is a good way forward:  it's
still all going through CSE that way.

We're still doing this any time we're on x86, not when targeting the
JIT, but that'll come next, see the new TODOs.  It's mildly better for
the interpreter to not use the _imm ops, but this is really all still
warmup for optimizations with less mild opinions.

I'm not proud of the switch/goto impl but it's the clearest I found.

Change-Id: I30594b403832343528b95967724fd50324cd79d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269232
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-07 16:21:08 +00:00
Michael Ludwig
7c6a4a898b Simplify domain insetting for bulk texture ops
Previously, the normalization, origin flip, and insetting occurred
simultanesouly. The problem was that whether or not the insetting
was needed had a cyclic dependency with the overall filter level
(not known until the end of the loop). So it had an ugly hack that
kept track of the early appended quads and would update their domains
if needed.

This will no longer work when perspective clipping is implemented because
we won't have a 1-1 mapping from quads+viewcount pairs back to the
texture set entries. However, by splitting the insetting out from the
rest of the normalization step, we can defer it until we're in
onPrePrepare w/o losing any optimization capabilities and scales with
the perspective clipping change in the future. It should also make it
easier to upgrade an op from kNearest to kBilerp in onCombineIfPossible
because the prior op will not have applied the bilerp-insetting yet.

Bug: skia:9779
Change-Id: I71b269730de200b8452e2a6b39b777928967f621
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269151
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-07 16:05:48 +00:00
Stephen White
b185785499 Reland "Cleanup program building a bit"
This reverts commit 77fdf66946.

Reason for revert: Skia-Dawn breakage should not be a tree closer.

Original change's description:
> Revert "Cleanup program building a bit"
> 
> This reverts commit 4777e3adde.
> 
> Reason for revert: This CL is breaking the build on Linux FYI SkiaRenderer Dawn Release 
> 
> Original change's description:
> > Cleanup program building a bit
> > 
> > This CL:
> >    now passes the GrProgramDesc as a const&
> >    returns GrGLProgram as an sk_sp
> >    makes the parameter ordering more consistent
> >    makes GrVkPipelineState no longer ref-counted
> > 
> > This is pulled out of the DDL pre-compile CL which touches this portion of the code.
> > 
> > Bug: skia:9455
> > Change-Id: Id4d06f93450e276de5a2662be330ae9523026244
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268777
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> 
> TBR=egdaniel@google.com,robertphillips@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: skia:9455
> Change-Id: I7019d9876b68576274e87c3b2e6bbbf9695522ba
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269261
> Reviewed-by: Austin Eng <enga@google.com>
> Reviewed-by: Kenneth Russell <kbr@google.com>
> Reviewed-by: Stephen White <senorblanco@chromium.org>
> Commit-Queue: Stephen White <senorblanco@chromium.org>
> Auto-Submit: Austin Eng <enga@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,senorblanco@chromium.org,kbr@google.com,enga@google.com

Change-Id: I62f6d38a8ac351e411f4605425caec3b4783fd70
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269358
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-02-07 15:33:38 +00:00
Michael Ludwig
6b45c5d3da Use DrawQuad struct to group device+local coords
This is part of a series to make it easier to manipulate the device and
local coordinates as the ops are being created. By instantiating a
single DrawQuad and allowing the functions to avoid having to copy the
GrQuads before making modifications (e.g. cropping, normalization,
or perspective clipping).

Bug: skia:9779
Change-Id: I0c6eefaee10638bc7483049d1993addeddc97005
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269141
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-07 15:25:58 +00:00
Brian Osman
87e3bef6f8 Reland "Switch runtime SkSL to always sample at explicit coords"
This reverts commit d4bf54eac6.

Change-Id: I65bfea4d880de29394e25d44d781fd18508fe337
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266942
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-07 14:39:29 +00:00
Brian Osman
f4413d6595 Roll libgifcodec
Change-Id: I2a6819fe7e39da2fea5168837f9562a13fba5e60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269356
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-07 14:14:58 +00:00
Austin Eng
77fdf66946 Revert "Cleanup program building a bit"
This reverts commit 4777e3adde.

Reason for revert: This CL is breaking the build on Linux FYI SkiaRenderer Dawn Release 

Original change's description:
> Cleanup program building a bit
> 
> This CL:
>    now passes the GrProgramDesc as a const&
>    returns GrGLProgram as an sk_sp
>    makes the parameter ordering more consistent
>    makes GrVkPipelineState no longer ref-counted
> 
> This is pulled out of the DDL pre-compile CL which touches this portion of the code.
> 
> Bug: skia:9455
> Change-Id: Id4d06f93450e276de5a2662be330ae9523026244
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268777
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

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

Bug: skia:9455
Change-Id: I7019d9876b68576274e87c3b2e6bbbf9695522ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269261
Reviewed-by: Austin Eng <enga@google.com>
Reviewed-by: Kenneth Russell <kbr@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Austin Eng <enga@google.com>
2020-02-07 13:37:48 +00:00
skia-autoroll
f3560b680e Roll ../src fbfe7df1b1d4..d7612decf133 (2570 commits)
fbfe7df1b1..d7612decf1


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

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 scroggo@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: scroggo@google.com
Change-Id: I7660a23168e4d1e975116d070e59c9643a382872
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269303
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-07 05:17:31 +00:00
skia-autoroll
97bf657879 Roll third_party/externals/angle2 e9dc0201af3a..e02f4996c6e9 (4 commits)
e9dc0201af..e02f4996c6

git log e9dc0201af3a..e02f4996c6e9 --date=short --first-parent --format='%ad %ae %s'
2020-02-06 cnorthrop@google.com Vulkan: Pass correct level count in getLevelDrawImageView
2020-02-06 spang@chromium.org Fuchsia: Fix size & position of test window on Scenic
2020-02-06 jmadill@chromium.org Make TransformFeedbackTest deterministic.
2020-02-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src b932cf53f769..c731adec183b (4 commits)

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

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 scroggo@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: scroggo@google.com
Change-Id: Ie967ff28a856e970ef0d8c3599c5493d96106ef6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269298
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-07 04:45:27 +00:00
Weston Tracey
046f9893b9 Add ccache_mac cipd package scripts.
Change-Id: If71fc5fe27b4cf60cf963fff86d3e6a8224bf853
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269150
Auto-Submit: Weston Tracey <westont@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
2020-02-06 22:00:57 +00:00
Greg Daniel
c7672092e8 Have gpu yuv code speak in views.
Bug: skia:9556
Change-Id: Iaa071d53248dfcd6d9e1bd88b24c8b39e133ced2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269148
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-02-06 21:47:02 +00:00
Chris Dalton
f51a52bf09 Convert DIRTY_AFTER_EDIT to SkPath::dirtyAfterEdit
Change-Id: I0394f0956c0589597ce910f4c0ad9f44bf4ee05e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269194
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-02-06 21:42:37 +00:00
Brian Salomon
4bb5026301 Return after callback on failure in GrRenderTargetContext::asyncReadPixels
Bug: chromium:1048251
Change-Id: I9c18e55fd791adbf446aa776de297b857af22b64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269237
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-06 21:41:57 +00:00
Ben Wagner
121750c2ef Remove extra semicolon
Causes a warning-treated-as-error with Chromium's Clang.

Change-Id: Idd3b6492fe2a532eca387f571cc2f9b6796d07df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269196
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-06 21:19:47 +00:00
Greg Daniel
ee72bd921a Add move assignment operator to GrSurfaceProxyView.
Bug: skia:9556
Change-Id: I3928a3f3350b222bda429195dc7115b9303d9598
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269199
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-02-06 21:10:25 +00:00
Brian Osman
ab2f7c5720 Reland "In GrSkSLFP, always use a coord transform"
This reverts commit fd7fd960be.

Change-Id: Id0f39dfd906f24e5c5eb054a28fc8e96ef73835e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267036
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-06 20:38:33 +00:00
Brian Osman
5f3d9f76c9 Replace usage of SkTClamp with SkTPin
I prefer the SkTClamp spelling, but there were 4 uses vs. ~200. And
eventually we'll replace all of these with std::clamp anyway.

Change-Id: I418fce5080d089745c3f9eb42c36e3fc7962c895
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269155
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-06 20:34:13 +00:00
Mike Klein
c90a8c72af calculate program hash in bulk
Now that Builder::Instructions are dense, it's easier to just calculate
Builder::hash() all at once when requested rather than as we go along.

(I'm planning to move the other use of Builder::Instruction hashing to
optimize() later too.)

Change-Id: I3124da5a3905291a907d08a12f62e794ed88e92d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269184
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-02-06 20:27:53 +00:00
Mike Klein
ed9b1f1c1e refactor out a middle representation
Kind of brewing a big refactor here, to give me some room between
skvm::Builder and skvm::Program to do optimizations, bakend
specializations and analysis.

As a warmup, I'm trying to split up today's Builder::Instruction into
two forms, first just what the user requested in Builder (this stays
Builder::Instruction) then a new type representing any transformation or
analysis we've done to it (OptimizedInstruction).

Roughly six important optimizations happen in SkVM today, in this order:
   1) constant folding
   2) backend-specific instruction specialization
   3) common sub-expression elimination
   4) reordering + dead code elimination
   5) loop invariant and lifetime analysis
   6) register assignment

At head 1-5 all happen in Builder, and 2 is particularly
awkward to have there (e.g. mul_f32 -> mul_f32_imm).
6 happens in Program per-backend, and that seems healthy.

As of this CL, 1-3 happen in Builder, 4-5 now on this middle
OptimizedInstruction format, and 6 still in Program.

I'd like to get to the point where 1 stays in Builder, 2-5 all happen on
this middle IR, and 6 stays in Program.  That ought to let me do things
like turn mul_f32 -> mul_f32_imm when it's good to and still benefit
from things like common sub-expression elimination and code reordering
happening after that trnasformation.

And then, I hope that's also a good spot to do more complicated
transformations, like lowering gather8 into gather32 plus some fix up
when targeting an x86 JIT but not anywhere else.  Today's Builder is too
early to know whether we should do this or not, and in Program it's
actually kind of awkward to do this sort of thing while also doing
having to do register assignment.  Some middle might be right.

Change-Id: I9c00268a084f07fbab88d05eb441f1957a0d7c67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269181
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-06 20:09:53 +00:00
Brian Osman
762b42ff73 Remove SkClampMax
Change-Id: I9709dfdfd6069d46c331d08e181e36cc9a21e71a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269149
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-06 19:49:53 +00:00
Julia Lavrova
c0360582d2 Cache should work with INF values
Change-Id: I1ae8d95bb85d28fdce9e0cf270583f0224e4dfed
Bug: skia:9874
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268938
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-02-06 19:44:43 +00:00
recipe-roller
2bc603196a Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (recipe_engine) into this repository.

recipe_engine:
  https://crrev.com/9cc10f207c74c1a1d2b5a34436cb21a5dcc57d92 (tandrii@google.com)
    Refactor tryserver.do_not_retry into cq.do_not_retry.

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: Icea2fe76148902cedf7267a4c159420e7997bf24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269177
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-06 19:32:51 +00:00