Commit Graph

75 Commits

Author SHA1 Message Date
Mike Reed
b612b6cfa0 Revert "Revert "Use explicit samplingoptions""
Undo pictureshader change from prev version

This reverts commit fde98cbddd.

Change-Id: I52fe7d2753dee91fd08ae26f38e47ecd933d0c94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342378
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-09 03:08:09 +00:00
Mike Reed
fde98cbddd Revert "Use explicit samplingoptions"
This reverts commit 8b5f3ac3eb.

Reason for revert: unexpected gm changes

Original change's description:
> Use explicit samplingoptions
>
> Promoting pictureshader to linear by default
>
> Change-Id: Icd4102c3eee47558ecec845d0581ddbded981ef8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341979
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

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

Change-Id: I773b6cfd04681619283b4e879468720706d2c9fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342377
Reviewed-by: Mike Reed <reed@google.com>
2020-12-09 02:54:59 +00:00
Mike Reed
8b5f3ac3eb Use explicit samplingoptions
Promoting pictureshader to linear by default

Change-Id: Icd4102c3eee47558ecec845d0581ddbded981ef8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341979
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-12-08 23:03:43 +00:00
Brian Salomon
f143274cda Simplify promise image callbacks.
Remove done and release distinction. Chrome is not using either as
it tracks texture access using other synchronization mechanisms
(semaphores, flush finish procs). Now there is just fulfill and release
where release is called when the texture can be deleted. Also,
release proc can be null.

Simplify texture idle mechanism as the "flushed" state was only used to
implement the old idea of a release proc. The "finished" idle state is
still used to implement the new release proc. Though, it could also be
removed if GrTexture were to be removed for textures returned by fulfill.

Not directly tied to this bug, but a new YUVA factory will be required
and it's good to clean things up first to avoid adding another
instance of the current complexity.

Bug: skia:10632

Change-Id: I4fe3c0af3f5a591506b1b3c736fd3284a38465a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331836
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-10 02:47:56 +00:00
Adlai Holler
a069304560 Rename GrContextPriv to GrDirectContextPriv
Change-Id: I3fccadd8a2860dbee73f93f995738146373f8a39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326196
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-14 16:46:01 +00:00
Brian Salomon
7205080055 Revert "Reland "Revert "Use ManagedBackendTexture in place of TestUtils backend texture helpers."""
This reverts commit 4efaf5e9fe.

Cq-Include-Trybots: luci.skia.skia.primary:Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D,Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D
Change-Id: I0f5f1c427e8892a67b027b0fbe4863d9fcee2363
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325863
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-13 01:22:13 +00:00
Brian Salomon
4efaf5e9fe Reland "Revert "Use ManagedBackendTexture in place of TestUtils backend texture helpers.""
This reverts commit 21f8b51099.

Reason for revert: D3D traced resource assert from unit test

Original change's description:
> Revert "Revert "Use ManagedBackendTexture in place of TestUtils backend texture helpers.""
>
> This reverts commit f625e4ce45.
>
> Change-Id: Id73c53ec7ab8d4a5951712dc150d86e6349addbf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325658
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

# Not skipping CQ checks because this is a reland.

Change-Id: I407f1d522d5c4f28d070cc2ce87af7faffca11fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325860
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-12 22:16:13 +00:00
Brian Salomon
21f8b51099 Revert "Revert "Use ManagedBackendTexture in place of TestUtils backend texture helpers.""
This reverts commit f625e4ce45.

Change-Id: Id73c53ec7ab8d4a5951712dc150d86e6349addbf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325658
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-12 19:30:43 +00:00
Brian Salomon
f625e4ce45 Revert "Use ManagedBackendTexture in place of TestUtils backend texture helpers."
This reverts commit 5ee0556048.

Reason for revert: breaking bots

