skia2/tools/gpu
Christopher Cameron 186a295111 Change Metal to not take ownership of objects
Prior to this change, Skia/Metal interfaces take ownership of the Metal
objects passed in (that is, the caller should count passing the object
to Skia as "freeing" the object).

Change this behavior so that Skia/Metal retains its own separate
ownership of the Metal objects.

Make GrBackendTexture and GrBackendRenderTarget maintain their own
references to the underlying MTLTexture by using the CFRetain/CFRelease
interfaces. Do this by adding a private GrMtlBackendSurfaceInfo.

Move GrMtlBackendSurfaceInfo (formerly GrMtlTextureInfo) out of the
union in GrBackendTexture and GrBackendRenderTarget because unions
cannot have nontrivial constructors and destructors (how fVkInfo isn't
causing a compile error is unclear).

Change-Id: Iae3719c0715825d86503d03c766e47f0f6015bdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215685
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-05-25 01:53:25 +00:00
..
atlastext Revert "De-GL-ify tests, gm and tools" 2019-05-22 20:23:56 +00:00
gl Revert "De-GL-ify tests, gm and tools" 2019-05-22 20:23:56 +00:00
mock rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
mtl Change Metal to not take ownership of objects 2019-05-25 01:53:25 +00:00
vk Revert "De-GL-ify tests, gm and tools" 2019-05-22 20:23:56 +00:00
FenceSync.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
GpuTimer.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
GrContextFactory.cpp Revert "De-GL-ify tests, gm and tools" 2019-05-22 20:23:56 +00:00
GrContextFactory.h Revert "De-GL-ify tests, gm and tools" 2019-05-22 20:23:56 +00:00
GrTest.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
MemoryCache.cpp Normalize storage of shader strings in the cache 2019-04-25 15:27:59 +00:00
MemoryCache.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
ProxyUtils.cpp Move explicit backend object allocation API to GrContext 2019-05-20 15:31:56 +00:00
ProxyUtils.h Alter createTestingOnlyBackendTexture methods 2019-05-13 15:39:33 +00:00
TestContext.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
TestContext.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
YUVUtils.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
YUVUtils.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00