aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar Eric Karl <ericrk@chromium.org>2017-06-12 10:05:49 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-12 18:27:48 +0000
commit7a8c84c6c92565842aeea27d4971fbd78d523f7a (patch)
tree703d50fbd35830c529db5ed97388503189135360 /include/core
parenta8d45e522097d4efe3b12bc26158870bd76299b7 (diff)
Reland DeferredTextureImageData low-bit-depth/dithering support
Cause DeferredTextureImageData functionality to support low bit depth (4444, 565) image formats (with dithering). Updated to handle colorspace + 4444 colortype correctly. Bug: 720105 Change-Id: Ib7e14d937849f4f6b08fda6992a240bb203d0089 Reviewed-on: https://skia-review.googlesource.com/19094 Commit-Queue: Eric Karl <ericrk@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkImage.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index bc0597c300..ba2cc7e0f9 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -477,12 +477,18 @@ public:
* 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&,
const DeferredTextureImageUsageParams[],
int paramCnt,
void* buffer,
- SkColorSpace* dstColorSpace = nullptr) const;
+ SkColorSpace* dstColorSpace = nullptr,
+ SkColorType dstColorType = kN32_SkColorType) const;
/**
* Returns a texture-backed image from data produced in SkImage::getDeferredTextureImageData.