Original change's description:
> Use ManagedBackendTexture in place of TestUtils backend texture helpers.
>
> Unify on a single family of helpers for making backend textures.
>
> Stresses callback systems in more tests by avoiding artificial
> flush/submit/syncs.
>
> some misc test cleanup along the way.
>
> Change-Id: Ia692e8927ba97b391ee77ea06ebf437a555617b2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324710
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I7d4fc9412c870ae13f7498671379b871dbf5a6c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325619
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-12 16:19:49 +00:00
Brian Salomon
5ee0556048 Use ManagedBackendTexture in place of TestUtils backend texture helpers.
Unify on a single family of helpers for making backend textures.

Stresses callback systems in more tests by avoiding artificial
flush/submit/syncs.

some misc test cleanup along the way.

Change-Id: Ia692e8927ba97b391ee77ea06ebf437a555617b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324710
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-10-12 15:28:52 +00:00
John Stiles
bd3ffa43d2 Fix range-based for loops which copy the loop variable unnecessarily.
This will allow us to enable the ClangTidy check
performance-for-range-copy.

Change-Id: I11f152ffe458f5f353da8715ffd2fd47cf4e71a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306946
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-31 01:02:21 +00:00
Robert Phillips
58adb34cda Update more tests to use the GrDirectContext/GrRecordingContext pair
Change-Id: I66011fef006398a95c9f54af97c5c1092b8b7415
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305497
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-24 18:05:30 +00:00
Brian Salomon
7e67dcaea6 Rename GrMipMapped GrMipmapped
Change-Id: Ia2cfbca8982b57399b6681cbb4501c2933ab4df7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304576
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-07-21 14:06:35 +00:00
Robert Phillips
6d344c3069 Update unit tests to accept GrDirectContext
This CL makes it explicit that the unit tests always get a direct context.

It is mainly a mechanical CL.

Change-Id: I49e0628851d9c81eb47386ef978edf905c6469d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299866
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-06 15:45:12 +00:00
Greg Daniel
a026e91e69 Fix d3d PromiseImageTest
Change-Id: I713ebf481dda5264feb3c813f63c6cbe27fd18a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298749
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-06-24 18:12:53 +00:00
Jim Van Verth
aed25a93a4 Disable PromiseImageTextureShutdown test for D3D
Change-Id: Ic80aa28cd25696a0978d716688d9351935206d41
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298499
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-06-23 19:32:50 +00:00
Stephen White
b007bb25a1 Dawn: skip PromiseImageShutdownTest and TextureIdleProcTest.
These tests create a wgpu::Texture which outlives the  wgpu::Device
which created it. This is problematic on Dawn, so just skip
the tests for now.

Bug: skia:10326
Change-Id: I29d5328e313baca19a2bbc2eedd80f2768cae77e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293936
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-06-04 16:16:12 +00:00
Greg Daniel
0a2464f51f Update internal skia uses to use flushAndSubmit and submit calls.
Bug: skia:10118
Change-Id: Ieb7c0eece56d3d9df56ecb52e00e76c01f038de8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289888
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-05-14 20:26:44 +00:00
Greg Daniel
c1ad77cf48 Add finisehd proc to backend texture creation.
The callback lets the caller know when the data uploads to the texture
from the create call are finished. This is important since the caller
cannot delete the backend texture till the gpu is finished on vulkan
and d3d.

This change also removes the hard sync in vulkan during creation.

Change-Id: I660d142219474e22b1337d2b0c81cda66fe18a4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286517
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-05-06 16:50:33 +00:00
Brian Salomon
c3ce54a8a7 Remove color type from promise image proxy callback.
The color type used to influence the GrPixelConfig and the swizzles
used with the proxy and its GrTextures. So we had to create a new proxy
if the same API texture was used to fulfill a promise image of a
different color type. That has all been removed or lifted out of proxies
and into views. So now it is fine to reuse the same proxy/GrTexture with
a different color type.

Also remove unit test that checked required a new GrTexture be made if
a different color type was used.

Bug: skia:10078

Change-Id: Ib74c419b5d54d382ea95720af7026640e35013f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281056
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-04-02 14:59:18 +00:00
Greg Daniel
456f9b5fe9 Reland "Move GrGpuResource GrSurface and GrTexture into src."
This reverts commit f6ed96d1c2.

