Commit Graph

21 Commits

Author SHA1 Message Date
Jim Van Verth
36b86aff6b Revert "Remove ARC from Metal backend"
This reverts commit 6541013b53.

Reason for revert: TSAN issues with GrFence, and crash in GrMtlPipelineStateBuilder::CreatePipelineState.

Original change's description:
> Remove ARC from Metal backend
> 
> Change-Id: I5ab28f6eda3b37d1b82c94c7cc6eaa2ce59157da
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311113
> Reviewed-by: Adlai Holler <adlai@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I031629b483fc46de8bd3751253e5391c2ce87853
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/312843
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-08-24 17:16:54 +00:00
Jim Van Verth
6541013b53 Remove ARC from Metal backend
Change-Id: I5ab28f6eda3b37d1b82c94c7cc6eaa2ce59157da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311113
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-08-24 16:20:42 +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
Robert Phillips
a1121331a4 Be more consistent about calling release procs in SkImage factories (take 2)
I will follow this up with a Chrome-side CL to fix the call sites of the following factories:
   MakeFromCompressedTexture
   MakeFromTexture
   MakeFromYUVATexturesCopyWithExternalBackend
   MakeFromYUVTexturesCopyWithExternalBackend
   MakeFromNV12TexturesCopyWithExternalBackend

Here is the Chrome-side CL: https://chromium-review.googlesource.com/c/chromium/src/+/2264598/ (Skia's SkImage::Make* factories now guarantee cleanup)

Here is the Chrome-side CL that adds the guard flag:
https://chromium-review.googlesource.com/c/chromium/src/+/2273067/ (Add flag in order to roll a Skia CL into Chrome)

TBR=bsalomon@google.com
Bug: 1097484
Change-Id: Ic2fcdc116f0f866b33d752b6d5abc784c7f65be6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299663
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-29 18:40:04 +00:00
Robert Phillips
49f9437cc8 Revert "Be more consistent about calling release procs in SkImage factories"
This reverts commit f075414d63.

Reason for revert: blocking Chrome roll

Original change's description:
> Be more consistent about calling release procs in SkImage factories
> 
> I will follow this up with a Chrome-side CL to fix the call sites of the following factories:
>    MakeFromCompressedTexture
>    MakeFromTexture
>    MakeFromYUVATexturesCopyWithExternalBackend
>    MakeFromYUVTexturesCopyWithExternalBackend
>    MakeFromNV12TexturesCopyWithExternalBackend
> 
> Here is the Chrome-side CL: https://chromium-review.googlesource.com/c/chromium/src/+/2264598/ (Skia's SkImage::Make* factories now guarantee cleanup)
> 
> Bug: 1097484
> Change-Id: I65e6ce30c3dd906e2bfede6c8202d7fab5832da3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298751
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I306e3beb60461c89cc1980f6c7f3ad4900a34c76
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1097484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298847
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-25 02:46:34 +00:00
Robert Phillips
f075414d63 Be more consistent about calling release procs in SkImage factories
I will follow this up with a Chrome-side CL to fix the call sites of the following factories:
   MakeFromCompressedTexture
   MakeFromTexture
   MakeFromYUVATexturesCopyWithExternalBackend
   MakeFromYUVTexturesCopyWithExternalBackend
   MakeFromNV12TexturesCopyWithExternalBackend

Here is the Chrome-side CL: https://chromium-review.googlesource.com/c/chromium/src/+/2264598/ (Skia's SkImage::Make* factories now guarantee cleanup)

Bug: 1097484
Change-Id: I65e6ce30c3dd906e2bfede6c8202d7fab5832da3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298751
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-24 23:36:07 +00:00
Robert Phillips
e19babf996 Remove GrAtlasManager.h from all other .h files
Having GrAtlasManager.h in GrContextPriv.h was needlessly propagating dependence on that header.

Change-Id: Idf5836f1e217ecd2da91f751b488a63a884c02ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281739
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-07 12:43:46 +00:00
Brian Salomon
c524378621 Don't require color type to make proxy copies.
Bug: skia:10078

