starter procs for blending with pm4f
curr/maxrss loops min median mean max stddev samples config bench
8/8 MB 4 87.1µs 91µs 89.8µs 92µs 2% ▇▇▇▇█▇▅▁▁▁ nonrendering xfer4f_srcover_N_opaque_linear
9/9 MB 2 196µs 196µs 215µs 383µs 27% ▁▁▁▁█▁▁▁▁▁ nonrendering xfer4f_srcover_N_opaque_srgb
9/9 MB 1 313µs 313µs 313µs 313µs 0% ▁▄▅▅▅▂████ nonrendering xfer4f_srcover_N_alpha_linear
9/9 MB 1 580µs 580µs 582µs 602µs 1% ▁▁▁▁▁▁▂▁▁█ nonrendering xfer4f_srcover_N_alpha_srgb
9/9 MB 23 13.1µs 13.1µs 13.1µs 13.1µs 0% ▆▄▄█▂▂▂▁▂▁ nonrendering xfer4f_srcover_1_opaque_linear
9/9 MB 23 13.2µs 13.2µs 13.2µs 13.2µs 0% █▄▂▁▃▁▂▂▂▂ nonrendering xfer4f_srcover_1_opaque_srgb
9/9 MB 2 178µs 183µs 183µs 185µs 1% ▇▇▇█▇▇▇▇▇▁ nonrendering xfer4f_srcover_1_alpha_linear
9/9 MB 1 517µs 517µs 517µs 517µs 0% ▇█▄▃▄▁▂▁▂▄ nonrendering xfer4f_srcover_1_alpha_srgb
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1642703003
TBR=
landing now so these incremental types/functions can be used to collaborate with herb's work. nothing is active at this point
Review URL: https://codereview.chromium.org/1642703003
diff --git a/include/core/SkColor.h b/include/core/SkColor.h
index 3ebd18b..099771a 100644
--- a/include/core/SkColor.h
+++ b/include/core/SkColor.h
@@ -110,8 +110,7 @@
@param color the argb color to convert. Note: the alpha component is ignored.
@param hsv 3 element array which holds the resulting HSV components.
*/
-static inline void SkColorToHSV(SkColor color, SkScalar hsv[3])
-{
+static inline void SkColorToHSV(SkColor color, SkScalar hsv[3]) {
SkRGBToHSV(SkColorGetR(color), SkColorGetG(color), SkColorGetB(color), hsv);
}
@@ -134,8 +133,7 @@
@param hsv 3 element array which holds the input HSV components.
@return the resulting argb color
*/
-static inline SkColor SkHSVToColor(const SkScalar hsv[3])
-{
+static inline SkColor SkHSVToColor(const SkScalar hsv[3]) {
return SkHSVToColor(0xFF, hsv);
}
@@ -166,11 +164,19 @@
* The float values are 0...1 premultiplied
*/
struct SkPM4f {
+ enum {
+ A = SK_A32_SHIFT/8,
+ R = SK_R32_SHIFT/8,
+ G = SK_G32_SHIFT/8,
+ B = SK_B32_SHIFT/8,
+ };
float fVec[4];
- float a() const { return fVec[SK_A32_SHIFT/8]; }
+ float a() const { return fVec[3]; }
static SkPM4f FromPMColor(SkPMColor);
+
+ bool isUnit() const;
};
/*