Commit Graph

1191 Commits

Author SHA1 Message Date
Julia Lavrova
398ef4487b Reland "Reland "Small changes for SkText that are not in experimental directory""
This reverts commit b51994990b.

Reason for revert: Fixed the test

Original change's description:
> Revert "Reland "Small changes for SkText that are not in experimental directory""
>
> This reverts commit ce32c8a074.
>
> Reason for revert: Skottie test is broken
>
> Original change's description:
> > Reland "Small changes for SkText that are not in experimental directory"
> >
> > This reverts commit 481a58dfe0.
> >
> > Reason for revert: Fixing the build
> >
> > Original change's description:
> > > Revert "Small changes for SkText that are not in experimental directory"
> > >
> > > This reverts commit 92f1bc0083.
> > >
> > > Reason for revert: Blocking Android roll.
> > >
> > > Original change's description:
> > > > Small changes for SkText that are not in experimental directory
> > > >
> > > > (also made utf 8<->16 conversion static on SkUnicode)
> > > >
> > > > Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
> > > > Reviewed-by: Mike Reed <reed@google.com>
> > > > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> > >
> > > Change-Id: Ieb9eb0495dddfc0f9e9e74861b24efc0201fd520
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448656
> > > Auto-Submit: Brian Osman <brianosman@google.com>
> > > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> >
> > Change-Id: I1e5859c9dd943c701d4c4e648bdc3e44412eca54
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448676
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: Ib8e5ec05a5555f34106a0ee61878a8199b82bb82
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448897
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

Change-Id: I3bc103c0e1c495342a6673e80765b5f26862e8dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448898
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-09-15 15:31:14 +00:00
Julia Lavrova
b51994990b Revert "Reland "Small changes for SkText that are not in experimental directory""
This reverts commit ce32c8a074.

Reason for revert: Skottie test is broken

Original change's description:
> Reland "Small changes for SkText that are not in experimental directory"
>
> This reverts commit 481a58dfe0.
>
> Reason for revert: Fixing the build
>
> Original change's description:
> > Revert "Small changes for SkText that are not in experimental directory"
> >
> > This reverts commit 92f1bc0083.
> >
> > Reason for revert: Blocking Android roll.
> >
> > Original change's description:
> > > Small changes for SkText that are not in experimental directory
> > >
> > > (also made utf 8<->16 conversion static on SkUnicode)
> > >
> > > Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
> > > Reviewed-by: Mike Reed <reed@google.com>
> > > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> >
> > Change-Id: Ieb9eb0495dddfc0f9e9e74861b24efc0201fd520
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448656
> > Auto-Submit: Brian Osman <brianosman@google.com>
> > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
>
> Change-Id: I1e5859c9dd943c701d4c4e648bdc3e44412eca54
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448676
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

Change-Id: Ib8e5ec05a5555f34106a0ee61878a8199b82bb82
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448897
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-09-14 20:32:02 +00:00
Julia Lavrova
ce32c8a074 Reland "Small changes for SkText that are not in experimental directory"
This reverts commit 481a58dfe0.

Reason for revert: Fixing the build

Original change's description:
> Revert "Small changes for SkText that are not in experimental directory"
>
> This reverts commit 92f1bc0083.
>
> Reason for revert: Blocking Android roll.
>
> Original change's description:
> > Small changes for SkText that are not in experimental directory
> >
> > (also made utf 8<->16 conversion static on SkUnicode)
> >
> > Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: Ieb9eb0495dddfc0f9e9e74861b24efc0201fd520
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448656
> Auto-Submit: Brian Osman <brianosman@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Change-Id: I1e5859c9dd943c701d4c4e648bdc3e44412eca54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448676
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-09-14 14:30:22 +00:00
Brian Osman
481a58dfe0 Revert "Small changes for SkText that are not in experimental directory"
This reverts commit 92f1bc0083.

Reason for revert: Blocking Android roll.

Original change's description:
> Small changes for SkText that are not in experimental directory
>
> (also made utf 8<->16 conversion static on SkUnicode)
>
> Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

Change-Id: Ieb9eb0495dddfc0f9e9e74861b24efc0201fd520
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448656
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-09-14 13:27:19 +00:00
Julia Lavrova
92f1bc0083 Small changes for SkText that are not in experimental directory
(also made utf 8<->16 conversion static on SkUnicode)

Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-09-13 18:22:33 +00:00
Jorge Betancourt
151a6f34e1 expose Font to JetSki
Change-Id: Icea51ab00118b48898df70f4f1fa9ed985372589
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444760
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2021-09-07 21:51:30 +00:00
Brian Osman
a8b897bfc1 Remove blend and colorFilter sksl modules
This moves the functions for dealing with child effects into the public
module (where those types already live). With that change, blend and
colorFilter have no module-specific declarations.

Change-Id: I7665e68427ea4d8d1ed4d31afb658edb79bac5a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443412
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-08-31 17:35:19 +00:00
Brian Osman
99ddd2a98d Remove (unused) geometry shader support
Bug: skia:8451 skia:10827
Change-Id: I5b38a1d72cd4558f8e2a92aaf9b12f05efce0923
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442683
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-08-27 19:41:10 +00:00
Michael Ludwig
c1ed11d909 Move GrBlockAllocator and GrTBlockList to src/core/
src/gpu/GrBlockAllocator -> src/core/SkBlockAllocator
src/gpu/GrTBlockList -> src/core/SkTBlockList

Tests and references also renamed.

Bug: skia:12330
Change-Id: I5fad05faa3dcecd89a0a478dcf30c090ea7589f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441477
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-08-25 13:21:32 +00:00
Jorge Betancourt
e1fb47daac [JetSki] plumb experimental SkText to JetSki
Change-Id: I972ff5bd066ff9e8afa98f506e6fe9d6b9dc621a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440597
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-08-24 15:34:21 +00:00
Florin Malita
369cc4f5c8 Remove unneeded skottie_android dep
Change-Id: Iba4abc427fc26c5071e8a306fd389497a73d52f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437684
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-08-09 16:34:52 +00:00
Ben Wagner
51d83abcd2 Ease HarfBuzz API change with feature detection
Skia has been using the not entirely public HarfBuzz subsetting API.
This API is changing for public release. In order to make the transition
from old to new build flags were added, which would require build
changes as HarfBuzz is updated downstream. Instead detect the existence
of the old or new API and use whichever is present automatically.

Change-Id: I0727f97ad7d394dfb24553076d4b383570cf0002
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437121
Reviewed-by: Garret Rieger <grieger@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-08-06 17:22:22 +00:00
Garret Rieger
66684b17b3 Roll HarfBuzz from 2.6.4 to 2.8.2-147
3a74ee5282..368e957887

Additionally adds a build option that switches to the new
harfbuzz subsetting api which is coming in the next version
of harfbuzz.

Change-Id: I924a7b4978412d636d4c8d19f5c6021ea3c73d21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433737
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-08-06 02:54:40 +00:00
Robert Phillips
04f22eacaa Feed all top-level GPU accessors through skgpu::BaseDevice (take 2)
This pulls the GPU-specific accessors off of SkCanvas and SkDevice - moving them all to skgpu::BaseDevice and SkCanvasPriv.

This will allow us to more easily change the gpu class hierarchy (esp. changing GrSurfaceDrawContext to skgpu::v1:SurfaceDrawContext) w/o churning the public API.

TBR=brianosman@google.com
Bug: skia:11837
Change-Id: Ib69a3ea27c840fa7758bc3318395a27228c7ae9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431539
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-26 14:56:37 +00:00
Robert Phillips
d91d2341b9 Revert "Feed all top-level GPU accessors through skgpu::BaseDevice"
This reverts commit 5de8b19504.

Reason for revert: blocking Android roll

