Index: include/core/SkImage.h |
diff --git a/include/core/SkImage.h b/include/core/SkImage.h |
index 6021590a57717e66af0d31a07e0cdcb3c1eb345b..ff85976e3e7fb212a9db5eed212cc2693db58514 100644 |
--- a/include/core/SkImage.h |
+++ b/include/core/SkImage.h |
@@ -90,12 +90,12 @@ public: |
* Will return NULL if the specified descriptor is unsupported. |
*/ |
static sk_sp<SkImage> MakeFromTexture(GrContext* ctx, const GrBackendTextureDesc& desc) { |
robertphillips
2016/07/20 17:25:39
make all these nullptrs ?
|
- return MakeFromTexture(ctx, desc, kPremul_SkAlphaType, NULL, NULL); |
+ return MakeFromTexture(ctx, desc, kPremul_SkAlphaType, NULL, NULL, NULL); |
} |
static sk_sp<SkImage> MakeFromTexture(GrContext* ctx, const GrBackendTextureDesc& de, |
SkAlphaType at) { |
- return MakeFromTexture(ctx, de, at, NULL, NULL); |
+ return MakeFromTexture(ctx, de, at, NULL, NULL, NULL); |
} |
typedef void (*TextureReleaseProc)(ReleaseContext); |
@@ -107,8 +107,21 @@ public: |
* |
* Will return NULL if the specified descriptor is unsupported. |
*/ |
+ static sk_sp<SkImage> MakeFromTexture(GrContext* ctx, const GrBackendTextureDesc& desc, |
bsalomon
2016/07/20 17:14:27
Is this used?
Brian Osman
2016/07/20 17:34:05
Looks like three hits: https://cs.chromium.org/sea
|
+ SkAlphaType at, TextureReleaseProc trp, |
+ ReleaseContext rc) { |
+ return MakeFromTexture(ctx, desc, at, NULL, trp, rc); |
bsalomon
2016/07/20 17:14:27
nullptr
Brian Osman
2016/07/20 17:34:05
Done. (This file had a mix of nullptr and NULL, wa
|
+ } |
+ |
+ /** |
+ * Create a new image from the specified descriptor. The underlying platform texture must stay |
+ * valid and unaltered until the specified release-proc is invoked, indicating that Skia |
+ * no longer is holding a reference to it. |
+ * |
+ * Will return NULL if the specified descriptor is unsupported. |
+ */ |
static sk_sp<SkImage> MakeFromTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType, |
- TextureReleaseProc, ReleaseContext); |
+ sk_sp<SkColorSpace>, TextureReleaseProc, ReleaseContext); |
/** |
* Create a new image from the specified descriptor. Note - Skia will delete or recycle the |
@@ -117,7 +130,8 @@ public: |
* Will return NULL if the specified descriptor is unsupported. |
*/ |
static sk_sp<SkImage> MakeFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&, |
- SkAlphaType = kPremul_SkAlphaType); |
+ SkAlphaType = kPremul_SkAlphaType, |
+ sk_sp<SkColorSpace> = nullptr); |
/** |
* Create a new image by copying the pixels from the specified y, u, v textures. The data |
@@ -127,7 +141,8 @@ public: |
static sk_sp<SkImage> MakeFromYUVTexturesCopy(GrContext*, SkYUVColorSpace, |
const GrBackendObject yuvTextureHandles[3], |
const SkISize yuvSizes[3], |
- GrSurfaceOrigin); |
+ GrSurfaceOrigin, |
+ sk_sp<SkColorSpace> = nullptr); |
/** |
* Create a new image by copying the pixels from the specified y and uv textures. The data |
@@ -136,7 +151,8 @@ public: |
*/ |
static sk_sp<SkImage> MakeFromNV12TexturesCopy(GrContext*, SkYUVColorSpace, |
const GrBackendObject nv12TextureHandles[2], |
- const SkISize nv12Sizes[2], GrSurfaceOrigin); |
+ const SkISize nv12Sizes[2], GrSurfaceOrigin, |
+ sk_sp<SkColorSpace> = nullptr); |
static sk_sp<SkImage> MakeFromPicture(sk_sp<SkPicture>, const SkISize& dimensions, |
const SkMatrix*, const SkPaint*); |