Generate bookmaker indices
First cut at splitting bookmaker documentation into reference
and overview. Reference starts with a hyperlinked index,
generated from a public include.
This moves towards typing once, minimizing the information
duplicated in the .h file and the .bmh file.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=154630
Change-Id: I836622db9b1786bd28c0bce2536cd3caef6e5a32
Reviewed-on: https://skia-review.googlesource.com/c/154630
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
diff --git a/docs/SkImage_Reference.bmh b/docs/SkImage_Reference.bmh
index 513d950..2a8f35d 100644
--- a/docs/SkImage_Reference.bmh
+++ b/docs/SkImage_Reference.bmh
@@ -3,6 +3,10 @@
#Class SkImage
+#Code
+#Populate
+##
+
Image describes a two dimensional array of pixels to draw. The pixels may be
decoded in a Raster_Bitmap, encoded in a Picture or compressed data stream,
or located in GPU memory as a GPU_Texture.
@@ -41,26 +45,10 @@
drawing.
##
-#Subtopic Overview
-#Populate
-##
-
-#Subtopic Related_Function
-#Populate
-##
-
-#Subtopic Constructor
-#Populate
-##
-
-#Subtopic Member_Function
-#Populate
-##
-
# ------------------------------------------------------------------------------
#Method static sk_sp<SkImage> MakeRasterCopy(const SkPixmap& pixmap)
-#In Constructor
+#In Constructors
#Line # creates Image from Pixmap and copied pixels ##
Creates Image from Pixmap and copy of pixels. Since pixels are copied, Pixmap
pixels may be modified or deleted without affecting Image.
@@ -106,7 +94,7 @@
# ------------------------------------------------------------------------------
#Method static sk_sp<SkImage> MakeRasterData(const SkImageInfo& info, sk_sp<SkData> pixels, size_t rowBytes)
-#In Constructor
+#In Constructors
#Line # creates Image from Image_Info and shared pixels ##
Creates Image from Image_Info, sharing pixels.
@@ -172,7 +160,7 @@
#Method static sk_sp<SkImage> MakeFromRaster(const SkPixmap& pixmap,
RasterReleaseProc rasterReleaseProc,
ReleaseContext releaseContext)
-#In Constructor
+#In Constructors
#Line # creates Image from Pixmap, with release ##
Creates Image from pixmap, sharing Pixmap pixels. Pixels must remain valid and
@@ -226,7 +214,7 @@
# ------------------------------------------------------------------------------
#Method static sk_sp<SkImage> MakeFromBitmap(const SkBitmap& bitmap)
-#In Constructor
+#In Constructors
#Line # creates Image from Bitmap, sharing or copying pixels ##
Creates Image from bitmap, sharing or copying bitmap pixels. If the bitmap
is marked immutable, and its pixel memory is shareable, it may be shared
@@ -277,7 +265,7 @@
#Method static sk_sp<SkImage> MakeFromGenerator(std::unique_ptr<SkImageGenerator> imageGenerator,
const SkIRect* subset = nullptr)
-#In Constructor
+#In Constructors
#Line # creates Image from a stream of data ##
Creates Image from data returned by imageGenerator. Generated data is owned by Image and may not
@@ -317,7 +305,7 @@
# ------------------------------------------------------------------------------
#Method static sk_sp<SkImage> MakeFromEncoded(sk_sp<SkData> encoded, const SkIRect* subset = nullptr)
-#In Constructor
+#In Constructors
#Line # creates Image from encoded data ##
Creates Image from encoded data.
subset allows selecting a portion of the full image. Pass nullptr to select the entire image;
@@ -365,7 +353,7 @@
SkColorType colorType,
SkAlphaType alphaType,
sk_sp<SkColorSpace> colorSpace)
-#In Constructor
+#In Constructors
#Line # creates Image from GPU_Texture ##
Creates Image from GPU_Texture associated with context. Caller is responsible for
managing the lifetime of GPU_Texture.
@@ -475,7 +463,7 @@
bool buildMips,
SkColorSpace* dstColorSpace,
bool limitToMaxTextureSize = false)
-#In Constructor
+#In Constructors
#Line # creates Image from encoded data, and uploads to GPU ##
Creates Image from encoded data. Image is uploaded to GPU back-end using context.
@@ -524,7 +512,7 @@
bool buildMips,
SkColorSpace* dstColorSpace,
bool limitToMaxTextureSize = false)
-#In Constructor
+#In Constructors
#Line # creates Image from Pixmap, and uploads to GPU ##
Creates Image from pixmap. Image is uploaded to GPU back-end using context.
@@ -577,7 +565,7 @@
SkColorType colorType,
SkAlphaType alphaType = kPremul_SkAlphaType,
sk_sp<SkColorSpace> colorSpace = nullptr)
-#In Constructor
+#In Constructors
#Line # creates Image from GPU_Texture, managed internally ##
Creates Image from backendTexture associated with context. backendTexture and
returned Image are managed internally, and are released when no longer needed.
@@ -633,23 +621,21 @@
sk_sp<SkColorSpace> imageColorSpace = nullptr)
#In Constructor
#Line # creates Image from YUV_ColorSpace data ##
-Creates an SkImage by flattening the specified YUVA planes into a single, interleaved RGBA image.
+Creates an SkImage by flattening the specified YUVA planes into a single,
+interleaved RGBA image.
+yuvaTextures points to array of up to four YUVA textures which reside on GPU.
+YUVA textures contain YUVA planes which may be interleaved.
#Param context GPU context ##
-#Param yuvColorSpace how the YUV values are converted to RGB. One of:
- kJPEG_SkYUVColorSpace, kRec601_SkYUVColorSpace,
- kRec709_SkYUVColorSpace
+#Param yuvColorSpace one of: kJPEG_SkYUVColorSpace, kRec601_SkYUVColorSpace,
+ kRec709_SkYUVColorSpace
##
-#Param yuvaTextures array of (up to four) YUVA textures on GPU which contain the,
- possibly interleaved, YUVA planes
-##
-#Param yuvaIndices array indicating which texture (in 'yuvaTextures') and channel
- (in the specified texture) maps to each of Y, U, V, and A.
+#Param yuvaTextures array of YUVA textures ##
+#Param yuvaIndices array indicating yuvaTextures element and channel
+ that map to Y, U, V, and A
##
#Param imageSize size of the resulting image ##
-#Param imageOrigin origin of the resulting image. One of: kBottomLeft_GrSurfaceOrigin,
- kTopLeft_GrSurfaceOrigin
-##
+#Param imageOrigin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin ##
#Param imageColorSpace range of colors of the resulting image; may be nullptr ##
#Return created SkImage, or nullptr ##
@@ -680,25 +666,22 @@
#In Constructor
#Line # creates Image from planar YUV_ColorSpace, stored in texture ##
-Creates an SkImage by flattening the specified YUVA planes into a single, interleaved RGBA
-image. backendTexture is used to store the result of the flattening.
+Creates an SkImage by flattening the specified YUVA planes into a single,
+interleaved RGBA image. backendTexture is used to store the result of flattening.
+yuvaTextures points to array of up to four YUVA textures which reside on GPU.
+YUVA textures contain YUVA planes which may be interleaved.
#Param context GPU context ##
-#Param yuvColorSpace how the YUV values are converted to RGB. One of:
- kJPEG_SkYUVColorSpace, kRec601_SkYUVColorSpace,
- kRec709_SkYUVColorSpace
+#Param yuvColorSpace one of: kJPEG_SkYUVColorSpace, kRec601_SkYUVColorSpace,
+ kRec709_SkYUVColorSpace
##
-#Param yuvaTextures array of (up to four) YUVA textures on GPU which contain the,
- possibly interleaved, YUVA planes
-##
-#Param yuvaIndices array indicating which texture (in 'yuvaTextures') and channel
- (in the specified texture) maps to each of Y, U, V, and A.
+#Param yuvaTextures array of YUVA textures ##
+#Param yuvaIndices array indicating yuvaTextures element and channel
+ that map to Y, U, V, and A
##
#Param imageSize size of the resulting image ##
-#Param imageOrigin origin of the resulting image. One of: kBottomLeft_GrSurfaceOrigin,
- kTopLeft_GrSurfaceOrigin
-##
-#Param backendTexture the resource that stores the final pixels ##
+#Param imageOrigin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin ##
+#Param backendTexture resource that stores the final pixels ##
#Param imageColorSpace range of colors of the resulting image; may be nullptr ##
#Return created SkImage, or nullptr ##
@@ -719,7 +702,7 @@
const GrBackendTexture yuvTextures[3],
GrSurfaceOrigin imageOrigin,
sk_sp<SkColorSpace> imageColorSpace = nullptr)
-#In Constructor
+#In Constructors
#Line # creates Image from YUV_ColorSpace data in three planes ##
Creates Image from copy of yuvTextures, an array of textures on GPU.
@@ -754,7 +737,7 @@
GrContext* context, SkYUVColorSpace yuvColorSpace,
const GrBackendTexture yuvTextures[3], GrSurfaceOrigin imageOrigin,
const GrBackendTexture& backendTexture, sk_sp<SkColorSpace> imageColorSpace = nullptr);
-#In Constructor
+#In Constructors
#Line # creates Image from planar YUV_ColorSpace, stored in texture ##
Creates Image from copy of yuvTextures, an array of textures on GPU.
@@ -768,7 +751,7 @@
##
#Param yuvTextures array of YUV textures on GPU ##
#Param imageOrigin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin ##
-#Param backendTexture the resource that stores the final pixels ##
+#Param backendTexture resource that stores final pixels ##
#Param imageColorSpace range of colors; may be nullptr ##
#Return created SkImage, or nullptr ##
@@ -792,7 +775,7 @@
const GrBackendTexture nv12Textures[2],
GrSurfaceOrigin imageOrigin,
sk_sp<SkColorSpace> imageColorSpace = nullptr)
-#In Constructor
+#In Constructors
#Line # creates Image from YUV_ColorSpace data in three planes ##
Creates Image from copy of nv12Textures, an array of textures on GPU.
@@ -831,7 +814,7 @@
GrSurfaceOrigin imageOrigin,
const GrBackendTexture& backendTexture,
sk_sp<SkColorSpace> imageColorSpace = nullptr);
-#In Constructor
+#In Constructors
#Line # creates Image from planar YUV_ColorSpace, stored in texture ##
Creates Image from copy of nv12Textures, an array of textures on GPU.
@@ -847,7 +830,7 @@
##
#Param nv12Textures array of YUV textures on GPU ##
#Param imageOrigin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin ##
-#Param backendTexture the resource that stores the final pixels ##
+#Param backendTexture resource that stores final pixels ##
#Param imageColorSpace range of colors; may be nullptr ##
#Return created Image, or nullptr ##
@@ -900,7 +883,7 @@
const SkMatrix* matrix, const SkPaint* paint,
BitDepth bitDepth,
sk_sp<SkColorSpace> colorSpace)
-#In Constructor
+#In Constructors
#Line # creates Image from Picture ##
Creates Image from picture. Returned Image width and height are set by dimensions.
@@ -951,7 +934,7 @@
SkAlphaType alphaType = kPremul_SkAlphaType,
sk_sp<SkColorSpace> colorSpace = nullptr,
GrSurfaceOrigin surfaceOrigin = kTopLeft_GrSurfaceOrigin)
-#In Constructor
+#In Constructors
#Line # creates Image from Android hardware buffer ##
#Bug 7447
@@ -978,7 +961,6 @@
# ------------------------------------------------------------------------------
#Subtopic Property
-#Populate
#Line # values and attributes ##
##
@@ -1297,7 +1279,7 @@
#Method sk_sp<SkShader> makeShader(SkShader::TileMode tileMode1, SkShader::TileMode tileMode2,
const SkMatrix* localMatrix = nullptr) const
-#In Constructor
+#In Constructors
#Line # creates Shader, Paint element that can tile Image ##
Creates Shader from Image. Shader dimensions are taken from Image. Shader uses
@@ -1356,7 +1338,6 @@
# ------------------------------------------------------------------------------
#Subtopic Pixels
-#Populate
#Line # read and write pixel values ##
##
@@ -1894,12 +1875,11 @@
# ------------------------------------------------------------------------------
#Subtopic Utility
-#Populate
#Line # rarely called management functions ##
##
#Method sk_sp<SkImage> makeSubset(const SkIRect& subset) const
-#In Constructor
+#In Constructors
#Line # creates Image containing part of original ##
Returns subset of Image. subset must be fully contained by Image dimensions().
The implementation may share pixels, or may copy them.
@@ -1932,7 +1912,7 @@
#Method sk_sp<SkImage> makeTextureImage(GrContext* context, SkColorSpace* dstColorSpace,
GrMipMapped mipMapped = GrMipMapped::kNo) const
-#In Constructor
+#In Constructors
#Line # creates Image matching Color_Space if possible ##
Returns Image backed by GPU_Texture associated with context. Returned Image is
compatible with Surface created with dstColorSpace. The returned Image respects
@@ -1982,7 +1962,7 @@
# ------------------------------------------------------------------------------
#Method sk_sp<SkImage> makeNonTextureImage() const
-#In Constructor
+#In Constructors
#Line # creates Image without dependency on GPU_Texture ##
Returns Raster_Image or Lazy_Image. Copies Image backed by GPU_Texture into
CPU memory if needed. Returns original Image if decoded in Raster_Bitmap,
@@ -2024,7 +2004,7 @@
# ------------------------------------------------------------------------------
#Method sk_sp<SkImage> makeRasterImage() const
-#In Constructor
+#In Constructors
#Line # creates Image compatible with Raster_Surface if possible ##
Returns Raster_Image. Copies Image backed by GPU_Texture into CPU memory,
or decodes Image from Lazy_Image. Returns original Image if decoded in
@@ -2069,7 +2049,7 @@
#Method sk_sp<SkImage> makeWithFilter(const SkImageFilter* filter, const SkIRect& subset,
const SkIRect& clipBounds, SkIRect* outSubset,
SkIPoint* offset) const
-#In Constructor
+#In Constructors
#Line # creates filtered, clipped Image ##
Creates filtered Image. filter processes original Image, potentially changing
@@ -2148,7 +2128,7 @@
sk_sp<SkImage> image,
GrBackendTexture* backendTexture,
BackendTextureReleaseProc* backendTextureReleaseProc)
-#In Constructor
+#In Constructors
#Line # creates GPU_Texture from Image ##
Creates a GrBackendTexture from the provided SkImage. Returns true and
@@ -2231,7 +2211,7 @@
# ------------------------------------------------------------------------------
#Method bool asLegacyBitmap(SkBitmap* bitmap, LegacyBitmapMode legacyBitmapMode = kRO_LegacyBitmapMode) const
-#In Constructor
+#In Constructors
#Line # returns as Raster_Bitmap ##
Creates raster Bitmap with same pixels as Image. If legacyBitmapMode is
kRO_LegacyBitmapMode, returned bitmap is read-only and immutable.
@@ -2345,7 +2325,7 @@
# ------------------------------------------------------------------------------
#Method sk_sp<SkImage> makeColorSpace(sk_sp<SkColorSpace> target) const
-#In Constructor
+#In Constructors
#Line # creates Image matching Color_Space if possible ##
Creates Image in target Color_Space.