aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/SkPixmap_Reference.bmh
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-07-17 13:19:56 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-17 17:27:10 +0000
commite80cd44cb2c549b709022a62a1fa9f8d6a7822ec (patch)
tree76b90d88c667317886c85002040c77ee9b07def9 /docs/SkPixmap_Reference.bmh
parenta8cdbd7431b6a27d28db1bc80d7557cedf7e66d0 (diff)
fix bookmaker build bot
Sync up with deletion of SkTransferFunctionBehavior. TBR=brianosman@google.com NOTRY=true Docs-Preview: https://skia.org/?cl=141828 Bug: skia:6818 Change-Id: Ibcfad17b8e886a4c980e4eb2bbae5a007f4bb36e Reviewed-on: https://skia-review.googlesource.com/141828 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'docs/SkPixmap_Reference.bmh')
-rw-r--r--docs/SkPixmap_Reference.bmh83
1 files changed, 1 insertions, 82 deletions
diff --git a/docs/SkPixmap_Reference.bmh b/docs/SkPixmap_Reference.bmh
index 93d47b50ea..051a6a1f83 100644
--- a/docs/SkPixmap_Reference.bmh
+++ b/docs/SkPixmap_Reference.bmh
@@ -1494,91 +1494,10 @@ is drawn after overwriting bottom half float color with top half float color.
# ------------------------------------------------------------------------------
-#Method bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
- int srcX, int srcY, SkTransferFunctionBehavior behavior) const
+#Method bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes) const
#In Pixels
#Line # copies and converts pixels ##
-Copies a Rect of pixels to dstPixels. Copy starts at (srcX, srcY), and does not
-exceed Pixmap (width(), height()).
-
-dstInfo specifies width, height, Color_Type, Alpha_Type, and
-Color_Space of destination. dstRowBytes specifics the gap from one destination
-row to the next. Returns true if pixels are copied. Returns false if
-dstInfo.addr() equals nullptr, or dstRowBytes is less than dstInfo.minRowBytes.
-
-Pixels are copied only if pixel conversion is possible. If Pixmap colorType is
-kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType must match.
-If Pixmap colorType is kGray_8_SkColorType, dstInfo.colorSpace must match.
-If Pixmap alphaType is kOpaque_SkAlphaType, dstInfo.alphaType must
-match. If Pixmap colorSpace is nullptr, dstInfo.colorSpace must match. Returns
-false if pixel conversion is not possible.
-
-srcX and srcY may be negative to copy only top or left of source. Returns
-false if width() or height() is zero or negative. Returns false if:
-
-#Formula
-abs(srcX) >= Pixmap width()
-##
-, or if
-#Formula
-abs(srcY) >= Pixmap height()
-##
-.
-
-If behavior is SkTransferFunctionBehavior::kRespect: converts source
-pixels to a linear space before converting to dstInfo.
-If behavior is SkTransferFunctionBehavior::kIgnore: source
-pixels are treated as if they are linear, regardless of how they are encoded.
-
-#Param dstInfo destination width, height, Color_Type, Alpha_Type, Color_Space ##
-#Param dstPixels destination pixel storage ##
-#Param dstRowBytes destination row length ##
-#Param srcX column index whose absolute value is less than width() ##
-#Param srcY row index whose absolute value is less than height() ##
-#Param behavior one of: SkTransferFunctionBehavior::kRespect,
- SkTransferFunctionBehavior::kIgnore
-##
-
-#Return true if pixels are copied to dstPixels ##
-
-#Example
-#ToDo example doesn't do anything interesting since image doesn't have alpha ##
-#Image 3
-void draw(SkCanvas* canvas) {
- SkImageInfo srgb = SkImageInfo::MakeS32(image->width(), image->height(),
- kPremul_SkAlphaType);
- SkImageInfo linear = srgb.makeColorSpace(srgb.colorSpace()->makeLinearGamma());
- std::vector<int32_t> srcPixels;
- size_t rowBytes = image->width() * 4;
- srcPixels.resize(image->height() * rowBytes);
- SkPixmap pixmap(srgb, (const void*) &srcPixels.front(), rowBytes);
- image->readPixels(pixmap, 0, 0);
- int offset = -64;
- std::vector<int32_t> dstPixels;
- dstPixels.resize(image->height() * rowBytes);
- for (const auto& info : { srgb, linear } ) {
- for (auto behavior : { SkTransferFunctionBehavior::kRespect,
- SkTransferFunctionBehavior::kIgnore} ) {
- pixmap.readPixels(info, &dstPixels.front(), rowBytes, 0, 0, behavior);
- SkBitmap bitmap;
- SkPixmap dstmap(info, &dstPixels.front(), rowBytes);
- bitmap.installPixels(dstmap);
- canvas->drawBitmap(bitmap, 0, offset += 64);
- }
- }
-}
-##
-
-#SeeAlso erase SkBitmap::readPixels SkCanvas::drawBitmap SkCanvas::readPixels SkImage::readPixels SkSurface::readPixels
-
-##
-
-# ------------------------------------------------------------------------------
-
-#Method bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes) const
-
-#In Pixels
Copies a Rect of pixels to dstPixels. Copy starts at (0, 0), and does not
exceed Pixmap (width(), height()).