Reason for revert: google3 change landed

Original change's description:
> Revert "Move GrGpuResource GrSurface and GrTexture into src."
> 
> This reverts commit e5a06ce678.
> 
> Reason for revert: Need to make change in google3 first
> 
> Original change's description:
> > Move GrGpuResource GrSurface and GrTexture into src.
> > 
> > Must land https://chromium-review.googlesource.com/c/chromium/src/+/2087980
> > before this can land.
> > 
> > Bug: skia:7966
> > Change-Id: I60bbb1765bfbb2c96b2bc0c9826b6b9d57eb2a03
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275077
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> 
> Change-Id: Id39e0a351e49a87209de88a6ad9fadb0219db72c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:7966
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275216
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I746ce739cb084cefc46f9dab24ef773e7c3cc621
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275436
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-03-05 19:16:21 +00:00
Greg Daniel
f6ed96d1c2 Revert "Move GrGpuResource GrSurface and GrTexture into src."
This reverts commit e5a06ce678.

Reason for revert: Need to make change in google3 first

Original change's description:
> Move GrGpuResource GrSurface and GrTexture into src.
> 
> Must land https://chromium-review.googlesource.com/c/chromium/src/+/2087980
> before this can land.
> 
> Bug: skia:7966
> Change-Id: I60bbb1765bfbb2c96b2bc0c9826b6b9d57eb2a03
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275077
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: Id39e0a351e49a87209de88a6ad9fadb0219db72c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275216
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-03-05 01:46:51 +00:00
Greg Daniel
e5a06ce678 Move GrGpuResource GrSurface and GrTexture into src.
Must land https://chromium-review.googlesource.com/c/chromium/src/+/2087980
before this can land.

Bug: skia:7966
Change-Id: I60bbb1765bfbb2c96b2bc0c9826b6b9d57eb2a03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275077
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-03-04 23:01:31 +00:00
Brian Salomon
a56a746b7e Remove GrSurfaceDesc
Replace with SkISize.
Also change some const SkISize& params to just SkISize.

Change-Id: I3c72d961662eefeda545fba17d63e877cd5ca813
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269374
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-07 19:48:13 +00:00
Greg Daniel
b58a3c7331 Remove fConfig from GrSurfaceDesc.
Bug: skia:6718
Change-Id: I586e10c828d5d0a0b3e46d8efd7400991b98d5c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265978
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-23 15:53:36 +00:00
Greg Daniel
d51fa2f1e3 Remove GrPixelConfig from GrSurface and GrSurfaceProxy.
This also requires us to compute a scratch key from backend format instead of config.

Bug: skia:6718
Change-Id: I6bf4c5ba8188e354ddc5307ebf2ca10080df27cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265768
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-23 01:14:32 +00:00
Brian Salomon
a90382fcf6 Pass color types when creating texture with initial data.
One describes the color type use case for the texture and the other
the color type of the texel data, a la writePixels().

Bug: skia:6718

Change-Id: I3ca2ab9f76aaeca4b2861a171b1aaacaa0709d1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240679
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-17 13:38:23 +00:00
Robert Phillips
aee18c95b1 Cleanup after removal of IORefs from GrSurface
The removal of IORefs from GrSurface makes a lot of other cruft obsolete.

Change-Id: I0e02d680a17dc4f4ec705cb6ee4c294738271e28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239919
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-06 17:55:45 +00:00
Robert Phillips
cf39f375d1 Remove maxCount resource cache limit
Change-Id: I0f1064c8433d69e24ca3d5b970c99d539dc1dadd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238442
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-03 14:59:51 +00:00
Brian Salomon
4eb38b7684 Pass GrBackendFormat to GrResourceProvider and GrGpu texture create
functions.

Change-Id: Ie3fe9d56fdbf369ccacd0188a3d3d73ce1d30d48
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232141
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-05 17:33:17 +00:00
Robert Phillips
0a15cc62a8 Propagate GrRenderable flag to GrCaps::getBackendFormatFromColorType
This makes calling GrCaps::getBackendFormatFromColorType equivalent to calling GrContext::defaultBackendFormat

