Commit Graph

11795 Commits

Author SHA1 Message Date
Ben Wagner
e54df3563d Explicitly cast ints in SkSTArray.
The compiler can complain about these signed to unsigned conversions.
Explicitly cast them in initWithPreallocatedStorage to match the way
this is already done in init [0].

[0] 311b648013 "pack SkTArray"

Change-Id: I0f723094fd356f9c5971b35998c4ecd59c09332f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536099
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-05-02 20:48:30 +00:00
Kevin Lubick
c3a448ec61 [bazel] Put licenses() after legacy_exports
G3 prefers license() first.

This was done mechanically with a big find/replace

Change-Id: I8c33c7bc10a6bec42e966cad81c259954e841811
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535898
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-05-02 15:04:33 +00:00
Kevin Lubick
fe01e985a7 Reland "Reland "[includes] Remove SkColorSpace include from SkImageInfo""
This is a reland of commit 00de8cc000

New client fixes:
 - http://cl/445903108

Original change's description:
> Reland "[includes] Remove SkColorSpace include from SkImageInfo"
>
> This is a reland of commit 2151fa37fa
>
> New client fixes:
>  - https://crrev.com/c/3616345
>
> Original change's description:
> > [includes] Remove SkColorSpace include from SkImageInfo
> >
> > See also https://skia-review.googlesource.com/c/skia/+/525639
> >
> > This should be landed when clients have been fixed.
> >  - https://github.com/flutter/engine/pull/32532
> >  - https://github.com/flutter/engine/pull/32382
> >  - http://cl/438808657
> >  - http://cl/438803822
> >  - http://cl/438807456
> >  - http://cl/438808026
> >  - http://cl/438821192
> >  - https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17542295
> >
> > Change-Id: I04beeb2e2b6132c40508c98f4f281981dadbb0d4
> > Bug: skia:13052
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526416
> > Commit-Queue: Kevin Lubick <kjlubick@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> Canary-Chromium-CL: 3616345
> Bug: skia:13052
> Change-Id: I670d3d0d0bab2a86559d9a1184cb36ef008196f3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535357
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:13052
Change-Id: Ibb931dde3f0846609df35d2897989eff0499b7f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535896
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-05-02 13:33:21 +00:00
Brian Osman
05dd660fee Revert "Reland "[includes] Remove SkColorSpace include from SkImageInfo""
This reverts commit 00de8cc000.

Reason for revert: G3 Breakage?

Original change's description:
> Reland "[includes] Remove SkColorSpace include from SkImageInfo"
>
> This is a reland of commit 2151fa37fa
>
> New client fixes:
>  - https://crrev.com/c/3616345
>
> Original change's description:
> > [includes] Remove SkColorSpace include from SkImageInfo
> >
> > See also https://skia-review.googlesource.com/c/skia/+/525639
> >
> > This should be landed when clients have been fixed.
> >  - https://github.com/flutter/engine/pull/32532
> >  - https://github.com/flutter/engine/pull/32382
> >  - http://cl/438808657
> >  - http://cl/438803822
> >  - http://cl/438807456
> >  - http://cl/438808026
> >  - http://cl/438821192
> >  - https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17542295
> >
> > Change-Id: I04beeb2e2b6132c40508c98f4f281981dadbb0d4
> > Bug: skia:13052
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526416
> > Commit-Queue: Kevin Lubick <kjlubick@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> Canary-Chromium-CL: 3616345
> Bug: skia:13052
> Change-Id: I670d3d0d0bab2a86559d9a1184cb36ef008196f3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535357
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:13052
Change-Id: Ie2d036f0bfcdb481c4227a6d567e38d527c81168
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535202
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-29 22:17:12 +00:00
Brian Salomon
c8ee7b1384 Reland "Reland "Add anisotropic option to SkSamplingOptions.""
This is a reland of commit e6f23f98de

Original change's description:
> Reland "Add anisotropic option to SkSamplingOptions."
>
> This is a reland of commit 9be2d572d4
>
> Original change's description:
> > Add anisotropic option to SkSamplingOptions.
> >
> > Implement on GPU.
> >
> > Bug: skia:13036
> > Change-Id: I35d760596c4f8faaec27fccf284b70802fcf3f9b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524757
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
>
> Bug: skia:13036
> Change-Id: I3e411aae389dc880ce32bba78852705059fb88b0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535197
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13036
Change-Id: Icb2513cea6c4ec4cec934f78c66071081c232960
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535437
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-29 19:28:52 +00:00
Kevin Lubick
46eaab3959 [bazel] Add shims to help translation into G3
Ran the following commands:
find -name "BUILD.bazel" -exec sed -i -e '1iload("//bazel:macros.bzl", "cc_library", "exports_files_legacy")\nexports_files_legacy()' {} +
buildifier --lint=fix --mode=fix -r .

This had the effect of making sure we can export all of our
files in G3 (until we no longer have legacy targets) and
making all of our cc_libraries shim-able.

bazel/macros.bzl has the human-contributed changes, the rest
were mechanical.

Change-Id: I8e24e30e74b038cfd072cdbe4078bfd1d213dd46
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535359
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-29 19:27:54 +00:00
John Stiles
59c906795c Remove InlineMarker IR node.
This node was only used to detect recursion while inlining. We no longer
need to do this, because we disallow recursion in all programs.

The removal of one IRNode per inlined function actually allows for
slightly more aggressive inlining, since we restrict inlining based on
IRNode consumption. This allows the "ExponentialGrowth" tests to inline
a bit more deeply than before.

Change-Id: I894dbb1ca3096bb785b67facb01cc9c630f694c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534780
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-29 17:40:58 +00:00
Kevin Lubick
00de8cc000 Reland "[includes] Remove SkColorSpace include from SkImageInfo"
This is a reland of commit 2151fa37fa

New client fixes:
 - https://crrev.com/c/3616345

Original change's description:
> [includes] Remove SkColorSpace include from SkImageInfo
>
> See also https://skia-review.googlesource.com/c/skia/+/525639
>
> This should be landed when clients have been fixed.
>  - https://github.com/flutter/engine/pull/32532
>  - https://github.com/flutter/engine/pull/32382
>  - http://cl/438808657
>  - http://cl/438803822
>  - http://cl/438807456
>  - http://cl/438808026
>  - http://cl/438821192
>  - https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17542295
>
> Change-Id: I04beeb2e2b6132c40508c98f4f281981dadbb0d4
> Bug: skia:13052
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526416
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Canary-Chromium-CL: 3616345
Bug: skia:13052
Change-Id: I670d3d0d0bab2a86559d9a1184cb36ef008196f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535357
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-04-29 14:56:15 +00:00
Brian Salomon
022334eaa7 Revert "Reland "Add anisotropic option to SkSamplingOptions.""
This reverts commit e6f23f98de.

Reason for revert: skps busted

Original change's description:
> Reland "Add anisotropic option to SkSamplingOptions."
>
> This is a reland of commit 9be2d572d4
>
> Original change's description:
> > Add anisotropic option to SkSamplingOptions.
> >
> > Implement on GPU.
> >
> > Bug: skia:13036
> > Change-Id: I35d760596c4f8faaec27fccf284b70802fcf3f9b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524757
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
>
> Bug: skia:13036
> Change-Id: I3e411aae389dc880ce32bba78852705059fb88b0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535197
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13036
Change-Id: I583704990e4690ddd86923468c8cb742c1a819c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535402
Auto-Submit: Brian Salomon <bsalomon@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-29 14:35:04 +00:00
Brian Salomon
e6f23f98de Reland "Add anisotropic option to SkSamplingOptions."
This is a reland of commit 9be2d572d4

Original change's description:
> Add anisotropic option to SkSamplingOptions.
>
> Implement on GPU.
>
> Bug: skia:13036
> Change-Id: I35d760596c4f8faaec27fccf284b70802fcf3f9b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524757
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

Bug: skia:13036
Change-Id: I3e411aae389dc880ce32bba78852705059fb88b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535197
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-29 14:18:22 +00:00
Kevin Lubick
cadb3a33e1 Revert "[includes] Remove SkColorSpace include from SkImageInfo"
This reverts commit 2151fa37fa.

Reason for revert: Breaking Chrome

Original change's description:
> [includes] Remove SkColorSpace include from SkImageInfo
>
> See also https://skia-review.googlesource.com/c/skia/+/525639
>
> This should be landed when clients have been fixed.
>  - https://github.com/flutter/engine/pull/32532
>  - https://github.com/flutter/engine/pull/32382
>  - http://cl/438808657
>  - http://cl/438803822
>  - http://cl/438807456
>  - http://cl/438808026
>  - http://cl/438821192
>  - https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17542295
>
> Change-Id: I04beeb2e2b6132c40508c98f4f281981dadbb0d4
> Bug: skia:13052
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526416
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:13052
Change-Id: I8a9108a333eebefdfa864c757d8c395a6b59335c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535296
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
2022-04-28 22:56:15 +00:00
James Godfrey-Kittle
f9c89a443d [graphite] Add UploadBufferManager class.
This class manages and suballocates buffers used to upload textures. It
maintains a reusable, suballocated buffer for small allocations, and
creates dedicated buffers for any allocation larger than its set
reusable buffer size.

Change-Id: If7877faed870afbc85635ae47553000fa3487aba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534941
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-04-28 20:59:14 +00:00
Kevin Lubick
2151fa37fa [includes] Remove SkColorSpace include from SkImageInfo
See also https://skia-review.googlesource.com/c/skia/+/525639

