Commit Graph

2995 Commits

Author SHA1 Message Date
Brian Osman
bbbf1a7f50 Redesign program key construction
This does two things:
1) Moves responsibility for bit-packing portions of the key into the key
   itself. A new GrKeyBuilder type manages adding bits, with asserts to
   ensure a value always fits in the requested number. In theory this
   will let us generate smaller keys overall, at the expense of slightly
   more complex code during construction.
2) Adds a string label parameter for key methods that fold in data. For
   new methods, the label is required. To ease migration, the old add32
   does not require a label (yet). This will let us generate detailed,
   human readable keys, either based on SK_DEBUG, or a runtime option
   (if we're comfortable paying the cost).

Bug: skia:11372
Change-Id: Ib0f941551e0dbadabbd2a7de912b00e9e766b166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377876
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-03-02 23:46:48 +00:00
Chris Dalton
4ac9aadd30 Make it possible to enable hw tessellation outside of test builds
Bug: chromium:1172543
Change-Id: I9733a8758d902a8d46d442de5d099d923efc2184
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-02-25 16:21:09 +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
Adlai Holler
c44e21f37e Add a new entry point for making promise images
This paves the way for promise image sharing among direct & recording
contexts, and untethers promise images from DDL recorder.

Followup CLs will migrate us to actually use this entry point,
and then migrate Chrome to do same.

Bug: skia:10286
Change-Id: I0ad46e8e4b91d8bc03cb039b304d2ea6d8a65c35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373716
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-22 23:33:56 +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
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
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
Adlai Holler
17776e38ef Move GrProxyProvider down to GrRecordingContext
Bug: skia:10286
Change-Id: I474cb0e4cbde3b576604e80891912104990b786c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372118
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2021-02-18 20:06:25 +00:00
Brian Salomon
bde1eb681c Remove GrDirectContext::ComputeImageSize. Use SkImage::textureSize.
Bug: skia:11208
Change-Id: Ie5f56b6d168ab43189be75bb2be60b315e724569
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/371958
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-18 16:56:19 +00:00
Greg Daniel
d50ccf2d53 Remove SK_USE_LEGACY_VK_ALLOCATOR_USAGE_NAMES code.
Bug: skia:11207
Change-Id: I7e6f7bc93bac6d36c61c2e6500a2c5e0f7556bcb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369477
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-02-17 20:30:48 +00:00
Brian Salomon
ed76e8109b Reenable Wdeprecated-copy-dtor
Change-Id: Id28ed827c4a896805c6d4eead339146fdd49e35f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359560
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-16 17:53:28 +00:00
Brian Salomon
441b33fe0e rm pow2 arg to GrDirectContext::ComputeImagesize
Bug: skia:11208
Change-Id: I573be306e168adbd1c521626b2d1e4a303f8d5d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368621
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-11 13:44:52 +00:00
Greg Daniel
84b0233bb3 Rename vulkan memory allocator buffer usage enum values to be more specific.
These renames need to be staged so we can update chrome which has their
own implementation of GrVkMemoryAllocator.

Bug: skia:11207
Change-Id: Ic68927217fe0314cdba1b1aa7ffd80261cb5e646
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368856
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-10 23:03:44 +00:00
Brian Salomon
759217eb94 Reland "Make GrDirectContext::updateBackendTexture handle pixmaps with non-type row bytes."
This is a reland of 07d8c0d11c

Original change's description:
> Make GrDirectContext::updateBackendTexture handle pixmaps with non-type row bytes.
>
> Some GL contexts don't support GL_UNPACK_ROW_LENGTH and we must
> copy the src data to a pixmap with tight row bytes.
>
> Bug: chromium:1170392
>
> Change-Id: I4590f20dbc80cb792f30f0059536716cf106f6c3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361717
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: chromium:1170392
Change-Id: I6fb759c35f86d816b16694b00edaa1116a446d15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363099
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-31 19:34:51 +00:00
Brian Salomon
010bb4659b Revert "Revert "Remove maxTileSize from GrCaps, bleed GMs use max texture size override.""
Use of uninit memory in bench fixed here:
 https://skia-review.googlesource.com/c/skia/+/362478

This reverts commit c621dcf354.

Bug: skia:11208
Change-Id: Ia13dde689a982f485a93daf8eeb8b716c9c23796
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362456
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-31 17:43:21 +00:00
Mike Klein
0928963d9d Revert "Make GrDirectContext::updateBackendTexture handle pixmaps with non-type row bytes."
This reverts commit 07d8c0d11c.

Reason for revert: Looks like failures on PowerVR?  (Test-Android-Clang-TecnoSpark3Pro-GPU-PowerVRGE8320-arm-Release-All-Android)

Original change's description:
> Make GrDirectContext::updateBackendTexture handle pixmaps with non-type row bytes.
>
> Some GL contexts don't support GL_UNPACK_ROW_LENGTH and we must
> copy the src data to a pixmap with tight row bytes.
>
> Bug: chromium:1170392
>
> Change-Id: I4590f20dbc80cb792f30f0059536716cf106f6c3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361717
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ie5791bf19b993d46383c5b837b948584487c0496
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1170392
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363037
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-30 17:44:50 +00:00
Greg Daniel
a89b43092e Add syncing of gpu work before releasing resources in GrDirectContext teardowns.
As we start moving backends to tracking resources on command buffers by using
GrGpuResources, we need to make sure we don't release this resources from the
cache during teardown until they have finished on the gpu. Thus this CL adds
a way for the GrDirectContext to tell the GrGpu to finish all outstanding
work.

Bug: skia:11232
Change-Id: I953d89f514ad32f1d2c57279a670b336d7575ffe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361457
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-01-29 20:35:53 +00:00
Brian Salomon
07d8c0d11c Make GrDirectContext::updateBackendTexture handle pixmaps with non-type row bytes.
Some GL contexts don't support GL_UNPACK_ROW_LENGTH and we must
copy the src data to a pixmap with tight row bytes.

Bug: chromium:1170392

Change-Id: I4590f20dbc80cb792f30f0059536716cf106f6c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361717
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-29 19:11:18 +00:00
Brian Salomon
c621dcf354 Revert "Remove maxTileSize from GrCaps, bleed GMs use max texture size override."
This reverts commit 0bad6cf145.

Reason for revert: breaking perf bot!?!?

Original change's description:
> Remove maxTileSize from GrCaps, bleed GMs use max texture size override.
>
> This existed to enable shader-based versions of the old bleed GM that no
> longer exist. It is currently making it harder to simplify image->view
> consolidation without accidentally limiting the testing. This is because
> an attempt to create a texture from a bitmap will succeed if max texture
> size is not overridden by the test.
>
> Bug: skia:11208
> Change-Id: I432d1d2ab66c1e888c9d77583b3c9a9d673e7e8f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360609
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

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

Bug: skia:11208
Change-Id: Ib8643aec37ac312ac0a2fb834cc3dbf116f7a898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362099
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-29 17:54:48 +00:00
Brian Salomon
0bad6cf145 Remove maxTileSize from GrCaps, bleed GMs use max texture size override.
This existed to enable shader-based versions of the old bleed GM that no
longer exist. It is currently making it harder to simplify image->view
consolidation without accidentally limiting the testing. This is because
an attempt to create a texture from a bitmap will succeed if max texture
size is not overridden by the test.

Bug: skia:11208
Change-Id: I432d1d2ab66c1e888c9d77583b3c9a9d673e7e8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360609
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-01-28 15:01:59 +00:00
Greg Daniel
1089c0c59c Make sure we are using cached cpu memory for vulkan readback buffers.
Bug: b/175913056 skia:11207
Change-Id: I7fff0e164844850a957ae9374bed13584fd18ae1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357337
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-01-22 23:13:32 +00:00
Brian Salomon
0c0b5a6bb2 Remove SkYUVASizeInfo, make SkYUVAIndex a private part of SkYUVAInfo
Bug: skia:10632
Change-Id: If4dd7779b0856f6d0b441381bf7f2f51527cdb9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/352497
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-12 15:06:26 +00:00
Adlai Holler
78036086cf Add a new implementation of reduceOpsTaskSplitting
Currently this doesn't actually handle going over the memory
budget, but it does carve out space to do that later. This algorithm
can't handle everything yet but I want to get it landed for
more iteration as long as it's disabled.

Bug: skia:10877
Change-Id: I37942172345e8cfd6fc2c591a3788a10652377da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345168
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2021-01-07 17:20:03 +00:00
Adlai Holler
4ef108e6d1 Reland "Yank out old reduceOpsTaskSplitting code"
This reverts commit 7689319271.

Reason for revert: Sticking with this despite regression

Original change's description:
> Revert "Yank out old reduceOpsTaskSplitting code"
>
> This reverts commit dfc880bd9b.
>
> Reason for revert: chromium:1146701
>
> Original change's description:
> > Yank out old reduceOpsTaskSplitting code
> >
> > The behavior previously triggered by this flag is reimplemented
> > in review.skia.org/345168 . The current implementation isn't used
> > and can't really be used safely because it may go over the
> > GPU memory budget.
> >
> > Bug: skia:10877
> > Change-Id: I2759c688aa60a618ef76dfec0a49ef5e5f0a9afc
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345477
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Auto-Submit: Adlai Holler <adlai@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:10877 chromium:1146701
> Change-Id: I90cdd16eaf033b816f2d1830fd0ee72fdc0ec74b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346777
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

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

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

Bug: skia:10877 chromium:1146701
Change-Id: Idb734bebe4d0baac9d47539791b0e6240d6be2da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348883
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-12-30 17:28:08 +00:00
Adlai Holler
245c59a3ff Reland "Have DDLs honor the reduceOpsTaskSplittingFlag"
This reverts commit 6e9bf51dd8.

Reason for revert: We're sticking with this despite regression

Original change's description:
> Revert "Have DDLs honor the reduceOpsTaskSplittingFlag"
>
> This reverts commit d7b59c091d.
>
> Reason for revert: Regression in chrome:1146701
>
> Original change's description:
> > Have DDLs honor the reduceOpsTaskSplittingFlag
> >
> > Especially while I'm fiddling with the implementation, we don't
> > want the user to be surprised when using DDLs also triggers
> > this other codepath.
> >
> > Bug: skia:10877
> > Change-Id: I660ea08189fff45acd7a45df12e15c45f607758a
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332720
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Auto-Submit: Adlai Holler <adlai@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:10877 chromium:1146701
> Change-Id: Ieab2853b54663e7633bec6d71929db9885251ed2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346659
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>

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

# Not skipping CQ checks because this is a reland.

Bug: skia:10877 chromium:1146701
Change-Id: I754436755829d25da3fdb37f634669ae33419eb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348882
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-12-30 17:20:37 +00:00
Adlai Holler
6e9bf51dd8 Revert "Have DDLs honor the reduceOpsTaskSplittingFlag"
This reverts commit d7b59c091d.

Reason for revert: Regression in chrome:1146701

Original change's description:
> Have DDLs honor the reduceOpsTaskSplittingFlag
>
> Especially while I'm fiddling with the implementation, we don't
> want the user to be surprised when using DDLs also triggers
> this other codepath.
>
> Bug: skia:10877
> Change-Id: I660ea08189fff45acd7a45df12e15c45f607758a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332720
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Auto-Submit: Adlai Holler <adlai@google.com>

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

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

Bug: skia:10877 chromium:1146701
Change-Id: Ieab2853b54663e7633bec6d71929db9885251ed2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346659
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-12-29 21:13:18 +00:00
Adlai Holler
7689319271 Revert "Yank out old reduceOpsTaskSplitting code"
This reverts commit dfc880bd9b.

Reason for revert: chromium:1146701

Original change's description:
> Yank out old reduceOpsTaskSplitting code
>
> The behavior previously triggered by this flag is reimplemented
> in review.skia.org/345168 . The current implementation isn't used
> and can't really be used safely because it may go over the
> GPU memory budget.
>
> Bug: skia:10877
> Change-Id: I2759c688aa60a618ef76dfec0a49ef5e5f0a9afc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345477
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Auto-Submit: Adlai Holler <adlai@google.com>

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

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

Bug: skia:10877 chromium:1146701
Change-Id: I90cdd16eaf033b816f2d1830fd0ee72fdc0ec74b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346777
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-12-22 20:29:52 +00:00
Adlai Holler
dfc880bd9b Yank out old reduceOpsTaskSplitting code
The behavior previously triggered by this flag is reimplemented
in review.skia.org/345168 . The current implementation isn't used
and can't really be used safely because it may go over the
GPU memory budget.

Bug: skia:10877
Change-Id: I2759c688aa60a618ef76dfec0a49ef5e5f0a9afc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345477
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-12-18 01:14:20 +00:00
Brian Salomon
01ff5384bf Support luminance-alpha GL format for YUVA planes
Bug: skia:10632
Change-Id: Ic91510b55644c15ee4eb5f96e7c35193b5ce49df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344761
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-17 14:54:25 +00:00
Chris Dalton
15f51848df Reland "Disable HW tessellation shaders by default"
This is a reland of ad8b9fa2d7

Original change's description:
> Disable HW tessellation shaders by default
>
> The GLSL backdoor for tessellation shaders is only experimental at
> this point. In order to enable the tessellation path renderer, we need
> to turn off HW tessellation and let it use the indirect draw modes.
>
> Bug: skia:10419
> Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com
Bug: skia:10419
Change-Id: I0bdf34da134a3a34a5c78b35cc0eb86d6e989bb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344796
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-12-16 05:08:25 +00:00
Chris Dalton
1c2584d8cc Revert "Disable HW tessellation shaders by default"
This reverts commit ad8b9fa2d7.

Reason for revert: Benchmark failure

Original change's description:
> Disable HW tessellation shaders by default
>
> The GLSL backdoor for tessellation shaders is only experimental at
> this point. In order to enable the tessellation path renderer, we need
> to turn off HW tessellation and let it use the indirect draw modes.
>
> Bug: skia:10419
> Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ia74dbcec582168870bd3ccc5e52b8dce0fb2bdfc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344698
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-12-15 20:45:46 +00:00
Chris Dalton
ad8b9fa2d7 Disable HW tessellation shaders by default
The GLSL backdoor for tessellation shaders is only experimental at
this point. In order to enable the tessellation path renderer, we need
to turn off HW tessellation and let it use the indirect draw modes.

Bug: skia:10419
Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-12-15 18:36:44 +00:00
Brian Salomon
eebe735dea GrRenderTargetContext->GrSurfaceDrawContext
Just the class/files. variable names and additional comments to follow.

Change-Id: Ic03d07fd5009eaf3d706c2536486a117328963fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-10 18:51:19 +00:00
Adlai Holler
a4bd478bc2 Destroy GrRecordingContext::fAuditTrail last when
In crbug.com/1155871, the audit trail is used during destruction of the
drawing manager.

Bug: chromium:1155871
Change-Id: I74015a033c7620bdad03ac7a3cf5a7ee671482f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342305
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-12-09 19:10:15 +00:00
Brian Salomon
c1e5fb6207 Rewrite restore_scissor_on_fbo_change
Old workaround was never used by chrome and was insufficient for
SkiaRenderer bug on Adreno 3xx.

Use same name used by Chrome.

Always set the scissor state before every draw/clear when using FBO 0.

Bug: chromium:1152831
Change-Id: Ibf0453d949fa3d5cb964411da3bcc1ec62a3d3a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342076
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-09 16:15:09 +00:00
Brian Salomon
b5f880a3f6 Take origin when creating/updating backend texture using pixmaps.
Bug: skia:11042

Change-Id: I511c7556f97f19d7f162031c245019d2da33c129
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341005
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-07 20:31:10 +00:00
Robert Phillips
c4fbc8d6cf Stop overflow of windows rects in GrClipStack
Bug: skia:10989
Change-Id: I512ccbd3d95178756ae436f7c67ed53d46105ae7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339165
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-11-30 18:12:24 +00:00
Jim Van Verth
9e64047a04 Add MTLBinaryArchive support to iOS Metal build
Change-Id: I7a4f58e4fc1fc18c42de372dd480e0681000e2f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333758
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-11-19 20:00:30 +00:00
Brian Salomon
94584f4574 Remove unused macros from GrGLConfig.h, GrGLConfig_chrome.h, and scripts
Change-Id: I5a9e7d490fd71f326ac37a72eb942fc64f557733
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335666
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-11-18 20:23:35 +00:00
Jim Van Verth
351c9b53d6 Switch to using GrMtlBackendContext for GrDirectContext creation.
Makes the Metal backend more consistent with the other backends,
and allows new init parameters to be added without significantly
changing API.

Added updated sk_cf_obj because I needed some of its functionality.

Bug: skia:10804
Change-Id: I6f1dd1c03ddc4c4b702ea75eff14bc0f98ab5ad2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334426
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-11-12 21:03:51 +00:00
Brian Salomon
e4387382c2 Split SkYUVAInfo::PlanarConfig into PlaneConfig and Subsampling enums
Sometimes it's helpful to think about subsampling separately from
how the channels are spread across planes.

Bug: skia:10632
Change-Id: Ib03f71195f9706ef6def418b1f2125c29e0cf738
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334102
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-11 22:42:36 +00:00
Brian Salomon
bd3792de72 Add SkYUVAInfo-based promise texture image factory
Bug: skia:10632
Change-Id: I6a31f2d712f704850ba5246208dc8a4a6e6916eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333519
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-11 14:38:55 +00:00
Adlai Holler
d7b59c091d Have DDLs honor the reduceOpsTaskSplittingFlag
Especially while I'm fiddling with the implementation, we don't
want the user to be surprised when using DDLs also triggers
this other codepath.

Bug: skia:10877
Change-Id: I660ea08189fff45acd7a45df12e15c45f607758a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332720
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-11-06 20:20:44 +00:00
Greg Daniel
1448eb979d Fix formatting nit.
Change-Id: Id107d50ba23db4491d54d80b1d4c688bd3e80ebc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332741
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2020-11-06 16:46:44 +00:00
Adlai Holler
3078f85ca5 Remove dead no-sorting GrDrawingManager code paths
This simplifies our world a little bit.

Bug: skia:10877
Change-Id: I2fb27cd53e9fda0f279c046f6eaa50fd02774e72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332604
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-06 14:49:50 +00:00
Greg Daniel
007d97d699 Allow creating SkSurfaceCharacterizations directly for vk secondary CB context.
Bug: chromium:1144921
Change-Id: I9ca905eb9f2542aafbde25e0baa5430640277699
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331877
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-04 16:43:42 +00:00
Herb Derby
e32e1aba34 replace GrOpMemoryPool with GrMemoryPool
Change-Id: I93fdeaa3ea6be73619f82859bb53aa88fae3262b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329962
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-10-27 16:15:11 +00:00
Adlai Holler
9ae860a9fe Reland "Remove GrContext"
This reverts commit 3172208ad0.

Reason for revert: Fixed issues

Original change's description:
> Revert "Remove GrContext"
>
> This reverts commit 2edf18d818.
>
> Reason for revert: breaking wasm-debugger
>
> Original change's description:
> > Remove GrContext
> >
> > Woo!
> >
> > Change-Id: Ifa3ff7e79c7048c2f1d808cc9705593d72886f08
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326436
> > Auto-Submit: Adlai Holler <adlai@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> Change-Id: Ie05bda5dad7fb5d369ebe579d2e009fdb99c0729
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326941
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I141a473439a2b444aac1944e434e8b48d9fda428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327217
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-20 17:20:51 +00:00
Adlai Holler
b270568f29 Almost remove GrContext
This is everything except for literally removing the class.

Change-Id: I2f16caf865d1bcf9c0f267aed73313c0676a73bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327222
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-20 15:52:01 +00:00
Brian Salomon
c1a249d1dc Revert "Revert "New variant of SkImage::MakeFromYUVATextures.""
This reverts commit be8004d2fb.

Bug: skia:10632
Change-Id: I52dd36ae167623563c7554c40092442a3822ee3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-19 15:37:29 +00:00