Change-Id: Ic402245fa0502920c47c2a29aadc4e559abdc09b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230416
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-07-30 17:45:45 +00:00
Robert Phillips
62221e768c Delete GrBackendSurface's GrPixelConfig
This member variable is no longer used

TBR=bsalomon@google.com
Bug: skia:6718
Change-Id: I84680c8c3bc36eefa603f5be7f3c15b496a79948
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229478
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-07-25 15:18:08 +00:00
Brian Salomon
27b4d8d8db Remove sample count from GrSurfaceDesc.
This leaves just width, height, and GrPixelConfig. Once we remove the
latter we can replace GrSurfaceDesc with SkISize.

Also remove unused GrRenderTarget::overrideResolveRect

Also remove GrSurfaceProxy::Renderable and use GrRenderable instead.

Change-Id: I652fe6169a22ca33d199b144ec6385286ac07b5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228570
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-23 13:42:29 +00:00
Brian Salomon
e8a766b16c Move GrProtected off GrSurfaceDesc and pass separately.
Change-Id: If628c13bb0e5aa885e4249a37432ba572e65d920
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228440
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-19 19:03:19 +00:00
Brian Salomon
f2c2ba99f6 Remove kRenderTarget_GrSurfaceFlag, instead pass GrRenderable.
This is the last surface desc flag, so remove flags from GrSurfaceDesc.

Bug: skia:6718

Change-Id: Id3ed66b161289927b62f40bfb1f6482cf544deda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227858
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-17 15:09:03 +00:00
Robert Phillips
da2e67a357 Add GrProtected parameter to all createBackendTexture variants
Change-Id: I667bc730e321b579bef98f3d6003f7a7b29c9890
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224957
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-07-01 19:46:18 +00:00
Robert Phillips
4bdd36f625 Make color initialization version of createBackendTexture public
Mechanical.

Change-Id: I48be78a12684fc5243ee509e391984daa190fb7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218182
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-06-04 20:12:22 +00:00
Robert Phillips
806267973f Switch all internel uses of GrContext::createBackendTexture over to initialized versions
For Skia's testing we always want an initialized backend texture. Except for the
BackendAllocationTests of course.

Change-Id: I47b5e4c9845b3f58ebad5ba052780a69d6cd6954
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216348
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-06-04 14:42:27 +00:00
Robert Phillips
5c7a25bd2f Move explicit backend object allocation API to GrContext
This initial portion of the API should be ready to go. Follow on CLs will add the other entry points.

Change-Id: Ia9c708046ba08b16f9a71558e2bf2c38279abe5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-20 15:31:56 +00:00
Robert Phillips
9b16f81858 Switch over to using new direct allocation API in our tests (as much as possible at least)
To fully switch over we need the entry point that uploads data but most of the old call
sites can be switched over now.

Change-Id: I362b1dfde7d88bf8d3f8f90155f53d9ac442a329
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214300
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-17 15:41:50 +00:00
Robert Phillips
9dbcdcc8ba Alter createTestingOnlyBackendTexture methods
This intended to bring this API more into line with the proposed GrBackendObject API with an eye towards replacing the former with the latter.

TBR=bsalomon@google.com
Change-Id: I4367f03fb10fff788749f21c4843060111a6df1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213220
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-13 15:39:33 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Robert Phillips
9313aa77e1 Skip flush in GrDrawingManager if the specifed proxy doesn't have any work (take 2)
This is rather ham-fisted but I would like to have a short-term fix for the "always-flush" perf regressions.

Change-Id: I508e2d725ac18f50318baf31bc3243fe932c724b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206697
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-04-10 13:55:01 +00:00
Mike Reed
b286bc2da8 Introduce new factory for SkColorFilters
Idea: transition callers to this, so we can later typedef SkColorFilter
and SkShader to the same thing.

