| Index: include/gpu/GrTypesPriv.h
|
| diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h
|
| index 6a6fd54c7ba5488b2bbfd19eb7c9a3350fe93a41..8c7d6bda65150b6cd055a235f136077f4897c008 100644
|
| --- a/include/gpu/GrTypesPriv.h
|
| +++ b/include/gpu/GrTypesPriv.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "GrTypes.h"
|
| #include "SkRect.h"
|
| +#include "SkRefCnt.h"
|
|
|
| /**
|
| * Types of shader-language-specific boxed variables we can create. (Currently only GrGLShaderVars,
|
| @@ -476,4 +477,9 @@ enum class GrBackendObjectOwnership : bool {
|
| kOwned = true
|
| };
|
|
|
| +template <typename T> T * const * sk_sp_address_as_pointer_address(sk_sp<T> const * sp) {
|
| + static_assert(sizeof(T*) == sizeof(sk_sp<T>), "sk_sp not expected size.");
|
| + return reinterpret_cast<T * const *>(sp);
|
| +}
|
| +
|
| #endif
|
|
|