| Index: include/gpu/GrTypes.h
|
| diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
|
| index 3def9aaa993df434948afe15cf8263d655f42776..51bd26cd52a4a2d4f15f9876538f6bf36d367454 100644
|
| --- a/include/gpu/GrTypes.h
|
| +++ b/include/gpu/GrTypes.h
|
| @@ -412,6 +412,23 @@ GR_MAKE_BITFIELD_OPS(GrSurfaceFlags)
|
| // opaque type for 3D API object handles
|
| typedef intptr_t GrBackendObject;
|
|
|
| +enum class GrBackendObjectLifeCycle {
|
| + /**
|
| + * The resource is created, owned and freed by Skia.
|
| + */
|
| + kInternal,
|
| + /**
|
| + * An external resource with ownership transfered into Skia. Skia will free the resource.
|
| + */
|
| + kAdopted,
|
| + /**
|
| + * An external resource, but Skia does not manage the lifetime of the underlying backend
|
| + * 3D API object(s). The client is responsible for freeing those. Used to inject client-
|
| + * created GPU resources into Skia (e.g. to render to a client-created texture).
|
| + */
|
| + kBorrowed
|
| +};
|
| +
|
| /**
|
| * Some textures will be stored such that the upper and left edges of the content meet at the
|
| * the origin (in texture coord space) and for other textures the lower and left edges meet at
|
|
|