Original change's description:
> Feed all top-level GPU accessors through skgpu::BaseDevice
>
> This pulls the GPU-specific accessors off of SkCanvas and SkDevice - moving them all to skgpu::BaseDevice and SkCanvasPriv.
>
> This will allow us to more easily change the gpu class hierarchy (esp. changing GrSurfaceDrawContext to skgpu::v1:SurfaceDrawContext) w/o churning the public API.
>
> Bug: skia:11837
> Change-Id: I4e205255706680ac58ffe40f714884c2ee7ac799
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431036
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I8a015be4edbe21d63db09d5593af13cc89df4217
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431538
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-22 18:56:51 +00:00
Robert Phillips
5de8b19504 Feed all top-level GPU accessors through skgpu::BaseDevice
This pulls the GPU-specific accessors off of SkCanvas and SkDevice - moving them all to skgpu::BaseDevice and SkCanvasPriv.

This will allow us to more easily change the gpu class hierarchy (esp. changing GrSurfaceDrawContext to skgpu::v1:SurfaceDrawContext) w/o churning the public API.

Bug: skia:11837
Change-Id: I4e205255706680ac58ffe40f714884c2ee7ac799
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431036
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-22 16:47:30 +00:00
John Stiles
65ec198696 Add dm via-option rtblend- to test using Runtime Blends.
Change-Id: I46844754a86ae44b61747b7244edf6cc1fd73d61
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429102
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-07-20 17:43:50 +00:00
Brian Osman
946a4cb8ac First pass at a no-SkSL CPU build
This just disables everything that depends on SkSL today:

- Color filters:
  - HighContrast
  - Lerp
  - Luma
  - Overdraw
- Skottie effects:
  - BlackAndWhite
  - BrightnessContrast
  - DisplacementMap
  - FractalNoise
  - Sphere
  - Threshold
  - GradientColorFilter (indirectly, this uses ColorFilters::Lerp)

Cq-Include-Trybots: luci.skia.skia.primary:Canary-Android,Canary-Chromium,Canary-Flutter,Canary-G3
Bug: skia:12197
Change-Id: I26269bd4423897142b8f2fdcc4ab1b274e767cba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427376
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-07-19 21:19:51 +00:00
John Stiles
b5ac66c874 Add utility function GetRuntimeBlendForBlendMode for testing.
This will help us write tests confirming that runtime blends work the
same as the built-in blends.

Change-Id: I2f94aa7bbbc7124d09b490fc7509a4c281025307
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427618
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-07-14 20:39:09 +00:00
Tyler Denniston
f8b7c1ac5f Pass CTM to path effects (experimental)
Add an overload to SkPathEffect that can be used when the CTM is known
at the callsite. GPU callsites are not handled here, that will be
tackled in a separate CL.

Path effects must implement the filterPath virtual that accepts the CTM,
although they are not obligated to use it. If a path effect does
use the CTM, the output geometry must be in the original coordinate
space, not device space.

Bug: skia:11957
Change-Id: I01615985599fe2736de954bb10dac881b0554ae7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420239
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-07-13 18:42:55 +00:00
Robert Phillips
72354b0593 Move more gms and tests into the V1-only pile
Making GrDrawRandomOp and test_ops V1-only drags several GMs and tests with them. All the other GMs/tests explicitly require Ops.

Bug: skia:11837
Change-Id: I45c0a1054c3b1ec43f509595c6492581d10314cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425016
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-08 17:38:36 +00:00
Brian Osman
8c26479048 Remove large swaths of code related to .fp files
Change-Id: Id2061ebe7873aa8b9480a2d8b0133c2fb79e79bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424098
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-08 16:53:47 +00:00
Brian Osman
ed5181e7bf Remove .fp tests and build steps
Change-Id: I4066aafc5b6137bfaf38100ff237fd9833023f34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424097
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-08 16:47:40 +00:00
Brian Osman
07bf3881e7 Convert binary unrolled gradient colorizer to GrSkSLFP
Change-Id: I28eb4479476a531a7b45fbef0ce9da72a4d29dc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423997
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-08 13:48:05 +00:00
Jim Van Verth
758d81f715 Reland "Metal: Add labels to help with GPU Debugging"
Original change's description:
> Metal: Add labels and debug groups to help with GPU Debugging.
>
> * Adds SK_ENABLE_MTL_DEBUG_INFO to enable labels and debug groups,
>   dependent on skia_enable_gpu_debug_layers.
>
> Bug: skia:12150
> Change-Id: I5b4538c0f6df6ceed72d7e8e6f1952fd193b7b90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422756
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

Bug: skia:12150

Change-Id: I4bc686b7fdb1b929dbfdb2dd12fb5170fc9b36a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425185
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-07-07 17:36:52 +00:00
Robert Phillips
4d45e09202 Rename experimental app to 'sorttoy'
Bug: skia:11837
Change-Id: Id111281d0ec9ab0ebf93b9352a64eef9574bfcb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424040
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-01 19:11:26 +00:00
Robert Phillips
7cef6789fd Change architecture #defines to be SK_GPU_V1 and SK_GPU_V2
A strictly mechanical CL

Bug: skia:11837
Change-Id: Id794d1fefe261d685b19e5d4d599cdab5e021cf7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424038
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-01 18:42:53 +00:00
Robert Phillips
024668cf7f Rename gn options to skgpu_v1 and skgpu_v2
Bug: skia:11837
Change-Id: Ie9221d2cd8e42bebb6a8a9a8ef51ba4a488ce6ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424036
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-01 17:09:33 +00:00
Greg Daniel
34b52bf634 Revert "Metal: Add labels and debug groups to help with GPU Debugging."
This reverts commit 9e583bfa3f.

Reason for revert: breaking flutter, needs available checks

Original change's description:
> Metal: Add labels and debug groups to help with GPU Debugging.
>
> * Adds SK_ENABLE_MTL_DEBUG_INFO to enable labels and debug groups,
>   dependent on skia_enable_gpu_debug_layers.
>
> Bug: skia:12150
> Change-Id: I5b4538c0f6df6ceed72d7e8e6f1952fd193b7b90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422756
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I62deacb3527dc709fa8bb8c9f4631e523eae27f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12150
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423816
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-07-01 11:59:55 +00:00
Jim Van Verth
9e583bfa3f Metal: Add labels and debug groups to help with GPU Debugging.
* Adds SK_ENABLE_MTL_DEBUG_INFO to enable labels and debug groups,
  dependent on skia_enable_gpu_debug_layers.

Bug: skia:12150
Change-Id: I5b4538c0f6df6ceed72d7e8e6f1952fd193b7b90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422756
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-06-30 22:48:41 +00:00
Florin Malita
1df8756419 [androidkit] Color filter support
Add MatrixColorFilter, HSLAMatrixColorFilter and ComposeColorFilter.

Change-Id: I047368adcd13452566a40e91a6f594dd525efd5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422517
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-29 12:42:19 +00:00
John Stiles
fbd9faef88 Migrate matrix-inversion code to a dedicated SkMatrixInvert file.
This allows SkM44 and optimize_intrinsic_call to share the same matrix
inversion logic.

Support for 2x2 and 3x3 matrix inversion was also added to
SkMatrixInvert, but is not currently used anywhere in Skia besides
optimize_intrinsic_call. (The perspective case of SkMatrix::ComputeInv
could probably be adapted to use the shared 3x3 code.)

Change-Id: Ie55aab536b4bd0c0a04f2c24527747670ca68fbb
Bug: skia:12054
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420219
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-06-22 17:11:15 +00:00
Chris Dalton
685e09b31a Reland "Purge ccpr"
This is a reland of 7bf6bc0d06

