class WritePixelsBench : public SkBenchmark {
public:
WritePixelsBench(void* param, SkCanvas::Config8888 config)
- : INHERITED(param)
+ : INHERITED(param)
, fConfig(config)
, fName("writepix") {
switch (config) {
case SkCanvas::kRGBA_Unpremul_Config8888:
fName.append("_rgba_UPM");
break;
- default:
+ default:
SK_CRASH();
break;
}
DEF_BENCH( return SkNEW_ARGS(WritePixelsBench, (p, SkCanvas::kRGBA_Premul_Config8888)); )
DEF_BENCH( return SkNEW_ARGS(WritePixelsBench, (p, SkCanvas::kRGBA_Unpremul_Config8888)); )
-
path.quadTo(150, 150, 0, 6);
SkPaint paint;
-
+
paint.setAntiAlias(true);
paint.setStyle(SkPaint::kStroke_Style);
canvas->translate(20, 20);
canvas->drawPath(path, paint);
canvas->translate(100, 0);
#endif
-
+
paint.setStrokeWidth(1.01f);
canvas->drawPath(path, paint);
}
static const int kMinSigBitsForDot = 8;
static const SkScalar kDotEpsilon = FLT_EPSILON * (1 << kMinSigBitsForDot);
static const SkScalar kTooPinchyNormalDotProd = kDotEpsilon - 1;
-
+
// just some sanity asserts to help document the expected range
SkASSERT(kTooPinchyNormalDotProd >= -1);
SkASSERT(kTooPinchyNormalDotProd < SkDoubleToScalar(-0.999));