Change-Id: I3ce0d97f8ada55403cc3f88bb16659085449ea29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281207
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-03 15:25:34 +00:00
Brian Salomon
8a78e9cdc3 Don't require color type to wrap a texture/RT.
Change-Id: Ic6c0de262e13c3c3ea9e7777ccdd04f22ff6ae0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280345
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-03-31 19:18:39 +00:00
Greg Daniel
3a36511f21 Remove origin from GrSurfaceProxy.
Bug: skia:9556
Change-Id: Ic95a3a6b11e1ff8a6f6b2f5c5aeb9037b72aae90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270840
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-14 16:52:58 +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
40903af42b Update GrSurfaceProxy::Copy to return a view.
Additionally this changes updates GrRenderTargetContext drawTexture to take
a view. This was done since there were a bunch of places where the result
of the copy goes straight to the drawTexture call.

Bug: skia:9556
Change-Id: If7094eb51ed343620011d03b86d603e3c6289c17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267856
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-01-30 20:43:56 +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
3155f7fc0d Pass in a GrColorType into our Copy call.
This allows us to remove looking at the config to infer a color type when
setting up a Surface/RenderTargetContext for the copy.

Bug: skia:6718
Change-Id: I75b63480a84558c96b5eeb248cc6165f96b2a243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264563
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-01-16 22:55:32 +00:00
Brian Salomon
fc118442f6 Reland "Revert "Revert "Make FP optimizations helpers use SkAlphaType not GrColorType"""
This is a reland of 997b37fdb9

Layout tests have been suppressed.

Original change's description:
> Revert "Revert "Make FP optimizations helpers use SkAlphaType not GrColorType""
>
> This reverts commit 078e8faa26.
>
> Change-Id: I67b2970584db5a1afbf9928b77c5444947ef71a3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255897
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Change-Id: I6db4cff8b71ef1f29ac47f7729b9514d009f730a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256225
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-11-25 15:46:35 +00:00
Robert Phillips
50299de399 Reland "Revert "Make FP optimizations helpers use SkAlphaType not GrColorType""
This reverts commit 997b37fdb9.

Reason for revert: May be blocking Chrome roll

Original change's description:
> Revert "Revert "Make FP optimizations helpers use SkAlphaType not GrColorType""
> 
> This reverts commit 078e8faa26.
> 
> Change-Id: I67b2970584db5a1afbf9928b77c5444947ef71a3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255897
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I0d2754ac7f4672f0758e4d00cd9e06998637846a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256196
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-23 15:21:08 +00:00
Brian Salomon
997b37fdb9 Revert "Revert "Make FP optimizations helpers use SkAlphaType not GrColorType""
This reverts commit 078e8faa26.

Change-Id: I67b2970584db5a1afbf9928b77c5444947ef71a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255897
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-11-23 00:51:03 +00:00
Brian Salomon
078e8faa26 Revert "Make FP optimizations helpers use SkAlphaType not GrColorType"
This reverts commit 7a538b1eec.

Reason for revert: ios failures

Original change's description:
> Make FP optimizations helpers use SkAlphaType not GrColorType
> 
> Change-Id: I3b7cde6e7f68192af5419fb09c7d59e7a803a4d5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255818
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Id41daa47fb3ccac434bb9d71a697f32e36c87367
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255835
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-11-22 04:10:34 +00:00
Brian Salomon
7a538b1eec Make FP optimizations helpers use SkAlphaType not GrColorType
Change-Id: I3b7cde6e7f68192af5419fb09c7d59e7a803a4d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255818
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-11-22 03:30:32 +00:00
Jim Van Verth
9187e49ed1 Detect whether trying to blit a Metal swapchain texture, and fail if so.
Metal swapchain textures (equivalent to GL's FBO 0) can't be used with
MTLBlitCommandEncoder. For copySurface we need to detect this and fail.
Future changes will handle GrSurfaceProxy.

Change-Id: I9235d91cf31e96260c8d1da5938f5441d2e49d27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252045
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-11-12 14:56:28 +00:00