Original change's description:
> Purge ccpr
>
> Now that the clip atlas has been successfully migrated to
> tessellation, we don't need this code anymore!
>
> Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Change-Id: If0be86902e7cc4755eba91a89be1ec1a6a4b54b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419720
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-06-19 18:42:38 +00:00
Brian Osman
fe83ab6706 Revert "Purge ccpr"
This reverts commit 7bf6bc0d06.

Reason for revert: Android build references kCoverageCounting

Original change's description:
> Purge ccpr
>
> Now that the clip atlas has been successfully migrated to
> tessellation, we don't need this code anymore!
>
> Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=robertphillips@google.com,brianosman@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: I01d99287978f848eb8bf900c07cba90ceb3b6edc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419898
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-06-19 15:13:19 +00:00
Chris Dalton
7bf6bc0d06 Purge ccpr
Now that the clip atlas has been successfully migrated to
tessellation, we don't need this code anymore!

Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-06-18 21:46:36 +00:00
Greg Daniel
0eb35a9e35 Fix gn for skpinfo so it can find vulkan headers.
Change-Id: I25b4751bbf70841666934d17021c507b7cf9c9be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419816
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-06-18 15:46:39 +00:00
Florin Malita
ca8191b0ad [androidkit] Add linear gradient
Change-Id: Ie08dcde421bb4f67b8467361bda563d5a65ddbd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416777
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-17 20:55:53 +00:00
Jorge Betancourt
cfa4774f9a [androidkit] expose SkPath to androidkit
Change-Id: Ibc871459234ba72b0ab948c601e0895c15e21126
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415797
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-16 20:23:20 +00:00
Robert Phillips
3674f589ee Make GrPathRenderer and all derived class be OGA-only
Bug: skia:11837
Change-Id: I92aacf8b412d0158036a5f27aa767590e426bd5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417657
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-06-16 17:09:37 +00:00
Robert Phillips
1ca0da4b91 Make GrClipStack, GrClipStackClip, and GrReducedClip OGA-only
GrStencilClip and GrStencilMaskHelper just come along for the ride

Bug: skia:11837
Change-Id: I7cfa2dd620b7457e6b6be4abf91b1ecd415d9b73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417680
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-06-15 12:48:34 +00:00
Julia Lavrova
ecc8e3bc04 CPP Text Editor
The very first version:
1. Moves cursort up, down, left, right by grapheme/glyph clusters
2. Breaks lines by grapheme/glyph cluster
3. Just started!

Change-Id: Ib2881794ff33af9e428828f3a9e2d3b54946fa8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417476
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-06-10 19:15:04 +00:00
Ethan Nicholas
d2e0960696 Removed SkSL::StringFragment in favor of string_view
This CL preserves the "StringFragment" name as an alias for
string_view to reduce the impact. The StringFragment alias
will be removed in a followup CL.

Change-Id: I89209bc626b0be0d0190823b6217f4c83cafe1bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416736
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-06-10 16:08:13 +00:00
Robert Phillips
7b931f8f78 Add possibility of not compiling OGA files
The plan is to be able to compile and test NGA-only, OGA-only and both

Bug: skia:11837
Change-Id: Ib79cc2c2c437c72def8649392b345648f49300fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416799
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-06-10 13:10:19 +00:00
Robert Phillips
1f6ca3a950 [ngatoy] Make an explicit ID class and simplify Cmd class
Bug: skia:11837
Change-Id: I44b8f02555c1ed7e2f1bf0872bf41f78d1eb5d25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417003
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-06-10 12:32:20 +00:00
Florin Malita
8b86811763 Fix skottie_tool build
Should be guarded by the Skottie build flag.

Change-Id: I4e895a3759d19248fe0770dce710a0ef78c780b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417007
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
2021-06-09 19:50:44 +00:00
John Stiles
f7f36ae077 Add ProgramKind::kRuntimeBlend for Runtime Blend functions.
Runtime Blend effects always take two input colors--source and
destination--instead of one. This CL adds a new ProgramKind for blend
effects, a new program module (empty for now), and adds a test to
confirm that the signature for blend functions is checked. Currently
these are only accessible via skslc; there's no Runtime Effect API to
create one and the dest color isn't hooked up to anything.

Change-Id: I5272a811d2d76b878cfdf3429efa78c9c8b3fd97
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416798
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-08 19:34:39 +00:00
Jorge Betancourt
f961bc256d [androidkit] expose image filters to androidkit library
Add DistantLitDiffuse lighting filter as template for future filters to be added


Change-Id: Ib641b26512b0501538dfd54b17ab127bdef98f88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414976
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-04 21:18:38 +00:00
Brian Osman
bdda1a3ccd Remove SDL from DEPS (and SDL example that used it)
Change-Id: Ia18badfdd174015b67ce09ae3ec3180df0481710
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413378
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-05-27 21:37:57 +00:00
Brian Osman
ce9d8e143d Remove all traces of OpenCL
Change-Id: I4e00edd2d1572c3e2c1fcb56824239c166253cbc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412958
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-05-27 19:17:17 +00:00
Robert Phillips
4b73228b07 NGA sorting playground
Change-Id: Ib73dd51f3f558aa6c6b98aa611da116d8906bf7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397284
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-05-24 17:49:57 +00:00
Florin Malita
50cc5d4147 [androidkit] Image shader support
Tangential updates:

 - new encoded input stream Image factory
 - Paint setters now return the object to support a fluent workflow
 - cube demo updated to store face paints instead of colors


Change-Id: I6142a229b18165112ef1fe76acae38bc4b27480d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410789
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-05-21 17:30:43 +00:00
Florin Malita
934c02142e [androidkit] Introduce Image support
Two sources from now:

  - encoded data factory
  - Surface.makeImageSnapshot()

Change-Id: Icbf2f855e489839dc82db425916c8644418a2fb7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410324
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-05-20 20:28:55 +00:00
Florin Malita
5e8d88ef29 [androidkit] Add support for Skottie animations
Change-Id: Ibba2c0c8ad5b10d90f0bb30a3a859dacb94a03ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409400
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-05-18 14:49:43 +00:00
Jorge Betancourt
e3f8030494 [androidkit] implement ThreadedSurface backed by WindowSurface
This moves ownership of the SkSurface to ThreadedSurface::fWindowSurface.

When we pass a Message to the SurfaceThread, we will include  a pointer to ThreadedSurface.fWindowSurface so we can call:
getCanvas() to draw the SkPicture
WindowSurface's constructor so it can hold the WindowContext made during the init

To reference WindowSurface in SurfaceThread, we need to make a header for Surface.cpp (added in this cl)

Change-Id: I8c67223eee301a1b6e0d05934e1f8597cf70bc64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404918
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-13 17:15:49 +00:00
Robert Phillips
3b97aa2cc9 Add NGA compilation stubs
Change-Id: I5309005146b8121528ad23589fa64cc6bf286aee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402578
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-05-05 16:48:01 +00:00
Julia Lavrova
159fd844c3 The first draft of improved & simplified Text API
Change-Id: If48f8ace53bcf3d2ac6c3c3ad87658f3901872eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375134
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-04-30 17:26:08 +00:00
Brian Salomon
06c9e2962b Revert "Revert "Add mskp player, use in viewer slide""
This reverts commit 0d174586c4.

Use SkTLazy instead of std::optional (C++17 library feature)

Bug: skia:11900
Change-Id: Ia41caa9322d812f9ba6644dd14ede7d0015cf8b3
Cq-Include-Trybots: luci.skia.skia.primary:Housekeeper-PerCommit-CreateDockerImage_Skia_Release,Build-Debian10-Clang-x86_64-Release-CMake
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402642
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-29 19:40:08 +00:00
Jorge Betancourt
5cddd7f5e1 [androidkit] implement foundation for 4x4 matrices in AndroidKit backed by SkM44
Change-Id: If623efaadda6064598c6fd69daa4527a4e71cced
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402101
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-04-29 19:23:18 +00:00
Brian Salomon
0d174586c4 Revert "Add mskp player, use in viewer slide"
This reverts commit 9230fc59b7.

