Commit Graph

21 Commits

Author SHA1 Message Date
Mike Reed
1efa14d9f4 Move to sampling for async-rescale routines
Bug: skia:7650
Change-Id: I10fde77472679b81747e15f150cbc0fe8e49906f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/349402
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-05 15:46:51 +00:00
Brian Salomon
60003f776a Use BackendSurfaceFactory in Vk protected unit tests.
Automatically handles cleanup of backend objects.

Removes use case of MakeFromBackendTextureAsRenderTarget.

Bug: skia:9832
Change-Id: I27c2b4cae713bd605a662d38b797fd25c1add98e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324119
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-09 17:54:03 +00:00
Ben Wagner
ae4bb98f13 Reland "Remove use of legacy display globals."
This is a reland of c1916c34fe

As it turns out, benches are not always given a canvas.

Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

Change-Id: I61a2ac058fafc99653e3304876cf4b97350dac8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322490
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-05 19:13:58 +00:00
Jim Van Verth
bd0881cb58 Revert "Remove use of legacy display globals."
This reverts commit c1916c34fe.

Reason for revert: Bots unhappy

Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=djsollen@google.com,bungeman@google.com,herb@google.com,reed@google.com

Change-Id: I365d2b1d19241a90130bc1b59663651817966f63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322400
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-05 16:34:15 +00:00
Ben Wagner
c1916c34fe Remove use of legacy display globals.
In the ongoing effort to remove the display globals from Skia, allow
their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
in a normal Skia build and remove all use from Skia code.

Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-05 15:53:10 +00:00
Greg Daniel
7b62dcae5a Add image usage flags to GrVkImageInfo
Bug: skia:9898
Change-Id: I46a66d4415af0bb013201ce756e8dbceb9e234cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311437
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-08-21 16:34:20 +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
c8ae494401 Clean up more tests wrt GrContext
Change-Id: I70189e316be19f28d70c2fae832a868101fd3329
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303998
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-20 17:52:33 +00:00
Robert Phillips
b27b38b089 Miscellaneous removal of GrContext usages
Change-Id: I558471002db93a09b8fd5dfa2f0929a0139295bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301976
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-13 14:10:54 +00:00
Robert Phillips
2a4acf328c Remove all internal uses of (and deprecate) SkSurface::getContext
We are replacing GrContext with the GrDirectContext/GrRecordingContext
pair. This starts making that change visible to clients (and weaning
Skia off of GrContext).

Change-Id: I00cc9bf208499984de855a1646229bd7557fc925
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300706
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-08 16:09:27 +00:00
Greg Daniel
ce9f016ed3 Remove unused GrFlushFlags.
This also adds back default flush() calls which simply do a flush
without any submit.

Change-Id: Ia8c92bbdecd515d871abfa6364592f502e98656b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298818
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-06-30 19:39:31 +00:00
Robert Phillips
0d6ce7cc13 Split VulkanTestHelper out into its own files
The aim here is to unify VkTestHelper with the VkYcbcrSamplerHelper's context creation code. AFAICT they have a ~90% overlap.

Change-Id: Iba8d1482b8c1d7164682f90e19d2183d8cfe45d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295583
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-11 13:49:33 +00:00
Brian Salomon
392780277b Remove submit from async read pixels. User must submit.
Bug: chromium:1087118

Change-Id: Iab152ac483787fbdcca448aee0c4b9d2b354a92b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292840
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-02 16:55:04 +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
dd68b78917 Fix VkProtectedContextTest to correctly make SkSurfaces.
Change-Id: I7815e8967ae180c8a45d82c610b77fab4c36323d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289246
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-05-12 19:15:55 +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
Emircan Uysaler
17096c763c Revert "Disable VkProtectedContext_DDLMakeRenderTargetTest"
This reverts commit 6b4afb27fd.

Reason for revert: Fuchsia fix landed on https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=40061#c11.

Original change's description:
> Disable VkProtectedContext_DDLMakeRenderTargetTest
> 
> Bug: fuchsia:40061
> Change-Id: I9d6293298bc27b81f5b4202d56c930f976c86cfc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254336
> Commit-Queue: Emircan Uysaler <emircan@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

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

Bug: fuchsia:40061
Change-Id: I3db60ae3376cd8fe1719b482d2788eb9d48338f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256659
Reviewed-by: Emircan Uysaler <emircan@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-11-26 15:59:04 +00:00
Emircan Uysaler
6b4afb27fd Disable VkProtectedContext_DDLMakeRenderTargetTest
Bug: fuchsia:40061
Change-Id: I9d6293298bc27b81f5b4202d56c930f976c86cfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254336
Commit-Queue: Emircan Uysaler <emircan@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-11-13 19:11:33 +00:00
Emircan Uysaler
7697476ad2 Disable async readback from protected memory
Reading back pixel values from protected memory into cpu memory is
not allowed. This CL adds early returns so they are not attempted.

Bug: skia:9016, fuchsia:38648
Change-Id: Icc0b51a62e87b7aebd0e7cb2a061fea084e7f754
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-10-25 20:02:01 +00:00
Robert Phillips
3cd5432331 Add protected status to SkSurfaceCharacterization
Change-Id: I27bd051c1fce0239faff7fc073eaf82976fb63ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225940
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-07-10 16:30:35 +00:00
Emircan Uysaler
23ca4e7dc5 Enable creating protected vulkan backend
This CL allows user to indicate that they have a protected content in
GrVkBackendContext creation which results in protected CommandPool and Queue
usage.

Bug: skia:9016
Change-Id: I6a478d688b6988c2c5e5e98f18f58fb21f9d26ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210067
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Emircan Uysaler <emircan@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-06-24 16:04:00 +00:00