This should be landed when clients have been fixed.
 - https://github.com/flutter/engine/pull/32532
 - https://github.com/flutter/engine/pull/32382
 - http://cl/438808657
 - http://cl/438803822
 - http://cl/438807456
 - http://cl/438808026
 - http://cl/438821192
 - https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17542295

Change-Id: I04beeb2e2b6132c40508c98f4f281981dadbb0d4
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526416
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-04-28 20:48:11 +00:00
Kevin Lubick
62f57a02b3 [includes] Enforce IWYU on src/utils
Client changes:
 - cl/443664347
 - cl/444232853
 - http://ag/17915718
 - http://ag/17913178
 - https://crrev.com/c/3602239

Change-Id: I16bcdbbe2b13bbf52f007b0f131e9ee0c14ed237
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532257
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-28 17:32:20 +00:00
Brian Salomon
97381c2ce5 Revert "Add anisotropic option to SkSamplingOptions."
This reverts commit 9be2d572d4.

Reason for revert: need to fixup gm for abandoned context. Maybe other failures?

Original change's description:
> Add anisotropic option to SkSamplingOptions.
>
> Implement on GPU.
>
> Bug: skia:13036
> Change-Id: I35d760596c4f8faaec27fccf284b70802fcf3f9b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524757
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

Bug: skia:13036
Change-Id: I311d6ac46750ea5705285b964610125129b89582
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534916
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-28 13:14:41 +00:00
Brian Salomon
9be2d572d4 Add anisotropic option to SkSamplingOptions.
Implement on GPU.

Bug: skia:13036
Change-Id: I35d760596c4f8faaec27fccf284b70802fcf3f9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524757
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-04-28 12:53:02 +00:00
Jim Van Verth
e8199af1d9 Add ShadowFlag to use only blurs for concave shapes.
The geometric method for concave shadows seems to be failing in certain
cases. See: https://github.com/flutter/flutter/issues/84262. I've never
been satisfied with this solution and I've been thinking of removing it. This flag allows for Flutter to disable it for the time being until I
can determine if anyone else is using it.

Change-Id: Ia0a3f57002d94928f2baa655c88dc4d10b9edef8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-27 18:02:26 +00:00
Michael Ludwig
a6eaac0595 Disable experimental HW tessellation
This should make it so the HW tessellation path renderers are never
used; it will always select the atlas or direct fixed-count renderers
instead. This CL will give us a good indication of what visual diffs
to expect, layout tests to rebase, and any performance regressions.

If those are acceptable, then we can proceed with the rest of the code
removal.

Bug: skia:13263
Change-Id: I273bb231461932047768c1c7233ae4291483bc95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533810
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-04-27 13:34:09 +00:00
John Stiles
850de30a19 Fit Position in 4 bytes.
This limits our error reporting to the first 16MB of SkSL code in a
program, and error marks are limited to a run of 255 characters or
less. In practice, these limits do not affect normal code in any way.
This gives us the same tight memory footprint we originally had when
positions were stored as `int32 fLine`.

Change-Id: Idef04344324870a7b92aca154feb5e1a0121d284
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533699
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-27 00:01:06 +00:00
John Stiles
afa53f2e0b Replace Position::fEndOffset with fLength.
In a followup, this will make it easier to save memory.

Change-Id: I33e9838d1b3170362f4e7c58ba5f60a1928a4b55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533698
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2022-04-27 00:01:06 +00:00
John Stiles
32902b3c82 Add Ethan and John to OWNERS for include/sksl/.
Change-Id: I1bf6a41290eebd45e2065fcedf86ef2e20866f54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534197
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-26 23:38:58 +00:00
Herb Derby
74666f4b8c Use layers properly in Slug drawing
When drawing the Slug, aboutToDraw was never called resulting
in strange drawing matrices and broken image filters. Call
aboutToDraw in Slug drawing needs to use the initial paint from
the convert call. Store this in the Slug instead of the paint
resulting from aboutToDraw. Plumb the initialPaint and the
paint from aboutToDraw to where they need to go.

Bug: chromium:1302290
Change-Id: Id921aa37bf8ff2ecd21cdcdaad0012a7b90f5322
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533759
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-26 15:56:40 +00:00
Ben Wagner
9cbadcd928 Add optional OT-SVG support to FreeType
Bug: skia:12290
Change-Id: I064bee781d3a714e46f102cb48494fbe8f3e46e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516436
Reviewed-by: Florin Malita <fmalita@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-04-25 18:51:01 +00:00
Kevin Lubick
6c78b8d3ae Revert "Move SkCamera.h to client_utils/android"
This reverts commit 8a54d86c78.

Reason for revert: Causing issues with Android CTS