Reason for revert: broke something in housekeeping docker build.

Original change's description:
> Add mskp player, use in viewer slide
>
> viewer now takes --mskps <dir> and will have a slide per mskp and
> overview slide (just like --skps).
>
> Player uses offscreen surfaces to draw offscreen layers, allows
> random access to mskp frames.
>
> slide just plays mskp at fixed frame rate (for now).
>
> Bug: skia:11900
> Change-Id: I66104ffe88f5df721a1a835570acc3e4c23c3f07
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400537
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,bsalomon@google.com,nifong@google.com

Change-Id: I97fb7a64d5ef2ca14dba1cf9e2ba91ab0e9d0018
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11900
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402639
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-29 17:15:58 +00:00
Brian Salomon
9230fc59b7 Add mskp player, use in viewer slide
viewer now takes --mskps <dir> and will have a slide per mskp and
overview slide (just like --skps).

Player uses offscreen surfaces to draw offscreen layers, allows
random access to mskp frames.

slide just plays mskp at fixed frame rate (for now).

Bug: skia:11900
Change-Id: I66104ffe88f5df721a1a835570acc3e4c23c3f07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400537
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-04-29 16:35:07 +00:00
Brian Osman
552fcb9a1b Remove flexible runtime effects entirely
All internal usage has migrated to MakeFor..., this removes the old
program kind, and updates some tests.

Bug: skia:11813
Change-Id: I56733b071270e1ae3fab5d851e23acf6c02e3361
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402536
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-29 16:02:27 +00:00
Florin Malita
2cc6538c60 [androidkit] VK Surface
Implement support for native VK surfaces via sk_app::WindowContext
wrappers.

Change-Id: Ic4f03b7013095e2e4cfcf94d034d774a96e4af88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400816
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-27 02:55:59 +00:00
Jorge Betancourt
f102b88a43 [androidkit] initial foundation for Android Surface thread management
Change-Id: I6da61fc8f8778f100c721c2812b3c32444c6dffe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398137
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-04-26 19:21:08 +00:00
Florin Malita
05bb5a8b30 [androidkit] Introduce RuntimeShader
- opaque Shader class to act as a Java SkShader wrapper
 - shader slot on Paint
 - RuntimeShaderBuilder utility to enable the same use pattern as native
   Skia:

  RuntimeShaderBuilder builder(sksl_string);
  builder.setUniform("foo", 1);
  builder.setUniform("bar", 2);
  paint.setShader(builder.makeShader());

or, more fluent:

  paint.setShader(
      RuntimeShaderBuilder(sksl_string)
          .setUniform("foo", 1)
          .setUniform("bar", 2)
          .makeShader());


Change-Id: I7cd241a2f64bc54dcae2175ed35040edf6506ed3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399736
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-04-23 14:38:36 +00:00
Robert Phillips
98b066cbe8 Add fuzzer for Triangulating Path Renderer
Bug: skia:11892
Change-Id: I3f8145516f8fd23eb05c29517cd5c1553c9b1df1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399296
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-04-22 15:35:29 +00:00
Ben Wagner
f6cc85844f Reland "Fix sk_app macOS raster window build conditions."
The "raster" window on macOS and iOS is actually backed by GL. Fix the
build rules and code conditions to reflect this. This allows for some
sk_app applications to run on macOS and iOS with skia_use_gl=false.

> Revert:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

> Land:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: Ia8a421f4818856dd90cb4847095eee0d1836d1e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398056
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-04-19 18:25:44 +00:00
Brian Osman
9d4741370c Revert "Fix sk_app macOS raster window build conditions."
This reverts commit 163ba10dde.

Reason for revert: Mac linker errors

Original change's description:
> Fix sk_app macOS raster window build conditions.
>
> The "raster" window on macOS is actually backed by GL. Fix the build
> rules and code conditions to reflect this. This allows for some sk_app
> applications to run on macOS with skia_use_gl=false.
>
> Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ie5fa24138e4387784c21559f28528a4c4d335626
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-17 17:41:27 +00:00
Ben Wagner
163ba10dde Fix sk_app macOS raster window build conditions.
The "raster" window on macOS is actually backed by GL. Fix the build
rules and code conditions to reflect this. This allows for some sk_app
applications to run on macOS with skia_use_gl=false.

Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-17 15:18:05 +00:00
Florin Malita
de89bf0cd7 [androidkit] Start sketching out Paint
Add Color and Paint classes:

  - Color is pure Java (equivalent of SkColor4f)
  - Paint is backed by a native SkPaint

Change-Id: I79dbfae48f9e51254a51bc1c3966930f32cea5c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396020
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-16 01:56:04 +00:00
Brian Osman
cbb60bd0b0 Add runtime color filter and shader modes to the SkSL compiler
These enforce stricter rules about the signature of main, and each one
uses a separate pre-include module. That prevents color filters from
being able to reference sk_FragCoord (or coords passed to main) at all.
It also limits the versions of sample() that are exposed.

In the new world, an effect created for a specific stage of the Skia
pipeline can only be used to create instances of that stage (SkShader or
SkColorFilter). For now, SkRuntimeEffect::Make uses kRuntimeEffect,
which continues to be more lenient and allow creation of either shaders
or color filters from a single effect. After we migrate all clients, we
can deprecate and then delete that mode.

Bug: skia:11813
Change-Id: I0afd79a72beeec84da42c86146e8fcd8d0e4c09f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395716
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-15 13:30:59 +00:00
John Stiles
0a0a50ae97 Use .dsl.cpp suffix for DSL C++ instead of _dsl.cpp.
This requires the GN processing to be slightly more complex, as GN has
no native support for more than one extension on a file.
Context: https://groups.google.com/a/chromium.org/g/gn-dev/c/RdEpjeYtb-4

Change-Id: I630511fca9eb291f0e414481ef439f18a8e1b72f
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396197
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-04-14 13:49:53 +00:00
John Stiles
82ab3409f7 Fork CPPCodeGenerator into a DSL-based version.
The long term goal is for the DSLCPPCodeGenerator to replace the
CPPCodeGenerator entirely, but we will need both to coexist while DSL is
still under development.

Currently, the DSLCPPCodeGenerator is cloned from CPPCodeGenerator and
emits almost exactly the same code (it adds a comment at the top to
distinguish its output). Its output will change in followup CLs.

This CL also allows skslc to recognize the `_dsl.cpp` output suffix and
generate code using DSLCPPCodeGenerator instead of CPPCodeGenerator.
This allows test DSL FPs to be created for inspection.

Change-Id: If5136279c307ea53a9df3a292caa18344c1eb259
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396096
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-13 22:01:09 +00:00
Florin Malita
8bad8f76c3 [androidkit] Register native methods explicitly
Use RegisterNatives() to bind native methods, instead of relying on
dynamic linker naming conventions.

Change-Id: I602f2efe73e3b9c3c7dfaf7af2307dcfb4cd935e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396016
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-13 15:29:19 +00:00
Florin Malita
2a650cc795 [androidkit] Split Canvas backing store into Surface
Add a Surface abstraction to manage the canvas backing store (equivalent
to SkSurface).

This allows relieving Canvas of buffer management duties - we can now
focus solely on rendering APIs at this level.

At the moment, only a Bitmap-backed surface is implemented -- but other
native surface types will be added.

Also relocate native code to 'src'.

Change-Id: I46738472536cf24524428dbd36969f2b99d251e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395536
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-04-13 13:56:04 +00:00
Florin Malita
062743a859 [androidkit] Bind canvas to native Bitmap
Wrap native Bitmap pixels using JNIGraphis APIs.