Bug: skia:8937
Change-Id: I000c882e11622091aa44c141aa6ddd1216414f46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206685
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-04-08 21:03:59 +00:00
Brian Salomon
d538d3df27 Handle promise texture image fulfill returning nullptr.
Bug: chromium:948249
Change-Id: Id5d9b732a0d9612b7ed562041fa3544fd7c39f71
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206076
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-04-04 18:04:19 +00:00
Brian Salomon
0cc575488f Revert "Revert "Change promise image contract to for when Release and Done are called.""
This reverts commit d716d4402a.

Bug: skia:8800
Change-Id: Ic16cd4e960be2c3d2462bdf2b54b2e32abbd9f78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199081
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-18 19:20:44 +00:00
Brian Salomon
876a017e53 Reland "Reintroduce deinstantiate lazy proxy types and use for promise images."
This is a reland of 8b40ac35b2

Original change's description:
> Reintroduce deinstantiate lazy proxy types and use for promise images.
> 
> This reverts a fraction of b2c5dae65d to
> restore the deinstantiate lazy proxy type, supporting implementation,
> and tests.
> 
> Use them for promise images to avoid thread safety issues for promise
> image resources. Makes promise image instantiation callbacks do a thread
> safe unref of their fulfilled GrTexture in GrResourceCache. The
> GrResourceCache mechanism for receiving unref messages is extended to
> allow multiple pending unrefs. All this is new.
> 
> 
> Bug: skia:8800
> Change-Id: I7b1d4fea13c053b6fbbd39c0c6eaf567b8bf81f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199002
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:8800
Change-Id: Ib939fc5c19edf0c6b965c9f6adf0afedd4267703
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-14 15:07:10 +00:00
Brian Salomon
d0e1ceffcc Revert "Reintroduce deinstantiate lazy proxy types and use for promise images."
This reverts commit 8b40ac35b2.

Reason for revert: breaks viz_unittests

Original change's description:
> Reintroduce deinstantiate lazy proxy types and use for promise images.
> 
> This reverts a fraction of b2c5dae65d to
> restore the deinstantiate lazy proxy type, supporting implementation,
> and tests.
> 
> Use them for promise images to avoid thread safety issues for promise
> image resources. Makes promise image instantiation callbacks do a thread
> safe unref of their fulfilled GrTexture in GrResourceCache. The
> GrResourceCache mechanism for receiving unref messages is extended to
> allow multiple pending unrefs. All this is new.
> 
> 
> Bug: skia:8800
> Change-Id: I7b1d4fea13c053b6fbbd39c0c6eaf567b8bf81f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199002
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Iba960efba4290a284294c62d0470ad7e932c174a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-12 13:37:21 +00:00
Brian Salomon
8b40ac35b2 Reintroduce deinstantiate lazy proxy types and use for promise images.
This reverts a fraction of b2c5dae65d to
restore the deinstantiate lazy proxy type, supporting implementation,
and tests.

Use them for promise images to avoid thread safety issues for promise
image resources. Makes promise image instantiation callbacks do a thread
safe unref of their fulfilled GrTexture in GrResourceCache. The
GrResourceCache mechanism for receiving unref messages is extended to
allow multiple pending unrefs. All this is new.


Bug: skia:8800
Change-Id: I7b1d4fea13c053b6fbbd39c0c6eaf567b8bf81f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199002
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-11 20:48:22 +00:00
Brian Salomon
d716d4402a Revert "Change promise image contract to for when Release and Done are called."
This reverts commit c5e8e150c8.

Reason for revert: Reverting to revert 9ac0407006 https://skia-review.googlesource.com/c/skia/+/197163


Original change's description:
> Change promise image contract to for when Release and Done are called.
> 
> Now Release is called when all work related to the SkImage is flushed
> and Done is called when it is finished on the GPU in Vulkan. In GL they
> are still both called back-to-back after flushing.
> 
> Bug: skia:8800
> Change-Id: I990be7b9ebef8411590afd860ef40511fb5fee32
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198165
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I13e8211d89ed1b7694c2d7734eeaaf4ba9ad410a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198602
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-07 15:23:41 +00:00