Original change's description:
> Move SkCamera.h to client_utils/android
>
> Android still uses this
> https://developer.android.com/reference/android/graphics/Camera
> but no other client does.
>
> This adds a little adaption layer until Android is updated
> to use the View3D version.
>
> Move SkCamera.h to View3D.h. Change names to android::skia::CLASS
> instead of SkCLASS. (3DView is not a valid class name, so rename it to
> View3D.)
>
> Forward-declare SkMatrix. Do not override SkNoncopyable - just delete
> the copy constructor/operator=. Make fU and fV private in Patch3D.
>
> Make Sk3DView override View3D temporarily until Android can be switched
> over to the new class.
>
> (View3D from http://review.skia.org/291371)
>
> I made Patch3D and Camera3D be private classes as they are
> currently not used by Android and wanted to constrain the
> exposed API as much as possible.
>
> Change-Id: Ibde45478421feeb610e045205c3f20c0e5b1567e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532456
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

Change-Id: If6e768524a0e13e14ef886a6f081a09ddc0dc2fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533396
Owners-Override: Kevin Lubick <kjlubick@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-25 12:33:01 +00:00
John Stiles
c6b2e7115a Limit sksl_rt_shader to internal usage only.
We now have a new type of ProgramKind, private runtime shaders.
`sksl_rt_effect.sksl` is now only loaded for these kinds of program.

Rather than having a special-case check for sk_FragCoord in
SkRuntimeEffect, the symbol will no longer exist at all unless a private
options flag is set.

Change-Id: I9223baaf59d74c44d64f322cd57fc841625342b7
Bug: skia:12202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532784
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-22 21:06:31 +00:00
Ethan Nicholas
d418ddbfc5 Improved SkSL error positions for return types
Bug: skia:13169
Change-Id: Icf0b720d3e3a13d490aba8495cf9db83d1d62318
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532762
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-22 19:13:45 +00:00
Ethan Nicholas
56217f0722 Improved positions of variable name errors
Bug: skia:13170
Change-Id: I11ef0ea5ac3ae61b24a47805bb3290a37880cfee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532536
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-22 14:39:14 +00:00
Kevin Lubick
8a54d86c78 Move SkCamera.h to client_utils/android
Android still uses this
https://developer.android.com/reference/android/graphics/Camera
but no other client does.

This adds a little adaption layer until Android is updated
to use the View3D version.

Move SkCamera.h to View3D.h. Change names to android::skia::CLASS
instead of SkCLASS. (3DView is not a valid class name, so rename it to
View3D.)

Forward-declare SkMatrix. Do not override SkNoncopyable - just delete
the copy constructor/operator=. Make fU and fV private in Patch3D.

Make Sk3DView override View3D temporarily until Android can be switched
over to the new class.

(View3D from http://review.skia.org/291371)

I made Patch3D and Camera3D be private classes as they are
currently not used by Android and wanted to constrain the
exposed API as much as possible.

Change-Id: Ibde45478421feeb610e045205c3f20c0e5b1567e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532456
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-22 14:20:09 +00:00
John Stiles
d3ecfb3bb8 Add Graphite-only dehydrated modules.
Graphite code snippets can be moved into these files; they will be
compiled once at build time and dehydrated for later use. This allows us
to avoid synthesizing and compiling them in each shader where they are
referenced. (Unfortunately, the GPU driver will still need to compile
them each time.)

Change-Id: I5cdc5881d71d7b81a02c91a84d52804f2909b483
Bug: skia:13110
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532259
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-04-21 21:05:27 +00:00
Ethan Nicholas
ccd85d5835 Improved positions of for loop errors
Bug: skia:13173
Change-Id: Ifbcce77605dd781563568293fc501dfa31f143da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528706
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-21 16:56:12 +00:00
Kevin Lubick
f4d0c2c9c8 [bazel] Move skcms and vulkanmemoryalloctor to subdirs
It's time to better organize //third_party/BUILD.bazel

This CL starts by moving the "third party" stuff we closely own.

Change-Id: I3e0be0044b790794e94f34af6202860ce0a7b7aa
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531999
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-21 12:15:50 +00:00
Ethan Nicholas
87e472722f Improved error reporting ranges for swizzles
Bug: skia:13171
Change-Id: I6dffb98ac2464f930995cf8ea57e422091d20fd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531743
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-20 20:46:51 +00:00
Jim Van Verth
48d50633ef [graphite] Move some atlas-related types to a shared header
Bug: skia:13118
Change-Id: Ica760f58107de021b7823f69b94809dd2f313ac7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531739
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-20 15:35:58 +00:00
Eric Boren
7f04c414e4 Update Skia milestone to 103
Change-Id: I28ef42ff417faf98eb1f124d4a1987b6cc4a609f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530456
Auto-Submit: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-18 18:47:43 +00:00
Brian Salomon
2386d3e7d6 mipMapped -> mipmapped
Change-Id: Ib9d4e23159724825dacb7d37ceabfd2aff68f58a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530681
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-18 14:26:19 +00:00
Greg Daniel
bd73e796d7 [graphite] Enable MSAA.
Bug: skia:13212
Change-Id: I8fc8bcd01181fcfb9955119984afa4bfbb1f73e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529756
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-15 17:03:51 +00:00
Brian Salomon
7bfda9a23d Finish GrMipMapped->GrMipmapped
Change-Id: I3a9e9e90b0ac1b1099830eaca06506bcce794144
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530055
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-15 15:43:52 +00:00
Brian Salomon
84e2586f15 Use raster mipmap levels when drawing to GPU.
Previously just the base level was uploaded and the level contents
were generated on the GPU.

showmiplevels_explicit now works on GPU.

Bug: skia:11983
Change-Id: I96ed8a7ad90a8252f55a736cb6146eec9b2a3ad1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521356
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-15 14:59:27 +00:00
Ben Wagner
42d514781d Fix return documentation for SkFont::measureText.
There seems to be a copy-paste issue with the documentation for the
return value of SkFont::countText. SkFont::countText returns the number
of glyphs, measureText returns the sum of the default advances.

Change-Id: Id3c9008c20e7b4b8ad4f1d834df19183a9b2bf1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530046
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-04-14 19:15:49 +00:00
Kevin Lubick
83cee23c98 [bazel] Run buildifier on BUILD.bazel files
buildifier --lint=fix -r .

Change-Id: I6a41858270d20137978f8271c8f6160b51120777
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529751
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-14 18:13:43 +00:00
Kevin Lubick
b98328a27b [bazel] Add license to all our BUILD.bazel files
find -name "BUILD.bazel" -exec sed -i -e '1i licenses(["notice"])\n' {} +

Change-Id: Ie48f163b7d8d6ede9ba5f952e87232dd5c9fa8e6
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529808
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-13 19:50:29 +00:00
John Stiles
702bf7ed1b Add support for SkSpan::subspan(offset).
https://en.cppreference.com/w/cpp/container/span/subspan

The real std::span::subspan in C++20 allows the "count" argument to
default to `std::dynamic_extent` (a fancy way of spelling ~0U). I didn't
think it would be worth adding `skstd::dynamic_extent`, but I did have
a use for an unbounded subspan, so I added a single-argument version to
SkSpan.

Change-Id: I297cc452cf2db727a3f9869ff8f46f3527e19370
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529603
Reviewed-by: Arman Uguray <armansito@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-12 22:44:11 +00:00
Robert Phillips
59ba27bc6a Move Ganesh specific headers into include/private/gpu/ganesh
Change-Id: Ia799cdff5288efe5d5d53e8d8f77cf32f3343371
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529131
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-12 17:30:07 +00:00
Robert Phillips
cd692a6bb0 [graphite] Finally, allocate uniform data in an arena
Bug: skia:12701
Change-Id: Ib02db7160599d3c15a01597c746ce5131f2998e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526298
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-11 19:17:20 +00:00
Jim Van Verth
42f710f3fa Reland "[graphite] Move Graphite into Skia base directories."
This is a reland of commit ae5e846047

Original change's description:
> [graphite] Move Graphite into Skia base directories.
>
> Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Change-Id: Ia575fd49206ad0b665a6a9153317e738bb321446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529059
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-11 18:37:20 +00:00
Jim Van Verth
ab4d4ae9e2 Revert "[graphite] Move Graphite into Skia base directories."
This reverts commit ae5e846047.

Reason for revert: Breaking Google3

Original change's description:
> [graphite] Move Graphite into Skia base directories.
>
> Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Change-Id: Ia57992a22c42b17216b40fd29452865f957fb802
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528653
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-09 01:02:26 +00:00
Jim Van Verth
ae5e846047 [graphite] Move Graphite into Skia base directories.
Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-08 20:46:40 +00:00
Ethan Nicholas
885c1d3048 Removed Position::Capture
It was decided that being able to report positions from C++ code is not
worth the cost of having all of these captures everywhere.

Change-Id: I94981d9f780bd95df8b56198210c9cdd5f16239c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528366
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-08 17:26:24 +00:00
Jim Van Verth
3871479bdb [graphite] Move all graphite classes under skgpu::graphite.
Change-Id: I484067cb1f6025dc9e6770c51c99bfc2c5925652
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528365
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-08 00:42:37 +00:00
Ethan Nicholas
f125d4e7a0 Improved SkSL Block and Do position tracking
Blocks did not previously track their position, creating problems
reporting some errors (which will be improved in followup CLs). Fixing
block positions changed the reporting of do loop errors, requiring do
loop position tracking to be updated as part of this change.

Change-Id: I3bd048a62d912914edf679f42607de1b5eafc2b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528045
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-07 21:03:19 +00:00
Kevin Lubick
f0fdce0b42 [includes] Add pragma for SkTypes.h
IWYU doesn't always understand that we want defines to come from
certain files, so we add a pragma to force it.

This also adds an extra entry to known_good_builds so I don't miss
this type of thing again when building locally.

Change-Id: I2321ea95edfc6a4506d51a011983965eb9bdf1c0
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528164
Reviewed-by: John Stiles <johnstiles@google.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
2022-04-07 13:04:14 +00:00
Kevin Lubick
8499e372ce [includes] Remove more includes of SkColorSpace
While I was fixing up Chrome's uses, I found some failures
there that I did not see in Skia, and tracked them down
to a few other places where we include SkColorSpace
and it is not strictly necessary

 - SkCustomMesh.h
 - GrColorInfo.h
 - GrColorSpaceXform.h
 - SkColorSpaceXformSteps.h

For these files (and their .cpp files), I added enforcement
of include-what-you-use, and then fixed the myriad of places
which were depending on these transitive includes.

One change to help Chrome is the manual overloads of
SkImage::MakeFromAdoptedTexture instead of using default
parameters. This makes it so callers of that function
do not need to include SkColorSpace if they were going
to pass nullptr for it anyway.

Bug: skia:13052
Change-Id: I16bf8ed5e258225d887f562f2c189623b1ca9c23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527056
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-06 21:58:24 +00:00
Brian Salomon
072e09b26d SkCanvas::kStrict_SrcRectConstraint disables mipmapping.
The implementation is inconsistent across CPU and GPU.

CPU currently always implements kStrict even when kFast is passed.
For mipmapping this means computing a set of levels from the subset,
which is an expensive.

GPU limits the texture sampling coordinates to the subset in the
base level. However, higher level mipmap pixels that map back to
a footprint outside the subset are still sampled. So GPU pays a
higher shader complexity cost without really providing the benefit
of kStrict.

We are adding anisotropic filtering, which will not work well with
kStrict, and thus will also be disabled by kStrict.


Must land after https://chromium-review.googlesource.com/c/chromium/src/+/3571661

Bug: skia:10481
Bug: skia:13078
Bug: skia:13036
Canary-Chromium-CL: 3571661
Change-Id: I011b8698a3f9fafa9b819486873c8ff54df6299e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527284
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-06 17:11:47 +00:00
Ethan Nicholas
a98e077508 Fixed remaining SkSL positions
This addresses (hopefully) all of the remaining suboptimal positions in
SkSL error reporting.

Change-Id: I5bc977b03d51153b841a89fa687e54e3e9cb6ec3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527976
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-06 17:03:22 +00:00
Brian Salomon
a84ec4a65c Add anisotropic filtering to GrSamplerState and implement in backends.
Currently unused.

Bug: skia:13036
Change-Id: I6f50a9218dbcd6c44b2c5745d6be6dbc0b00c06f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527277
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-06 16:09:14 +00:00
Brian Salomon
562e02ef4b Remove GrContextOptions::fSharpenMipmappedTextures
It was already a no-op.

Bug: skia:13078
Change-Id: I7c7e1a86650ebdbd79bfcc4c1e739a3901345e76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527836
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-05 21:33:50 +00:00
Ethan Nicholas
453e4def6f Improved BinaryExpression position tracking
This avoids a situation where we didn't know the position of a binary
expression while we were in the middle of evaluating it, which was
leading to problems with upcoming error reporting changes.

Change-Id: Ie41fa82d077de1aa1041cd84c539ba29aaa2f5f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527500
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-05 20:02:34 +00:00
Ethan Nicholas
59b0688e5e Improved PostfixExpression position tracking
This avoids a situation where we didn't know the position of a postfix
expression while we were in the middle of evaluating it, which was
leading to problems with upcoming error reporting changes.

Change-Id: Ie6d4dd8411ffb24ac7ee95d3e908483d0d92ba0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527499
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-05 20:02:26 +00:00
Ethan Nicholas
3d3a510071 Require a Position to be passed into various SkSL expressions
This removes some hacks where we were creating nodes with the wrong
positions and later updating them to have the correct positions, along
with a general increase in the rigorousness of position tracking.

Change-Id: I2bc635de6d5f516d5fb6763b00a22a10ccdf135f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526678
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-04 13:52:06 +00:00
Ethan Nicholas
fd9c66e180 Enforce correct positions for SkSL expressions
This adds asserts to DSLParser::expression() to ensure that every
generated expression actually starts at the current offset, and fixes
all of the various spots we weren't successfully doing that.

Change-Id: Ie37dbf9ee8bb47fd03f7a290d2e15da4fbfff938
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525316
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-02 16:42:58 +00:00
Brian Salomon
863bc82c62 Reland "Always apply mipmap sharpening on GPU"
This is a reland of commit 1aedd5dc11

Original change's description:
> Always apply mipmap sharpening on GPU
>
> Bug: skia:13078
>
> Change-Id: If459a96eba09fb10e967bc364435f79b83fdc1ec
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522099
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13078
Change-Id: Ic05b38fc07566f090d609431f2738d64dfdc8a66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524218
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-01 17:53:28 +00:00
Brian Salomon
97efceeded Always copy base level in SkImage_Raster::onMakeWithMipmaps
We already do this for cached SkSurface snapshot images. However,
sharing the SkPixelRef among any SkImage_Rasters with different
SkMipmaps interacts badly with SkImage texture caching and likely
other image caches.

Bug: skia:11983
Change-Id: I07bb7a93ffb79afb7f8268cd5159ee22f58da1e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526456
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-31 20:48:55 +00:00
Kevin Lubick
5e8f45faf1 [includes] Prepare for moving SkColorSpace to forward declare
This updates all our callsites in preparation for removing
the #include "include/core/SkColorSpace.h" from SkImageInfo.h

According to go/chrome-includes [1], this will save ~150MB
(0.07%) from the compilation size. I think SkColorSpace is
a big include because it loads the skcms header, which is
big.

The follow-on CL will remove that link, once clients have
been updated as well.

[1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2022-03-31_124042.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImageInfo%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImageInfo%5C.h%24&included=&limit=1000

Change-Id: I1b5ff491ac495317b0e5af3a2082b080d43697ae
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525639
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-31 19:50:10 +00:00
Greg Daniel
6b52f372c3 [graphite] Add a result param to graphite callbacks.
Bug: skia:12974
Change-Id: Ie10ef5c8ab4e04647233a6039d22a2eb6437d6bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526022
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-03-31 19:26:28 +00:00
Michael Ludwig
027b9c0d38 Remove GrAA parameter from drawing functions that support per-edge AA
Bug: skia:13114
Change-Id: I653ab746927abdd1491e070e2e27252bf056d233
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526024
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-31 19:25:26 +00:00
Brian Salomon
e679a08f9a Remove GrGLCreateNativeInterface
Bug: skia:13087
Change-Id: Ibaf7b223631a7282393cb670779a0a769bd0f86a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526301
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-03-31 19:01:34 +00:00
Brian Salomon
e4601b0864 Fix issue mipmapped SkImages made from SkSurface_raster snapshots.
This fixes a bug with the following sequence:

Make SkSurface_Raster, draw to it
snap an image, A, from the surface
make image B by calling withDefaultMipmaps() on image A
Let image A be destroyed.
draw to surface again
snap another image, C, from the surface

Image C and image B would now share the same SkPixelRef, reflecting
the final contents of the SkSurface.

Add a GM that exercises the bug when run through either the pic- or
serialize- vias and DDL.

Bug: skia:13111
Change-Id: Ib079163c84f420baf62fa7960110386303b8fb93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525517
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-31 13:21:59 +00:00
Ethan Nicholas
3f5184cfa6 Added an SkSL Operator enum
SkSL::Operator was previously just a thin wrapper around Token::Kind and
everything was therefore written in terms of Token. Since Token is not
accessible from include/ (and we don't want it to be), this creates an
actual Operator enum and eliminates the dependence on Token. This will
enable followup changes to reference Operator from within the DSL
include files.

Change-Id: I49555c9151618fd15970a303d2284972c78c3f21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525976
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-03-31 13:20:57 +00:00
Herb Derby
2b925c4a21 remove device capture from SkNWayCanvas
Change-Id: Icc6d1345c59d6f6529db39bf4b5bd8097f1f6b5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525837
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-03-30 14:07:41 +00:00
Herb Derby
f54d418b01 enable pictures to record drawSlug
This should fix many issues that Chrome is seeing. The problem is the
picture recorder had no idea about Slug, so the canvas super class
would try to use the device to draw. This hooks up the recorder
to capture drawSlug into the picture.

I tested this with a specialized gl sink in DM which I'm struggling
to check in. But, it was functional enough to show that this works.

Bug: chromium:1302036
Bug: chromium:1307279
Bug: chromium:1306329
Bug: chromium:1307446

Change-Id: I6a27bf43702400c80b2044433e7b00347f522763
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525636
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-03-29 19:30:03 +00:00
Jim Van Verth
f151351f47 [graphite] Add format tables to MtlCaps
Bug: skia:12845
Change-Id: If3ac2b6ba2c8e28328ee5805a29fc83353220364
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524756
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-03-28 14:10:29 +00:00
Ethan Nicholas
0dd66fea56 Added full position tracking to Swizzle
No visible effect yet, but this will enable better error reporting in a
future CL.

Change-Id: I09e1c5d3bb423a7ce42701f15c4bb142b0a9473c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524638
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-03-28 14:04:14 +00:00
Kevin Lubick
aab019a15e [bazel] Fix build
Most of these are pretty mechanical generated changes.

IWYU noticed one issue with DSLCore.h, which was fixed here.

Change-Id: I5629565ad3c2817daa71907c62f932d93f9d78ab
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524617
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-03-28 13:56:16 +00:00
Herb Derby
3b238ceae9 add a system for building SkCanvas wrappers for testing
This adds a way to build a wrapping canvas for testing that is allowed
to manipulate the internal state of the canvas. It provides a way
to add friends to SkCanvas without having to change SkCanvas.

Change-Id: I40de8b236ba5acff45b3a8f7e440dcf6fa196fcf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524316
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-03-24 18:11:53 +00:00
Michael Ludwig
f3539b6c47 [graphite] Use SkTDArray in SkPaintParamsKeyBuilder
SkTArray::reset() got rid of any reserved space, so previously we never
actually got to a high-water allocation. Updated the stack to use
SkTDArray just for consistency so we only had to include that instead of
<vector>, too.

Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-arm64-Debug-ASAN_Graphite,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite
Change-Id: I94c9a38d0e630c7d7f1a3eeeb85076067e066a2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-24 16:15:28 +00:00
Brian Salomon
8bb0f47c61 Revert "Always apply mipmap sharpening on GPU"
This reverts commit 1aedd5dc11.

Reason for revert: breaking units tests left and right

Original change's description:
> Always apply mipmap sharpening on GPU
>
> Bug: skia:13078
>
> Change-Id: If459a96eba09fb10e967bc364435f79b83fdc1ec
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522099
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13078
Change-Id: If24ed4782c922347132bf9fc0dac7e8a266540ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524296
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-24 13:56:27 +00:00
Greg Daniel
faf520c000 [graphite] Move RefCntedCallback to shared gpu file.
Bug: skia:12974
Change-Id: I15b090e2c3346d71ccf45d5f0d306da3f079821e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523996
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-03-23 21:19:15 +00:00
Herb Derby
396fa1cea1 divide the slug conversion calls at a better place
Change-Id: I1e7f7b01356582dcb507a2ef768c97df0e02c561
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523999
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-03-23 20:56:55 +00:00
Ethan Nicholas
7183f29125 Added position tracking for SkSL Modifiers
This is needed for accurate error reporting when we start reporting
ranges rather than line numbers.

Change-Id: If465317e04685e91ab7c408d29e82028b5d59d1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523425
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-03-23 20:45:39 +00:00
Brian Salomon
1aedd5dc11 Always apply mipmap sharpening on GPU
Bug: skia:13078

Change-Id: If459a96eba09fb10e967bc364435f79b83fdc1ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522099
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-23 19:47:39 +00:00
Kevin Lubick
859b3cc132 Remove old sk_float_rsqrt_portable code
Chrome stopped using this code path a while ago, so we can
too https://crrev.com/c/2850938

Change-Id: I45bd04aee928a1c1adebb41b8a9a263a3950c11f
Bug: skia:11861
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523637
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-03-23 13:14:09 +00:00
Herb Derby
399be2e211 update NWay canvas with onDrawSlug
Change-Id: I8b01ecfbbd7295d1109d624b64c162d8e31e18ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523676
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-03-22 20:59:48 +00:00
Herb Derby
2bc9a1a94d rename doDrawSlug to onDrawSlug
Change-Id: Ic88b400f7943804481934ba2c9c54aeb8e04121b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523656
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-03-22 20:20:07 +00:00
Michael Ludwig
1979ef6d56 [graphite] Share Path[Curve|Wedge|]Tessellator sources between graphite and ganesh
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Change-Id: I2ee0fd8d208bb10e011a5552a60a1a62d7a56ba9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522423
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-21 18:50:53 +00:00
Brian Salomon
99c2b29cce Reland "Add glGetFloatv and glSamplerParameterf to GrGLInterface."
This is a reland of commit 171450a1a0

Original change's description:
> Add glGetFloatv and glSamplerParameterf to GrGLInterface.
>
>
> Bug: skia:13036
> Change-Id: Ie15e0c2b0ada468b82bced818eec67c32d70126b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522100
> Auto-Submit: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13036
Change-Id: Id594ea5fd68c76703ff61d8414c203facbf28801
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522359
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-21 16:34:43 +00:00
Kevin Lubick
08ece0c9a0 [includes] Enforce IWYU on sksl code
PS1 regenerates the Bazel files. Use it as the base change when
    comparing patchsets.

IWYU seems to do a good job of working with MyFile.cpp and
MyFile.h, but if there is just a MyHeader.h, it doesn't always
seem to throw errors if the includes aren't correct. This was
observed with include/sksl/DSL.h This might be due to the fact
that headers are not compiled on their own, so they are never
sent directly to the IWYU binary.

This change sets enforce_iwyu_on_package() on the all sksl
packages and then fixes the includes until all those checks
are happy. There were a few files that needed fixes outside
of the sksl folder. Examples include:
 - src/gpu/effects/GrConvexPolyEffect.cpp
 - tests/SkSLDSLTest.cpp

To really enforce this, we need to add a CI/CQ job that runs
bazel build //example:hello_world_gl --config=clang \
  --sandbox_base=/dev/shm --features skia_enforce_iwyu

If that failed, a dev could make the changes described in
the logs and/or run the command locally to see those
prescribed fixes.

I had to add several entries to toolchain/IWYU_mapping.imp
in order to fix some private includes and other atypical
choices. I tried adding a rule there to allow inclusion of
SkTypes.h to make sure defines like SK_SUPPORT_GPU, but
could not get it to work for all cases, so I deferred to
using the IWYU pragma: keep (e.g. SkSLPipelineStageCodeGenerator.h)

Change-Id: I4c3e536d8e69ff7ff2d26fe61a525a6c2e80db06
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522256
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-03-21 12:43:02 +00:00
Leon Scroggins
74e0cf216e Revert "Add glGetFloatv and glSamplerParameterf to GrGLInterface."
This reverts commit 171450a1a0.

Reason for revert: Breaking Google3

Original change's description:
> Add glGetFloatv and glSamplerParameterf to GrGLInterface.
>
>
> Bug: skia:13036
> Change-Id: Ie15e0c2b0ada468b82bced818eec67c32d70126b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522100
> Auto-Submit: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13036
Change-Id: I49fd1701b54d2144454b8e6a7ff948b85808409f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522357
Auto-Submit: Leon Scroggins <scroggo@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-18 19:13:37 +00:00
Brian Salomon
171450a1a0 Add glGetFloatv and glSamplerParameterf to GrGLInterface.
Bug: skia:13036
Change-Id: Ie15e0c2b0ada468b82bced818eec67c32d70126b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522100
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-18 15:23:11 +00:00
Heather Miller
a29854ca73 Update Skia milestone to 102
Change-Id: Ie332216b5338b1538de9ef07a34a28854c7c805a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522137
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-03-18 15:12:31 +00:00
Kevin Lubick
c2b4a8a98b [includes] Remove link between SkColor and SkImageInfo
This is estimated to save Chrome 230 MB of build size [1]
(about 0.1%) http://screen/4dMqPC9rvAyCk6y

[1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2022-03-08_182556.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkColor%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkColor%5C.h%24&included=&limit=1000

Canary-Chromium-CL: 3517906
Change-Id: I0a08a47eeb0cabf0bdcc85ff4963c53d08c74bc4
Bug: 242216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518276
Owners-Override: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-18 14:35:35 +00:00
Ethan Nicholas
c444394841 Removed file field from SkSL::Position
Bug: skia:13051
Change-Id: I13cdb1b625f65e6d15d3b59ba493897ed88b24c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521005
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-03-17 16:47:05 +00:00
Ethan Nicholas
5e035c66da Added safety checks to SkSL error reporting
This adds an assert to Position::line() to ensure that we don't run
past the end of the source string. Since the source string can
contain embedded nulls, we also switch the source handling from
const char* to std::string so we can accurately determine its length.

Change-Id: I9df47e98c1a0cbc35222a0ea709d9403762210d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521656
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-03-17 16:06:06 +00:00
Herb Derby
4397488ce5 add testing code for serialized Slugs
By setting the compile time flag:
SK_EXPERIMENTAL_SIMULATE_DRAWGLYPHRUNLIST_WITH_SLUG_STRIKE_SERIALIZE
will cause all SkTextBlobs to be rendered by analyzing the Slug
to create strike cache differences and serialize the Blob to a Slug.
Then the serialized strike cache differences are used to populate
the strike cache using a different TypefaceIDs using SkTypeface_Remote
as a proxy for the real SkTypeface. This will create a hard break
between the original glyph data, and the proxied glyph data.
It will then deserialize the Slug doing TypefaceID translation to
the SkTypeface_Remote, and draw the unflattened Slug.

Bug: chromium:1278340

Change-Id: I0f1980dee966b1092a99741793aed9d138451f4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510228
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-03-16 19:42:16 +00:00
Herb Derby
627969bf1b serialize/draw GrSlug into a SkPicture
Chrome uses a picture to manage some of their drawing in the GPU
process. This CL serializes GrSlugs into an SkPicture, and to
draw from that picture. Pictures with GrSlugs can not be stored;
they must be created and played back directly. In addition, the
SkStrikes used by the slugs must be pinned in the SkStrikeCache.

Bug: chromium:1302036

Change-Id: I19fa9c06c08f64ad066326e90bc6425dd90b3342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/514360
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-03-16 15:24:43 +00:00
Kevin Lubick
9301fe3779 [bazel] Test enforcement of IWYU on SkSVG backend.
This will use the recently added Bazel toolchain feature
to enforce proper includes for all files in //src/svg/...

In the future, I envision a CI/CQ job that will run
bazel build with a few different configurations and the
--feature skia_enforce_iwyu on to make sure we don't
regress.

Change-Id: Ibb9f816ab626415c11bd2b9b74c503297c4b0723
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521036
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-16 14:20:14 +00:00
Kevin Lubick
e253cc3e55 [bazel] Use toolchain features to opt files into being IWYU compliant.
PS1 regenerates the Bazel files.

It is recommended to review this CL with a diff from PS1.

Example output when a file does not pass the test:
    tools/sk_app/CommandSet.h should add these lines:
    #include "include/core/SkTypes.h"
    #include "include/private/SkTArray.h"
    #include "tools/skui/InputState.h"
    #include "tools/skui/Key.h"
    #include "tools/skui/ModifierKey.h"
    namespace sk_app { class Window; }

    tools/sk_app/CommandSet.h should remove these lines:
    - #include "tools/sk_app/Window.h"

    The full include-list for tools/sk_app/CommandSet.h:
    #include "include/core/SkString.h"
    #include "include/core/SkTypes.h"
    #include "include/private/SkTArray.h"
    #include "tools/skui/InputState.h"
    #include "tools/skui/Key.h"
    #include "tools/skui/ModifierKey.h"
    #include <functional>
    #include <vector>
    class SkCanvas;
    namespace sk_app { class Window; }
    ---

This makes use of Bazel's toolchain features
https://bazel.build/docs/cc-toolchain-config-reference#features
to allow us to configure compiler flags when compiling
individual files. This analysis is off by default, and can
be turned on with --features skia_enforce_iwyu. When enabled,
it will only be run for files that have opted in.
Example:
    bazelisk build //example:hello_world_gl --config=clang \
       --sandbox_base=/dev/shm --features skia_enforce_iwyu

There are two ways to opt files in:
 - Add enforce_iwyu = True to a generated_cc_atom rule
 - Add enforce_iwyu_on_package() to a BUILD.bazel file
   (which enforces IWYU for all rules in that file)

Note that Bazel does not propagate features to dependencies
or dependents, so trying to enable the feature on cc_library
or cc_executable targets will only impact any files listed in
srcs or hdrs, not deps. This may be counter-intuitive when
compared to things like defines.

IWYU supports a mapping file, which we supply to help properly
handle things system headers (//toolchain/IWYU_mapping.imp)

Suggested Review Order:
 - toolchain/build_toolchain.bzl to see how we get the IWYU
   binaries into the toolchain
 - toolchain/BUILD.bazel and toolchain/IWYU_mapping.imp
   to see how the mapping file is made available for
   all compile steps
 - toolchain/clang_toolchain_config.bzl, where we define the
   skia_enforce_iwyu feature to turn on any verification at
   all and skia_opt_file_into_iwyu to enable the check for
   specific files using a define.
 - toolchain/clang_trampoline.sh, which is the toolchain is
   configured to call instead of clang directly (see line 83
   of clang_toolchain_config.bzl). This bash script used to
   just forward all arguments directly onto clang. Now it
   inspects them and either calls clang directly (if
   it does not find the define in the arguments or we are
   linking [bazel sometimes links with clang instead of ld])
   or calls clang and then include-what-you-use. In all cases,
   the trampoline sends the arguments to clang and IWYU
   unchanged).
 - //tools/sk_app/... to see enforcement enabled (and fixed)
   for select files, as an example of that method.
 - //experimental/bazel_test/... to see enforcement enabled
   for all rules in a BUILD.bazel file.
 - all other files.

Change-Id: I60a2ea9d5dc9955b6a8f166bd449de9e2b81a233
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/519776
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-16 13:09:46 +00:00
Kevin Lubick
34975a4d58 Reland "[includes] Remove link between SkImageEncoder and SkBitmap"
This is a reland of commit 965d9dc948

Upstream changes
 - http://cl/434609233
 - http://cl/434730162

Original change's description:
> [includes] Remove link between SkImageEncoder and SkBitmap
>
> This cleans up an old TODO and, according to go/chrome-includes
> [1] [2], will save 106 MB (0.05%) of build size.
>
> [1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2022-03-09_114034.html#view=edges&filter=&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImageEncoder%5C.h%24&included=&limit=1000
> [2] http://screen/ohtAxmQcnXui47q
>
> Change-Id: Ic53bfa827964dd5d2d2dbce12f1722e57ea5a9bc
> Bug: 242216
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518497
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

Bug: 242216
Change-Id: I5bad2a8764c54e885c5b6cad6070549f2cbeefcf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/520936
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-15 18:26:16 +00:00
Herb Derby
3d381dcbd2 make slug drawing const
Change-Id: I677ad3073725219897bec9f82d88ad3ba3fedb53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521002
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-03-15 16:49:16 +00:00
Kevin Lubick
e1880aed8f Revert "[includes] Remove link between SkImageEncoder and SkBitmap"
This reverts commit 965d9dc948.

Reason for revert: Breaking G3

Original change's description:
> [includes] Remove link between SkImageEncoder and SkBitmap
>
> This cleans up an old TODO and, according to go/chrome-includes
> [1] [2], will save 106 MB (0.05%) of build size.
>
> [1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2022-03-09_114034.html#view=edges&filter=&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImageEncoder%5C.h%24&included=&limit=1000
> [2] http://screen/ohtAxmQcnXui47q
>
> Change-Id: Ic53bfa827964dd5d2d2dbce12f1722e57ea5a9bc
> Bug: 242216
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518497
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

Bug: 242216
Change-Id: I71d76582f44317f6ad3a4c0152c5ce10c9bbf783
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/520796
Owners-Override: Kevin Lubick <kjlubick@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-03-15 00:04:01 +00:00
Kevin Lubick
965d9dc948 [includes] Remove link between SkImageEncoder and SkBitmap
This cleans up an old TODO and, according to go/chrome-includes
[1] [2], will save 106 MB (0.05%) of build size.

[1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2022-03-09_114034.html#view=edges&filter=&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImageEncoder%5C.h%24&included=&limit=1000
[2] http://screen/ohtAxmQcnXui47q

Change-Id: Ic53bfa827964dd5d2d2dbce12f1722e57ea5a9bc
Bug: 242216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518497
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-14 20:02:23 +00:00
Ethan Nicholas
c9e9131f44 Switched SkSL positions from int to Position
This CL switches almost all instances of line tracking over to track
Positions instead. This does not yet add full range support - only the
start offsets will be correct currently. Followup CLs will extend the
ranges to fully cover their nodes.

Change-Id: Ie49aee02f35dcb30a3adb8a35f3e4914ba6939d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518137
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-03-14 17:06:17 +00:00
ColdPaleLight
227764e5c9 Remove obsolete sk_cf_obj
sk_cf_obj has been migrated to sk_cfp in Flutter's PR https://github.com/flutter/engine/pull/30029

Change-Id: If86926b311a38af3d2a436d6afee0cdc7ebdc65b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/514696
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-03-11 05:59:16 +00:00
Jim Van Verth
6cb3f3d2c7 [graphite] Add Recorder accessors to SkCanvas and SkSurface
Bug: skia:12845
Change-Id: Ic036dea6b58682a6463f8c34d915730c4bfe677b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/519617
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-03-10 20:47:02 +00:00
Kevin Lubick
efce17de5d Reland "[includes] Remove link between SkImage.h and SkImageEncoder.h"
This is a reland of commit f60584eb0f

Client changes:
 - https://chromium-review.googlesource.com/c/chromium/src/+/3508565
 - http://cl/433225409
 - http://cl/433450799

Original change's description:
> [includes] Remove link between SkImage.h and SkImageEncoder.h
>
> According to go/chrome-includes [1], this will save about
> 210MB (0.09%) off the Chrome build. http://screen/GVdDaRRneTRuroL
>
> [1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&included=&limit=1000
>
> Change-Id: If911ec283a9ce2b07c8509768a6a05446573a215
> Bug: 242216
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512416
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

Bug: 242216
Change-Id: Ic61e4ac2878e7a51f389312a3a434856e2e32be3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518277
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-10 04:47:51 +00:00
Kevin Lubick
27be14f2ca [includes] Prepare to remove SkColor<->SkImageInfo
This breaks out the SkAlphaType and SkColorType enums into
their own files, which lets us break the dependency between
SkColor and SkImageInfo.

It does not yet sever the link, but we plan to land this
so as to migrate clients to the new enum files if necessary.

This is estimated to save Chrome 230 MB of build size [1]
(about 0.1%) http://screen/4dMqPC9rvAyCk6y

[1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2022-03-08_182556.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkColor%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkColor%5C.h%24&included=&limit=1000

Change-Id: I331d414fe2996632ab11825c1092060ff5fe2ebd
Bug: 242216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517678
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-09 18:40:44 +00:00
Ethan Nicholas
9cd8456afe Renamed SkSL::PositionInfo to SkSL::Position
Change-Id: I1fa160941b18392616708f4e08a4ebbf7398480e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518521
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-03-09 17:37:38 +00:00
Kevin Lubick
cbc954bf57 [includes] Remove include link between SkPath.h and SkPathRef.h
According to go/chrome-includes [1], this will save about
185MB (0.08%) off the Chrome build (some of which is handled
by https://skia-review.googlesource.com/c/skia/+/512776).
http://screen/3foDapQ5BN7srcG

This adds several forward declares and moves several
implementations from SkPath.h to SkPath.cpp.

This also removes privateSetConvexity from SkPathBuilder
because the SkPathConvexity being set to a non-zero default
value would have required moving the enum out of SkPathRef
or adding an include link. This private API was only used
in one location, so I just opted to remove it.

[1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkPath%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkPath%5C.h%24&included=&limit=1000

Change-Id: Ie1f83ac3eee6eb19d7ded18a41a7532f445c13ee
Bug: 242216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512357
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-03-09 00:55:54 +00:00
Kevin Lubick
7ac7413f08 [bazel] Support Vulkan
PS1 regenerates BUILD.bazel files

I suggest reviewing the deltas between PS1 and the latest
PS to focus on the interesting bits.

The changes here allow for a Vulkan-only build of HelloWorld
based on sk_app. The toughest change was properly fetching
the VisualID after removing the gl calls that used to
fill that in.

There are a few changes that fix resolution of Dawn
header files, but those won't actually be built until
a follow-on CL.

Change-Id: I54fb58b5dd7ecd4313562aed401759b3eaed53c0
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516999
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-08 21:21:17 +00:00
Ben Wagner
6c630f2ce6 Make SkScalerContext enums scoped.
This was motivated by SkScalerContextFlags putting `kNone` into the
global namespace. Instead of adding a suffix, change these internal
enums to be scoped and update the users.

Because SkScalerContextFlags is used like a bitfield,
`SK_MAKE_BITFIELD_OPS` is used to provide the appropriate operators. The
macro implementation is updated to handle scoped enums, remove the very
dangerous, unwanted, and unused templated operators, and add operator~
since that is needed by one existing user.

Also, for some reason this allows the compiler to find an unused field
which is removed.

Change-Id: Id31c80b381bffaf9b623f6a8ec7d86751d3d99f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517616
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-03-08 16:24:47 +00:00
Kevin Lubick
a573cbab1a Revert "[includes] Remove link between SkImage.h and SkImageEncoder.h"
This reverts commit f60584eb0f.

Reason for revert: Chrome and G3 issues

Original change's description:
> [includes] Remove link between SkImage.h and SkImageEncoder.h
>
> According to go/chrome-includes [1], this will save about
> 210MB (0.09%) off the Chrome build. http://screen/GVdDaRRneTRuroL
>
> [1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&included=&limit=1000
>
> Canary-Android-Topic: image-encoder-2
> Change-Id: If911ec283a9ce2b07c8509768a6a05446573a215
> Bug: 242216
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512416
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

Bug: 242216
Change-Id: Idc906ff54d8baf49989d3ee24e045d7b0ca710df
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517676
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
2022-03-08 13:09:49 +00:00
Kevin Lubick
f60584eb0f [includes] Remove link between SkImage.h and SkImageEncoder.h
According to go/chrome-includes [1], this will save about
210MB (0.09%) off the Chrome build. http://screen/GVdDaRRneTRuroL

[1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&included=&limit=1000

Canary-Android-Topic: image-encoder-2
Change-Id: If911ec283a9ce2b07c8509768a6a05446573a215
Bug: 242216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512416
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-07 21:32:13 +00:00
Dichen Zhang
7225b26450 Add color-depth detection
ag/16935648 added a method to detect the color depth of R/G/B channel
for input sources. This change does the following: (1) call this new method and default
SkAndroidCodec to 1010102 for 10-bit images; (2) add color-depth to
SkEncodedInfo.

Change-Id: I3ede4a7a6223da2d4c075403d6ee280db086e0be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512076
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2022-03-07 18:22:52 +00:00
Kevin Lubick
2d86f6f5db Reland "[includes] Remove include link between SkPathRef.h and SkRRect.h"
This is a reland of 37b8239bec

Upstack changes:
 - http://ag/17004908
 - https://github.com/flutter/engine/pull/31654

Original change's description:
> [includes] Remove include link between SkPathRef.h and SkRRect.h
>
> According to go/chrome-includes [1], this will save about
> 40MB (0.02%) off the Chrome build. http://screen/4GnPjFaYpwCVHVL
>
> I'm not quite sure why the link is so expensive, but we can
> forward declare it and move the implementation from the .h
> to the .cpp file easily enough.
>
> [1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fprivate%2FSkPathRef%5C.h%24&sort=includes&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fprivate%2FSkPathRef%5C.h%24&included=&limit=1000
>
> Canary-Chromium-CL: 3485346
> Change-Id: Ie3a5e7a735426f883a6c06ddbd3b8bf148bf1709
> Bug: 242216
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512158
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Bug: 242216
Change-Id: I31288895528251fd59913427b95b9f88a871d14b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512776
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-07 15:15:05 +00:00
Kevin Lubick
7d4e12544e [dawn] Clean up include paths and dawn_native namespace
Change-Id: I343d878b2ff3b1abf52007c7612b01c53731566b
Bug: dawn:824,dawn:1275,skia:12512
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516916
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-07 14:38:55 +00:00
Brian Osman
0817ce7c5b Add SK_LENIENT_SKSL_DESERIALIZATION, enabled in Debugger
When deserializing an SkSL shader, it's possible to encounter code that
doesn't compile (particularly from the last year, when syntax tweaks
were being made). By default, we still treat this as an error and fail
to load the SKP. In the SKP debugger, though, we add a lenient mode that
permits these failures. If any of the children were SkShaders, we
instead return that. If all else fails, we just return nullptr, which
will cause the triggering draw to use a solid paint-color, but at least
allow the SKP to be loaded and viewed.

For color-filters and blenders, we allow malformed SkSL, but always
return nullptr.

The bug that prompted this change involved Android's overscroll stretch
shader, where this approach works particularly well (it turns the
stretch into a simple pass-through of the underlying content).

Change-Id: I756c694739d31b11efa1b82c126f34440a7de66a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/515543
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-03-04 20:58:47 +00:00
John Stiles
bc6b9df7c6 Use SkTHashMap for the MetalCodeGenerator.
We seem to save about 1K of code size each time an unordered_set/map is
replaced.

Change-Id: I7e04076d470e6c7ad4ae8301ded231ae69168bc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/515361
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-03-04 19:01:18 +00:00
Greg Daniel
4d428f375c Add ability to query gl format enum from GrBackendTexture.
Change-Id: I5faec55b8fddb718999dae8c6b2e7badb6a85efb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/515178
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-03-04 14:28:30 +00:00
John Stiles
6ff07e0b02 Add initializer-list construction to SkTHashSet/Map.
This will allow us to easily replace unordered_set/unordered_map in more
places.

Change-Id: Ic0b5245e8cdce2918d7b043bfc370eca95caf889
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/515319
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-03-03 22:40:20 +00:00
John Stiles
847f03ab20 Add std::string/string_view support to SkGoodHash.
This will allow these types to be used as the key in an SkTHashSet/Map
without providing a custom Traits class.

Change-Id: I41bfc1d43f3909d3653b4f12ac39e2a288235052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/515356
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-03-03 18:09:00 +00:00
Jim Van Verth
e43d00a219 [graphite] Add isGaneshBacked and isGraphiteBacked
Bug: skia:12845
Change-Id: Ib0b87966b1559b368759ce69c48f0fd27597503a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/514836
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-03-02 23:35:16 +00:00
Jim Van Verth
5d6e655004 [graphite] Add SkImage::makeTextureImage for Graphite.
Also adds in asView for texture-backed Image as well as stubs for
other Image types.

Bug: skia:12845
Change-Id: I58a90068d4d151ad35f411b08c8484c740253722
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507336
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-03-02 21:30:10 +00:00
Robert Phillips
d6d3cabb49 Add maxSurfaceSampleCountForColorType to GrContextThreadSafeProxy
Change-Id: I7d98b2dff9fbb29bb9709c72679551473078fe0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/513877
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-03-01 15:13:40 +00:00
Kevin Lubick
953c92880b Add SkRSXform to SK_API
Change-Id: I9ee142f949e644dcd06f359bb6838b5b4f04ec21
Bug: skia:12990
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/513736
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-28 14:07:10 +00:00
Kevin Lubick
acab911351 [bazel] Make use of test_on_env to spin up server for gms
In order to extract the PNG files produced by our CanvasKit gms,
we need our JS tests to POST them to a server which can write to
disk. The easiest way to do this is to use the test_on_env
rule defined in the Skia Infra repo for exactly this purpose.

This required https://skia-review.googlesource.com/c/buildbot/+/510717
to be able to configure the binary correctly and
https://skia-review.googlesource.com/c/buildbot/+/511862, for nicer
debugging so the skia-infra dep was updated via the following commands:
$ go get go.skia.org/infra@d8a552a29e
$ go mod download
$ make -C infra/bots train
$ make -C bazel gazelle_update_repo
This caused many automated changes to infra/bots/tasks.json

The flow is:
1. User types bazelisk test :hello_world_test_with_env
2. The test_on_env rule starts gold_test_env and waits
   for the file defined in $ENV_READY_FILE to be created.
3. gold_test_env starts a web server on a random port. It
   writes this port number to $ENV_DIR/port. Then, it
   creates $ENV_READY_FILE to signal ready.
4. test_on_env sees the ready file and then starts the
   karma_test rule. (Reminder: this is a bash script
   which starts karma using the Bazel-bundled chromium).
5. The karma_test rule runs the karma.bazel.js file (which
   has been injected with some JS code to fill in Bazel
   paths and settings) using Bazel-bundled node. This reads
   in the port file and sets up a Karma proxy to redirect
   /gold_rpc/report to http://localhost:PORT/report
6. The JS tests run via Karma (and do assertions via Jasmine).
   Some tests, the gms, make POST requests to the proxy.
7. gold_test_env gets these POST requests writes the images
   to a special Bazel folder on disk as defined by
   $TEST_UNDECLARED_OUTPUTS_DIR.
8. test_on_env identifies that the tests finish (because the
   karma_test script returns 0). It sends SIGINT to gold_test_env.
9. gold_test_env stops the webserver. The special Bazel folder
   will zip up anything inside it and make it available for
   future rules (e.g. a rule that will upload to Gold via goldctl).

Suggested Review Order:
 - bazel/karma_test.bzl to see the test_on_env rule bundled into
   the karma_test macro. I chose to put it there because it might
   be confusing to have to define both a karma_test and test_on_env
   rule in the same package but not be able to call one because it
   will fail to talk to the server.
 - gold_test_env.go to see how the appropriate files are written
   to signal the environment is ready and the handlers are set up.
 - karma.bazel.js to see how we make our own proxy given the
   port from the env binary. The fact that we could not create
   our own proxy with the existing karma_test rule was why the
   chain ending in https://skia-review.googlesource.com/c/skia/+/508797
   had to be abandoned.
 - tests/*.js to see how the environment is probed via /healthz
   and then used to make POST requests with data.
 - Everything else.

Change-Id: I32a90def41796ca94cf187d640cfff8e262f85f6
BUG: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510737
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2022-02-28 14:05:54 +00:00
Brian Osman
c6e373d47d Adjust Google3 stack-trace dumping to match recent refactor
Cq-Include-Trybots: luci.skia.skia.primary:Canary-G3
Change-Id: Iebd4aaec098b6bf2e863d0c93d7fd826d3ec0edc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512724
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-24 20:32:27 +00:00
Kevin Lubick
b902658a1a [bazel] Fix Bazel build by guarding addToKey
PS1 is the automatic regenerated changes.
PS2-3 adds an #ifdef guard to the addToKey method on shaders.
The SkShaderCodeDictionary class helps generate SkSL and is
only necessary when we are building with SkSL (gpu builds and
cpu builds with SkVM).

Suggested Review order:
 - Use Gerrit to diff PS 1 and the last PS
 - src/core/BUILD.bazel adds some sources to the "only
   necessary if sksl is enabled" bucket
 - All the .cpp and .h files to see the #ifdef is added
   correctly.

Change-Id: I4d4ce61a4957ef1e0840204acff08ce7e616f9cb
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512157
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-24 18:10:40 +00:00
John Stiles
2c70a0f96b Reland "Remove skstd::optional entirely."
This is a reland of 0596094b81

Original change's description:
> Remove skstd::optional entirely.
>
> Change-Id: Id9862712ea3e769797abd654922879ce6bc4487c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504976
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: Ie5bae44de729aabe50c4e51ad3c7cc476fbc5dc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512358
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-24 15:12:43 +00:00
Kevin Lubick
32b1e5d861 Revert "[includes] Remove include link between SkPathRef.h and SkRRect.h"
This reverts commit 37b8239bec.

Reason for revert: Need to update clients, including Flutter

Original change's description:
> [includes] Remove include link between SkPathRef.h and SkRRect.h
>
> According to go/chrome-includes [1], this will save about
> 40MB (0.02%) off the Chrome build. http://screen/4GnPjFaYpwCVHVL
>
> I'm not quite sure why the link is so expensive, but we can
> forward declare it and move the implementation from the .h
> to the .cpp file easily enough.
>
> [1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fprivate%2FSkPathRef%5C.h%24&sort=includes&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fprivate%2FSkPathRef%5C.h%24&included=&limit=1000
>
> Canary-Chromium-CL: 3485346
> Change-Id: Ie3a5e7a735426f883a6c06ddbd3b8bf148bf1709
> Bug: 242216
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512158
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Bug: 242216
Change-Id: I226c45326b67dff3eb1dc1f96c11e9ef0a12e22b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512639
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-24 12:55:26 +00:00
Kevin Lubick
37b8239bec [includes] Remove include link between SkPathRef.h and SkRRect.h
According to go/chrome-includes [1], this will save about
40MB (0.02%) off the Chrome build. http://screen/4GnPjFaYpwCVHVL

I'm not quite sure why the link is so expensive, but we can
forward declare it and move the implementation from the .h
to the .cpp file easily enough.

[1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fprivate%2FSkPathRef%5C.h%24&sort=includes&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fprivate%2FSkPathRef%5C.h%24&included=&limit=1000

Canary-Chromium-CL: 3485346
Change-Id: Ie3a5e7a735426f883a6c06ddbd3b8bf148bf1709
Bug: 242216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512158
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-02-23 22:46:44 +00:00
Evgenii Stepanov
3ec010334e Fix use-after-dtor in SkCanvas.
SkCanvas::fMCStack uses SkCanvas::fMCRecStorage for storage, and will
access it in the destructor. Reorder the fields so that fMCStack is destroyed
before fMCRecStorage.
Change-Id: Ie09b9b52820d2dec4b75552dc5c2349b845a01ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509536
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2022-02-23 18:55:52 +00:00
John Stiles
ac374fad55 Remove unused #includes from SkSLString.
These weren't used and added complexity to the dependency graph.

Change-Id: I7e97d73d520b7123e534485d7840538d6b468c48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512145
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-23 16:27:09 +00:00
Arthur Eubanks
59de321c10 Add #include <algorithm> to SkTArray.h
SkTArray.h uses std::max() which is part of <algorithm>.
Some libc++ changes have stopped exporting <algorithm> from certain headers, causing skia to break with ToT libc++.

2e2f3158c6

Change-Id: Iee4e00b3b3a6cbe2c1881453d05c0658e95a767b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512016
Commit-Queue: Arthur Eubanks <aeubanks@google.com>
Auto-Submit: Arthur Eubanks <aeubanks@google.com>
Reviewed-by: Erik Rose <erikrose@google.com>
Commit-Queue: Erik Rose <erikrose@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-02-22 21:52:15 +00:00
Herb Derby
98209f67c0 additional serialize(void*, size_t) to match SkTextBlob
Add serialize(void*, size_t) to mirror the SkTextBlob serialization
methods.

Bug: chromium:1278340

Change-Id: Ie3868d882263a0ec8833d4c9404e7410d30ac6ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511798
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-22 19:36:40 +00:00
Herb Derby
c25fd021ed change to serialize/Deserialize API
Switch to using the public API similar to SkTextBlob for
serialize/Deserialize. Add deserializeSlug to SkStrikeClient.

Bug: chromium:1278340

Change-Id: I91b93487859c662e3bfdfba49ba4758f13529cd9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511601
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-22 19:03:49 +00:00
Herb Derby
fae2cc3b80 use flatten/unflattend Slugs to draw
This CL using GPU draws every TextBlob by converting it to a
Slug, flattening the Slug, unflattening the Slug to a dstSlug,
and then uses the dstSlug to draw the TextBlob.

Since only DirectMask sub runs are working I have disabled some
code to all empty sub runs. This will be restored in the final
version.

This adds a compile-time flag to control this behavior:
SK_EXPERIMENTAL_SIMULATE_DRAWGLYPHRUNLIST_WITH_SLUG_SERIALIZE

Bug: chromium:1278340

Change-Id: I7674593b0d6e1f871e1c526af76407a1977a8836
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510419
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-18 15:11:22 +00:00
Heather Miller
8c2a82270e Update Skia milestone to 101
Change-Id: I78fd07c10a8dd3ff76b6040109afdf4b47b69eb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510656
Reviewed-by: Heather Miller <hcm@google.com>
Auto-Submit: Heather Miller <hcm@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2022-02-18 12:46:42 +00:00
Herb Derby
418fdebf1c move top-level Slug creation from buffer to GrSlug
Change-Id: Ieef75feb64614a6ece4c88deaaf147fe1ac0b311
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510420
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-17 22:26:55 +00:00
Michael Ludwig
a872718e51 Reland "Preserve base device origin on saveLayer and image filters"
This reverts commit 814652c373.

Reason for revert: missed suppression has landed in chrome

Original change's description:
> Revert "Preserve base device origin on saveLayer and image filters"
>
> This reverts commit f436cf2343.
>
> Reason for revert: May need to be behind flag or more
> suppressions. Breaking linux-rel vulkan_swiftshader_blink_web_tests
> css3/filters/effect-blur-hw.html .
>
> Original change's description:
> > Preserve base device origin on saveLayer and image filters
> >
> > SaveLayerOriginTest taken from https://skia-review.googlesource.com/c/skia/+/277977
> >
> > Bug: skia:12732
> > Change-Id: I5ce75355bb16237043c229e1cbc7a106eb636d18
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508919
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> Bug: skia:12732
> Change-Id: I74cc8dc279d22c4fbd313ae3caeb4d0748daf003
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510196
> Auto-Submit: Ben Wagner <bungeman@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Bug: skia:12732
Change-Id: Ifdc3ac96b1b695c208960915ca313fbacf4b7ed6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510203
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-17 19:49:10 +00:00
Ben Wagner
814652c373 Revert "Preserve base device origin on saveLayer and image filters"
This reverts commit f436cf2343.

Reason for revert: May need to be behind flag or more
suppressions. Breaking linux-rel vulkan_swiftshader_blink_web_tests
css3/filters/effect-blur-hw.html .

Original change's description:
> Preserve base device origin on saveLayer and image filters
>
> SaveLayerOriginTest taken from https://skia-review.googlesource.com/c/skia/+/277977
>
> Bug: skia:12732
> Change-Id: I5ce75355bb16237043c229e1cbc7a106eb636d18
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508919
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

Bug: skia:12732
Change-Id: I74cc8dc279d22c4fbd313ae3caeb4d0748daf003
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510196
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-17 13:48:07 +00:00
Dominik Röttsches
01be94d7f1 Support font palette overrides through SkFontArguments
Co-authored with Ben Wagner, bungeman@google.com.

Similar to how we allow configuration of variable font configurations,
provide additional SkFontArguments to select a base palette and a set
of potentially sparse color overrides.

This is required for implementing CSS font-palette.

Modify the more_samples-glyf_colr_1.ttf to have two additional palettes,
and two additional test glyphs, one that draws with COLRv0 logic, one
that draws with COLRv1 logic and has a foreground palette index dot
in the middle. See [1] & [2] for the additions to the test font.

Add a GM which tests this on the SkFontMgr_custom using makeClone() and
makeFromStreamArgs(). The test displays the two glyphs in default
palette on the left, then with palette overrides (as in the title of the
test) on the right. The first row uses a typeface created with
makeFromStreamArgs(), the second uses one created with makeClone().

[1] https://github.com/googlefonts/color-fonts/pull/91
[2] https://github.com/googlefonts/color-fonts/pull/92

Bug: skia:12730, chromium:1170794
Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_NativeFonts,Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-NativeFonts
Change-Id: Ia1334f069240edc78fd4791969914e8a6f4fbaf9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/479616
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-17 13:19:53 +00:00
Michael Ludwig
f436cf2343 Preserve base device origin on saveLayer and image filters
SaveLayerOriginTest taken from https://skia-review.googlesource.com/c/skia/+/277977

Bug: skia:12732
Change-Id: I5ce75355bb16237043c229e1cbc7a106eb636d18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508919
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-16 22:20:12 +00:00
Jim Van Verth
d6245fc4aa Rename GrSwizzle to skgpu::Swizzle
Bug: skia:12845
Change-Id: Ia03293c4efdad4c5381a713c9d7d4857b79530c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509398
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-02-16 13:30:14 +00:00
Herb Derby
0c58105085 GrSlug proposed API for serialization
I don't have serialization working yet, but I have enough of the
plumbing to sketch out an API. It seems simplistic, but notice it
requires access to the SkStrikeClient.

Change-Id: I29f046b62f20c635cee86f0666e8112ac3097f16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507837
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-14 17:53:53 +00:00
John Stiles
3b0c30e93c Assert in ~SkMutex that the mutex is unowned.
Destroying a mutex while it is held is never valid, and can be extremely
hard to debug.

Change-Id: I42ff79de7892006337f204621ff59bf84112dcd7
Bug: skia:12943
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507998
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-14 15:23:12 +00:00
Brian Osman
503f2b7f71 Remove unnecessary semi-colons
Change-Id: I7a9d2b78865a4207be3ab1c1f613e9e829414f5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507921
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-11 22:13:11 +00:00
Herb Derby
02b4f94536 Fix include from private to src
Change-Id: I1a7b587499749c583e5680323efceda7cf2e5e6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507920
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-11 21:45:01 +00:00
Ben Wagner
8fd41401f1 FreeType to draw COLR glyphs with drawables.
Bug: skia:12121
Change-Id: I616e1357e9209642b6e323e631f475e83e5c4b79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507337
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-11 20:38:43 +00:00
Herb Derby
b4f87c81e0 expose typefaceID Translation for descriptors
An important part of serialization for slugs is maintaining the
translation of typefaceIDs from the renderer side to the GPU side.
Expose the translation code so that the slugs can use it.

Change-Id: I78ded1967759619a95fb13a1577cee3569927471
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507836
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-11 19:45:58 +00:00
Brian Osman
40d7426345 Remove isOpaque from SkRuntimeEffect::makeShader signature
Bug: skia:12643
Change-Id: Id5eecb3445082e747def8c87f99a16552857af3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506462
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-11 16:05:01 +00:00
Brian Osman
a7a2324f14 Reland "Add kR8_unorm_SkColorType"
This is a reland of 3225c8cc46

Original change's description:
> Add kR8_unorm_SkColorType
>
> Change-Id: I97b5bc7f90715664f233ca7b7c41c0ecbfc29ac4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505679
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Change-Id: I73fa17625d57e0e58da1b70e2e59ba200383cfe7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506460
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-10 18:00:19 +00:00