Add finalizer to clean up.

Change-Id: I22ba54e65a9cdf498e97afefe8bcc6cd88db0c95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394816
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-11 18:08:30 +00:00
Jorge Betancourt
265e3e1c0a [androidkit] initial commit for androidkit
This commit introduces the foundation for android kit.
Included is the ability to make calls to native code through the JNI as well as a wrapper for SkCanvas to be used in the Android view hierarchy.


Change-Id: Id2416776e676210d4600898bada3356a9116eb55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393356
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-04-08 20:21:04 +00:00
Kevin Lubick
7845b9700e [fuzz] Expose Region Op fuzzing to oss-fuzz.
This simplifies the fuzzer (since the important logic
is in FuzzCommon.cpp).

As requested by https://chromium-review.googlesource.com/c/chromium/src/+/2597075

Change-Id: Ia73f88ec584a2147f110755f98542e610100cfff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389736
Commit-Queue: Weston Tracey <westont@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Weston Tracey <westont@google.com>
2021-03-29 16:05:05 +00:00
Ben Wagner
25eb534f42 Convert some static_library to skia_static_library
Change-Id: I71b27467b3a72c7bafaf540d3cc2c60e6b1fa4c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387837
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-03-22 18:35:45 +00:00
Ben Wagner
3d9ab7e7ec Separate general defaults from Skia defaults
In the build there are some defaults which actually apply to every
use of a built-in target type, but there are some (particularaly
warnings) which apply only to targets controlled by Skia. Currently
these unwanted defaults are magically known to exist and removed
wherever they are not wanted. Instead, create 'skia_' prefixed target
templates and apply these defaults to those instead.

Change-Id: I3a2afb53c7205a2e2748d1cfad46319f2e93d3b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385516
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-03-22 15:30:56 +00:00
Robert Phillips
31798c2796 Remove NVPR
Bug: skia:11760
Change-Id: Ie0fc1aaa3120b37b1d452fdc9a8b5cb91b6ffe1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386559
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-03-19 12:26:38 +00:00
Tyler Denniston
333b938c95 Reland "Add SVG to default modules list"
This is a reland of 579728eb19

Original change's description:
> Add SVG to default modules list
>
> This enables SVG to build in official builds.
>
> Change-Id: I4f64109983216baf9663061e23cc3757292ff448
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386096
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>

Change-Id: I8bb93f3881e69f7b4461981a4f0f95a87fed0976
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386557
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-03-18 18:37:56 +00:00
Tyler Denniston
94c6b30728 Revert "Add SVG to default modules list"
This reverts commit 579728eb19.

Reason for revert: breaking shared release build on Windows

Original change's description:
> Add SVG to default modules list
>
> This enables SVG to build in official builds.
>
> Change-Id: I4f64109983216baf9663061e23cc3757292ff448
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386096
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>

TBR=fmalita@chromium.org,fmalita@google.com,tdenniston@google.com

Change-Id: I8547de488c56fb3e670d148287a8b6bf005f631b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386156
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-03-17 19:47:42 +00:00
Tyler Denniston
579728eb19 Add SVG to default modules list
This enables SVG to build in official builds.

Change-Id: I4f64109983216baf9663061e23cc3757292ff448
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386096
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-03-17 18:28:30 +00:00
Corentin Wallez
89d6e79ec0 Roll spirv-tools and spirv-headers and use upstream GN files
This will allow rolling spirv-tools and spirv-headers without additional
manual changes to fix Skia's copy of their BUILD.gn files.

Roll third_party/externals/spirv-headers/ c0df742ec..bcf55210f (59 commits)

c0df742ec0..bcf55210f1

