diff options
author | 2018-02-09 08:50:22 -0500 | |
---|---|---|
committer | 2018-02-09 14:19:51 +0000 | |
commit | 67f8584b6f899876ca4187dba4f449ce5489f9c8 (patch) | |
tree | ef23d8ccb9430be5ed954ff4cc0eb345baeafc98 /include/core/SkImage.h | |
parent | c4616804bb407506c6ac1046c7e25e2016911449 (diff) |
Revert "Revert "Remove SkImage deferred texture image data APIs.""
This reverts commit aae533e418f37d788cdb1a1177e882d0f8868b62.
Change-Id: I0434892d8946490a75e17620c49c594eaa18158e
Reviewed-on: https://skia-review.googlesource.com/100603
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/core/SkImage.h')
-rw-r--r-- | include/core/SkImage.h | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h index 5cf6ebe475..041e11ec23 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -504,60 +504,6 @@ public: const SkIRect& clipBounds, SkIRect* outSubset, SkIPoint* offset) const; - /** Drawing params for which a deferred texture image data should be optimized. */ - struct DeferredTextureImageUsageParams { - DeferredTextureImageUsageParams(const SkMatrix matrix, const SkFilterQuality quality, - int preScaleMipLevel) - : fMatrix(matrix), fQuality(quality), fPreScaleMipLevel(preScaleMipLevel) {} - SkMatrix fMatrix; - SkFilterQuality fQuality; - int fPreScaleMipLevel; - }; - - /** - * This method allows clients to capture the data necessary to turn a SkImage into a texture- - * backed image. If the original image is codec-backed this will decode into a format optimized - * for the context represented by the proxy. This method is thread safe with respect to the - * GrContext whence the proxy came. Clients allocate and manage the storage of the deferred - * texture data and control its lifetime. No cleanup is required, thus it is safe to simply free - * the memory out from under the data. - * - * The same method is used both for getting the size necessary for pre-uploaded texture data - * and for retrieving the data. The params array represents the set of draws over which to - * optimize the pre-upload data. - * - * When called with a null buffer this returns the size that the client must allocate in order - * to create deferred texture data for this image (or zero if this is an inappropriate - * candidate). The buffer allocated by the client should be 8 byte aligned. - * - * When buffer is not null this fills in the deferred texture data for this image in the - * provided buffer (assuming this is an appropriate candidate image and the buffer is - * appropriately aligned). Upon success the size written is returned, otherwise 0. - * - * dstColorSpace is the color space of the surface where this texture will ultimately be used. - * If the method determines that mip-maps are needed, this helps determine the correct strategy - * for building them (gamma-correct or not). - * - * dstColorType is the color type of the surface where this texture will ultimately be used. - * This determines the format with which the image will be uploaded to the GPU. If dstColorType - * does not support color spaces (low bit depth types such as ARGB_4444), then dstColorSpace - * must be null. - */ - size_t getDeferredTextureImageData(const GrContextThreadSafeProxy& contextThreadSafeProxy, - const DeferredTextureImageUsageParams deferredTextureImageUsageParams[], - int paramCnt, - void* buffer, - SkColorSpace* dstColorSpace = nullptr, - SkColorType dstColorType = kN32_SkColorType) const; - - /** - * Returns a texture-backed image from data produced in SkImage::getDeferredTextureImageData. - * The context must be the context that provided the proxy passed to - * getDeferredTextureImageData. - */ - static sk_sp<SkImage> MakeFromDeferredTextureImageData(GrContext* context, const void* data, - SkBudgeted budgeted); - typedef std::function<void(GrBackendTexture)> BackendTextureReleaseProc; /** |