$ git log c0df742ec..bcf55210f --date=short --no-merges --format='%ad %ae %s'
2020-07-03 dneto Support SPV_KHR_expect_assume
2020-07-03 dneto Support SPV_KHR_linkonce_odr
2021-03-01 alanbaker Change operand name in OpReadClockKHR to match extension
2021-02-13 dmalyshau Add Naga as SPIR-V generation tool
2020-08-19 jason Add header changes for SPV_EXT_shader_atomic_float_min_max
2021-01-27 jason.ekstrand Re-run buildSpvHeaders to fix indentation
2021-01-19 dneto Header generator: Check enumerant ordering
2021-01-27 ben.ashbaugh add generated headers
2021-01-27 ben.ashbaugh add None as a possible value for DebugInfoFlags
2021-01-25 caio.oliveira Add SPV_KHR_workgroup_memory_explicit_layout
2021-01-20 dneto Push FPDenormMode, FPOperationMode to the end
2021-01-20 dmitry.sidorov Apply suggestions to Intel extensions PR
2020-12-16 dmitry.sidorov Update generated files
2020-12-16 dmitry.sidorov Add SPV_INTEL_long_constant_composite extension
2020-12-16 dmitry.sidorov Add SPV_INTEL_loop_fuse extension
2020-11-23 dmitry.sidorov Add SPV_INTEL_fpga_cluster_attributes and SPV_INTEL_fp_fast_math_mode
2020-11-23 dmitry.sidorov Update SPV_INTEL_fpga_loop_controls extension
2020-11-16 dmitry.sidorov Update SPV_INTEL_kernel_attributes extension
2020-11-09 dmitry.sidorov Update SPV_INTEL_function_pointers extension
2020-11-09 dmitry.sidorov Upstream SPV_INTEL_float_controls2 extension
2020-11-09 dmitry.sidorov Upstream SPV_INTEL_vector_compute extension
2020-11-06 dmitry.sidorov Upstream SPV_INTEL_fpga_memory_accesses extension
2020-11-06 dmitry.sidorov Upstream SPV_INTEL_io_pipes extension
2020-11-05 dmitry.sidorov Upstream SPV_INTEL_variable_length_array extension
2020-11-05 dmitry.sidorov Upstream SPV_INTEL_usm_storage_classes extension
2020-11-05 dmitry.sidorov Upstream SPV_INTEL_arbitrary_precision_integers extensions
2020-11-05 dmitry.sidorov Upstream SPV_INTEL_inline_assembly extension
2020-11-03 dmitry.sidorov Upstream SPV_INTEL_fpga_buffer_location extension
2021-01-05 ben.ashbaugh add function control bitfield reservation section reserve bit 16 for an upcoming Intel extension
2020-11-26 dkoch remove HitTKHR
2020-11-12 dneto MeshShadingNV enables builtins PrimitiveId, Layer, and ViewportIndex
2020-10-16 dkoch de-alias/reassign OpIgnoreIntersectionKHR/OpTerminateRayKHR
2020-06-29 alele Raytracing and Rayquery updates for final
2020-06-15 alele Updated headers for new trace/executeCallable and acceleration structure cast.
2020-11-05 orbea cmake: Install cmake files to CMAKE_INSTALL_DATADIR
2020-11-04 michael.kinsner Reserve additional loop control bit for Intel extension (NoFusionINTEL) (#175)
2020-11-02 4464295+XAMPPRocky Add EmbarkStudios/rust-gpu to vendor list. (#174)
2020-10-23 john Bump revision to 4, for SPIR-V 1.5.
2020-10-19 TobyHector Add SPV_EXT_shader_image_int64 (#170)
2020-10-19 TobyHector Added SPV_KHR_fragment_shading_rate (#172)
2020-10-12 hwguy.siplus  Register the Xenia emulator as a generator (#171)
2020-09-27 atyuwen Register the Messiah SPIR-V CodeGen (#169)
2020-09-10 syoussefi Register the ANGLE compiler (#168)
2020-09-08 cepheus Rebuild of latest headers, which slightly moves OpTerminateInvocation
2020-08-03 44190824+mmerecki Reserve SPIR-V token range for upcoming Intel extensions. (#165)
2020-07-29 alanbaker Update BUILD.bazel and BUILD.gn (#166)
2020-07-29 alanbaker Publish the headers for the clspv embedded reflection non-semantic extended instruction set (#164)
2020-07-29 johnkslang Update the registry in spir-v.xml to modernize and split out opcodes. (#156)
2020-07-21 alanbaker Support SPV_KHR_terminate_invocation (#163)
2020-07-19 vkushwaha Add changes for SPV_EXT_shader_atomic_float
2020-06-26 dj2 Register the Tint compiler
2020-06-01 dneto spir-v.xml: Use plain ASCII quotes in comment
2020-05-29 cepheus Rebuild headers against the previous grammar commit.
2020-05-29 dmitry.sidorov Apply suggestions
2020-04-05 dmitry.sidorov Add Intel specific definitions from KhronosGroup/SPIRV-LLVM-Translator
2020-05-29 cepheus Header build from previous grammar update.
2020-05-25 michael.kinsner Propose bit allocation mechanism for the FP Fast Math Mode bitfield, following from the mechanism previously added for the loop control bitfield.
2020-05-20 dneto Update example to use unified1 headers
2020-04-05 dmitry.sidorov Add SPV_INTEL_function_pointers preview extension

Roll third_party/externals/spirv-tools/ e95fbfb1f..5d8c40399 (488 commits)

e95fbfb1f5..5d8c40399e

$ git log e95fbfb1f..5d8c40399 --date=short --no-merges --format='%ad %ae %s'
2021-03-11 cwallez BUILD.gn: fix typo for 'cflags' (#4169)
2021-03-10 cwallez Suppress warning (#4168)
2021-03-10 alastair.donaldson spirv-fuzz: Avoid unnecessary dependency (#4165)
2021-03-10 dgkoch Add `void` in function declaration to keep some compilers happy (#4160)
2021-03-09 cwallez Fix -Wextra-semi-stmt -Wsuggest-destructor-override -Wdeprecated-copy-dtor (#4164)
2021-03-08 46493288+sfricke-samsung spirv-val: Vulkan 64-bit OpAtomicStore check (#4163)
2021-03-05 vasniktel spirv-fuzz: Fix the bug in TransformationReplaceBranchFromDeadBlockWithExit (#4140)
2021-03-05 vasniktel spirv-fuzz: Fix PartialCount (#4159)
2021-03-03 afd spirv-fuzz: Handle Vulkan SPIR-V versions (#4156)
2021-03-03 vasniktel spirv-fuzz: Add persistent state to the fuzzer (#4137)
2021-03-02 alanbaker Require an OpSelectionMerge before an OpSwitch (#4154)
2021-03-01 stevenperron Use standard function to get stdin to binary mode. (#4141)
2021-02-26 bclayton Fixes for the vscode language server extension (#4150)
2021-02-19 atte.seppala spirv-opt: Don't call GenerateCopy for mismatched image types (#4126)
2021-02-18 jaebaek Start SPIRV-Tools v2021.0
2021-02-18 jaebaek Finalize SPIRV-Tools v2020.7
2021-02-16 jaebaek Update CHANGES
2021-02-11 greg Generate differentiated error codes for buffer oob checking (#4144)
2021-02-10 dj2 Update a few virtuals to overrides. (#4143)
2021-02-05 46493288+sfricke-samsung spriv-val: Vulkan image gather constant component (#4133)
2021-02-05 46493288+sfricke-samsung spirv-val: Fix/Label UniformConstant VUID (#4134)
2021-02-05 46493288+sfricke-samsung spirv-val: Add Vulkan Invariant Decoration VUID (#4132)
2021-02-02 46493288+sfricke-samsung spirv-val: label tests for VUID 04657 (#4119)
2021-02-01 46493288+sfricke-samsung spirv-val: Add Vulkan PSB64 convert VUID (#4122)
2021-01-28 stevenperron Mark module as modified if convert-to-half removes decorations. (#4127)
2021-01-28 jaebaek Set correct scope and line info for DebugValue (#4125)
2021-01-27 caio.oliveira Validate SPV_KHR_workgroup_memory_explicit_layout (#4128)
2021-01-27 alanbaker Validate VK_KHR_zero_initialize_workgroup_memory (#4124)
2021-01-27 46493288+sfricke-samsung spirv-val: Add Vulkan image gather offset VUID (#4118)
2021-01-27 alanbaker Add cmake to windows path for kokoro (#4129)
2021-01-25 46493288+sfricke-samsung spirv-val: Label Vulkan atomic semantics VUIDs (#4120)
2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04662 (#4123)
2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04683 (#4121)
2021-01-22 machenbach Remove obsolete GN config (#4110)
2021-01-20 46493288+sfricke-samsung spirv-val: Add Vulkan EXT builtins (#4115)
2021-01-20 dneto Support pending Intel extensions (#4116)
2021-01-19 dneto Validate Sampled=1 for Vulkan ImageQuerySizeLod, ImageQueryLevels, ImageQueryLod (#4103)
2021-01-19 46493288+sfricke-samsung spirv-val: Add Vulkan Memory Scope VUs (#4106)
2021-01-18 bclayton Migrate all Kokoro build scripts over to use the docker VM image (#4114)
2021-01-15 46493288+sfricke-samsung spirv-val: Add Vulkan Addressing Model check (#4107)
2021-01-14 rharrison Remove WebGPU support (#4108)
2021-01-14 46493288+sfricke-samsung spirv-val: Vulkan atomic storage class (#4079)
2021-01-13 jaebaek Avoid integrity check failures caused by propagating line instructions (#4096)
2021-01-13 pierremoreau Linker usability improvements (#4084)
2021-01-12 dj2 Revert "Generate differentiated error codes for buffer oob checking (#4097)" (#4100)
2021-01-11 greg Generate differentiated error codes for buffer oob checking (#4097)
2021-01-07 dneto use std::string::empty() to test for emptiness (#4098)
2021-01-07 46493288+sfricke-samsung spirv-val: Label standalone Vulkan VUID (#4091)
2021-01-06 46493288+sfricke-samsung spirv-val: Add Vulkan decroation VUID (#4090)
2021-01-06 stevenperron Fix binding number calculation in desc sroa (#4095)
(...)
2020-05-19 vasniktel spirv-fuzz: Remove FuzzerPassAddUsefulConstructs (#3341)
2020-05-19 vasniktel Add support for StorageBuffer (#3348)
2020-05-19 462213+sl1pkn07 Prevent Effcee install his things when build spirv-tools with testing enabled (#3256)
2020-05-19 stevenperron Don't register edges twice in merge return (#3350)
2020-05-14 stevenperron Revert "Revert "[spirv-opt] refactor inlining pass (#3328)" (#3342)" (#3345)
2020-05-14 afdx spirv-reduce: Remove unused struct members (#3329)
2020-05-14 andreperezmaselco.developer Add adjust branch weights transformation (#3336)
2020-05-13 stevenperron Revert "[spirv-opt] refactor inlining pass (#3328)" (#3342)
2020-05-13 jaebaek [spirv-opt] refactor inlining pass (#3328)
2020-05-13 afdx spirv-reduce: Remove unused uniforms and similar (#3321)
2020-05-13 afdx spirv-fuzz: Fix to fact manager (#3339)
2020-05-13 afdx spirv-fuzz: Get rid of unnecessary template method (#3340)
2020-05-12 stevenperron Do merge return if the return is not at the end of the function. (#3337)
2020-05-06 jaebaek Preserve debug info for wrap-opkill (#3331)
2020-05-05 jbolz Validate ShaderCallKHR memory scope (#3332)
2020-05-01 afdx spirv-fuzz: Do not allow adding stores to read-only pointers (#3316)
2020-04-30 paulthomson reduce: increase default step limit (#3327)
2020-04-30 afdx Generalize IsReadOnlyVariable() to apply to pointers (#3325)
2020-04-28 stevenperron Delete nullptr in function bb list immedietly (#3326)
2020-04-28 jaebaek Set DebugScope for termination instructions (#3323)
2020-04-28 afdx spirv-fuzz: Do not outline regions that end with a loop header (#3312)
2020-04-27 bclayton vscode: Handle '|' chains on BitEnum / ValueEnum (#3309)
2020-04-27 jaebaek Add debug information analysis (#3305)
2020-04-27 dneto Add spvtools::opt::Operand::AsLiteralUint64 (#3320)
2020-04-27 afdx spirv-fuzz: Pass on validator options during shrinking (#3317)
2020-04-27 afdx spirv-fuzz: Clamp statically out-of-bounds accesses in code donation (#3315)
2020-04-27 afdx spirv-fuzz: Fix memory management in the fact manager (#3313)
2020-04-27 afdx spirv-fuzz: Do not replace the Sample argument in OpImageTexelPointer (#3311)
2020-04-23 afdx Allow various validation options to be passed to spirv-opt (#3314)
2020-04-23 Chaitanyas0101 typo fix: in README.md exectuable->executable (#3306)
2020-04-20 afdx spirv-fuzz: Make handling of synonym facts more efficient (#3301)
2020-04-15 stevenperron Remove unreachable code. (#3304)
2020-04-15 afdx spirv-fuzz: Fix to outliner (#3302)
2020-04-14 afdx spirv-fuzz: Do not outline regions that produce pointer outputs (#3291)
2020-04-14 afdx spirv-fuzz: Handle OpRuntimeArray when replacing ids with synonyms (#3292)
2020-04-14 afdx spirv-fuzz: Handle image storage class in donation (#3290)
2020-04-14 afdx spirv-fuzz: Respect rules for OpSampledImage (#3287)
2020-04-14 afdx spirv-fuzz: Fix comment. (#3300)
2020-04-14 stevenperron Sampled images as read-only storage (#3295)
2020-04-14 alanbaker Remove implicit fallthrough (#3298)
2020-04-14 stevenperron Add tests for recently added command line option (#3297)
2020-04-14 dneto If SPIRV-Headers is in our tree, include it as subproject (#3299)
2020-04-13 stevenperron Struct CFG analysus and single block loop (#3293)
2020-04-13 jaebaek Preserve debug info in eliminate-dead-functions (#3251)
2020-04-13 stevenperron Update acorn version (#3294)
2020-04-09 stevenperron Handle more cases in dead member elim (#3289)
2020-04-09 h.baensch.92 Fix pch macro to ignore clang-cl (#3283)
2020-04-07 afdx spirv-fuzz: Improve the handling of equation facts (#3281)
2020-04-07 afdx spirv-fuzz: Handle more general SPIR-V in donation (#3280)
2020-04-06 afdx spirv-fuzz: Improve support for compute shaders in donation (#3277)

Created with:
  roll-dep third_party/externals/spirv-headers third_party/externals/spirv-tools

Bug: dawn:706

Change-Id: I4ca1acd84b4905cf5454e146a917e36fc8c2d399
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381237
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2021-03-11 19:07:20 +00:00
Chris Dalton
9ff7eef906 Rename SampleCCPRGeometry.cpp -> SampleStrokeVerb.cpp
Also removes the CCPR stuff prior to its deletion.

Change-Id: I63db69ed4a66a11a2006c82e403d89c89af153eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380596
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-08 16:37:09 +00:00
Adlai Holler
ccb686685a Activate FuzzDDLThreading
This was landed but not turned on. D'oh!

Bug: skia:10286
Change-Id: I65682370046c87c854d806253db32795ef3a9d14
Cq-Include-Trybots: luci.skia.skia.primary:Fuzz-Debian10-Clang
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375736
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-02-25 21:26:07 +00:00
Brian Osman
d010f659bb Trace shader compilation for clients other than Android framework
We had added detailed events specifically when running in Android
framework, but other clients (eg, Flutter) would like these, too.

To keep the same semantics in Android, added a new _ALWAYS variant
of TRACE_EVENT0. It works like TRACE_EVENT0, but has the _ALWAYS
semantics in Android.

Bug: skia:11360
Change-Id: I13fd77445e0d2a05e46b75629b37bab5f571b02e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375018
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-24 20:08:14 +00:00
Adlai Holler
ea8d1971b8 Add a fuzzer for DDL threading
This helps us find any issues with the promise image sharing.

Bug: skia:10286
Change-Id: I393655c2de76f896d9f376765894f84c015b2760
Cq-Include-Trybots: luci.skia.skia.primary:Fuzz-Debian10-Clang
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/374317
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-02-23 21:33:31 +00:00
Brian Salomon
be6de9b54e Support building GrGLInterface factory functions for both EGL and GLX.
Bug: skia:11293
Change-Id: Ie99c587fd8d466cb4260d8a78b9cff84a63315e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372200
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-23 16:37:48 +00:00
Robert Phillips
cd1e397350 Add new experimental ddlbench
This intended to let us experiment w/ threaded compilation before having
to worry about upstreaming features.

Change-Id: Id9d1807de0fa16475184203d293e00bfaf5fcc01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373736
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2021-02-23 13:15:20 +00:00
Ben Wagner
a3e5e555d5 Reland "Reland "Test mac system font variations.""
This reverts commit 759f2613b5.

Reason for revert: Fix bzl build.

Original change's description:
> Revert "Reland "Test mac system font variations.""
>
> This reverts commit ba55be671d.
>
> Reason for revert: G3 roll
>
> (08:59:24) ERROR: third_party/skia/HEAD/BUILD:926:10: Compiling third_party/skia/HEAD/tests/TypefaceMacTest.cpp failed: (Exit 1) driver_is_not_gcc failed: error executing command third_party/crosstool/v18/stable/toolchain/bin/driver_is_not_gcc '-frandom-seed=blaze-out/k8-fastbuild/bin/third_party/skia/HEAD/_objs/dm/TypefaceMacTest.pic.o' -DSK_USE_FREETYPE_EMBOLDEN ... (remaining 383 argument(s) skipped).  [forge_remote_host=ixog19]
> third_party/skia/HEAD/tests/TypefaceMacTest.cpp:31:45: error: unknown type name 'CTFontRef'
>     auto makeSystemFont = [](float size) -> CTFontRef {
>                                             ^
> third_party/skia/HEAD/tests/TypefaceMacTest.cpp:33:46: error: use of undeclared identifier 'kCTFontUIFontSystem'
>         return CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, size, nullptr);
>                                              ^
> 2 errors generated.
>
> Original change's description:
> > Reland "Test mac system font variations."
> >
> > This reverts commit 4c0b9b90d6.
> >
> > Reason for revert: Work around broken -Wrange-loop-analysis
> >
> > Original change's description:
> > > Revert "Test mac system font variations."
> > >
> > > This reverts commit a612dc77d7.
> > >
> > > Reason for revert: Breaking iOS builds.
> > >
> > > Original change's description:
> > > > Test mac system font variations.
> > > >
> > > > On macOS system fonts are special and sometimes have different behavior
> > > > from fonts generated from data. Add a test which exercises several
> > > > expectations about changing the variation on the system ui font.
> > > >
> > > > Bug: skia:10968
> > > > Change-Id: Ia10dfbf7f4f0ff099f9bfebf95481c95c7d3715f
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372218
> > > > Commit-Queue: Ben Wagner <bungeman@google.com>
> > > > Reviewed-by: Herb Derby <herb@google.com>
> > >
> > > TBR=bungeman@google.com,herb@google.com,drott@google.com
> > >
> > > Change-Id: Iccc05f25d827ab85c507b5f3bde936561349e2b8
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:10968
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372678
> > > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> >
> > # Not skipping CQ checks because this is a reland.
> >
> > Bug: skia:10968
> > Change-Id: Ifddc6c5ada335d97f7796df7f6ea10577f6bc252
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372776
> > Commit-Queue: Ben Wagner <bungeman@google.com>
> > Reviewed-by: Ben Wagner <bungeman@google.com>
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:10968
> Change-Id: Ia5ff4ff827e3f79ff17b4d99458ffb45b7c36c58
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373277
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

Bug: skia:10968
Change-Id: Ieb79128745dc934a7469d84b27a9e9f3306704df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373620
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-22 18:48:49 +00:00
Jim Van Verth
2db4ba1caf Reland "Remove ARC from tools lib."
This is a reland of 4c4c80fa12

Original change's description:
> Remove ARC from tools lib.
>
> Trying this in baby steps to manage leaks better.
>
> Change-Id: Id8597ba236c752bcbf1c7ec94f6c1021e636d547
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372556
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>

Change-Id: Ib5c949ee9e8ac9f47de1991297aec718f3185424
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373616
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-02-22 17:55:52 +00:00
Mike Klein
759f2613b5 Revert "Reland "Test mac system font variations.""
This reverts commit ba55be671d.

Reason for revert: G3 roll

(08:59:24) ERROR: third_party/skia/HEAD/BUILD:926:10: Compiling third_party/skia/HEAD/tests/TypefaceMacTest.cpp failed: (Exit 1) driver_is_not_gcc failed: error executing command third_party/crosstool/v18/stable/toolchain/bin/driver_is_not_gcc '-frandom-seed=blaze-out/k8-fastbuild/bin/third_party/skia/HEAD/_objs/dm/TypefaceMacTest.pic.o' -DSK_USE_FREETYPE_EMBOLDEN ... (remaining 383 argument(s) skipped).  [forge_remote_host=ixog19]
third_party/skia/HEAD/tests/TypefaceMacTest.cpp:31:45: error: unknown type name 'CTFontRef'
    auto makeSystemFont = [](float size) -> CTFontRef {
                                            ^
third_party/skia/HEAD/tests/TypefaceMacTest.cpp:33:46: error: use of undeclared identifier 'kCTFontUIFontSystem'
        return CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, size, nullptr);
                                             ^
2 errors generated.

Original change's description:
> Reland "Test mac system font variations."
>
> This reverts commit 4c0b9b90d6.
>
> Reason for revert: Work around broken -Wrange-loop-analysis
>
> Original change's description:
> > Revert "Test mac system font variations."
> >
> > This reverts commit a612dc77d7.
> >
> > Reason for revert: Breaking iOS builds.
> >
> > Original change's description:
> > > Test mac system font variations.
> > >
> > > On macOS system fonts are special and sometimes have different behavior
> > > from fonts generated from data. Add a test which exercises several
> > > expectations about changing the variation on the system ui font.
> > >
> > > Bug: skia:10968
> > > Change-Id: Ia10dfbf7f4f0ff099f9bfebf95481c95c7d3715f
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372218
> > > Commit-Queue: Ben Wagner <bungeman@google.com>
> > > Reviewed-by: Herb Derby <herb@google.com>
> >
> > TBR=bungeman@google.com,herb@google.com,drott@google.com
> >
> > Change-Id: Iccc05f25d827ab85c507b5f3bde936561349e2b8
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:10968
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372678
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
>
> # Not skipping CQ checks because this is a reland.
>
> Bug: skia:10968
> Change-Id: Ifddc6c5ada335d97f7796df7f6ea10577f6bc252
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372776
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

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

Bug: skia:10968
Change-Id: Ia5ff4ff827e3f79ff17b4d99458ffb45b7c36c58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373277
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-21 18:34:24 +00:00
Ben Wagner
ba55be671d Reland "Test mac system font variations."
This reverts commit 4c0b9b90d6.

Reason for revert: Work around broken -Wrange-loop-analysis

Original change's description:
> Revert "Test mac system font variations."
>
> This reverts commit a612dc77d7.
>
> Reason for revert: Breaking iOS builds.
>
> Original change's description:
> > Test mac system font variations.
> >
> > On macOS system fonts are special and sometimes have different behavior
> > from fonts generated from data. Add a test which exercises several
> > expectations about changing the variation on the system ui font.
> >
> > Bug: skia:10968
> > Change-Id: Ia10dfbf7f4f0ff099f9bfebf95481c95c7d3715f
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372218
> > Commit-Queue: Ben Wagner <bungeman@google.com>
> > Reviewed-by: Herb Derby <herb@google.com>
>
> TBR=bungeman@google.com,herb@google.com,drott@google.com
>
> Change-Id: Iccc05f25d827ab85c507b5f3bde936561349e2b8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10968
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372678
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

# Not skipping CQ checks because this is a reland.

Bug: skia:10968
Change-Id: Ifddc6c5ada335d97f7796df7f6ea10577f6bc252
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372776
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-02-20 15:46:13 +00:00
Jim Van Verth
e8a1c0150b Revert "Remove ARC from tools lib."
This reverts commit 4c4c80fa12.

Reason for revert: Need to update Flutter with sk_cf_obj renaming.

Original change's description:
> Remove ARC from tools lib.
>
> Trying this in baby steps to manage leaks better.
>
> Change-Id: Id8597ba236c752bcbf1c7ec94f6c1021e636d547
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372556
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>

TBR=jvanverth@google.com,bsalomon@google.com,adlai@google.com

Change-Id: I7dc226d002184b80a1d8d2aee09d122d2e13d732
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372680
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-02-20 00:08:41 +00:00
Jim Van Verth
4c0b9b90d6 Revert "Test mac system font variations."
This reverts commit a612dc77d7.

Reason for revert: Breaking iOS builds.

Original change's description:
> Test mac system font variations.
>
> On macOS system fonts are special and sometimes have different behavior
> from fonts generated from data. Add a test which exercises several
> expectations about changing the variation on the system ui font.
>
> Bug: skia:10968
> Change-Id: Ia10dfbf7f4f0ff099f9bfebf95481c95c7d3715f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372218
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Herb Derby <herb@google.com>

TBR=bungeman@google.com,herb@google.com,drott@google.com

Change-Id: Iccc05f25d827ab85c507b5f3bde936561349e2b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10968
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372678
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-02-19 23:26:31 +00:00
Jim Van Verth
4c4c80fa12 Remove ARC from tools lib.
Trying this in baby steps to manage leaks better.

Change-Id: Id8597ba236c752bcbf1c7ec94f6c1021e636d547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372556
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2021-02-19 22:21:43 +00:00
Ben Wagner
a612dc77d7 Test mac system font variations.
On macOS system fonts are special and sometimes have different behavior
from fonts generated from data. Add a test which exercises several
expectations about changing the variation on the system ui font.

Bug: skia:10968
Change-Id: Ia10dfbf7f4f0ff099f9bfebf95481c95c7d3715f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372218
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-02-19 22:16:40 +00:00
Brian Osman
1e7d8aa142 Fix output path of run_sksllex to match what the script does
This doesn't get rid of the warning about multiple rules, but it does
ensure the build reaches steady state (after two runs).

Change-Id: I9a90b8e310225fb5cab544a86dd271162d0fe0df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372122
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-19 16:32:07 +00:00
James Clarke
b2bfa9d457 Fix UWP build
Bug: skia:11102
Change-Id: Id7f91da15d3021ebe9acad968165521a7d590fed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372162
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-19 11:41:47 +00:00