diff options
author | 2016-02-25 11:21:57 -0800 | |
---|---|---|
committer | 2016-02-25 11:21:57 -0800 | |
commit | f57b3a6e4a002caf01378832cbd756c6c163a783 (patch) | |
tree | c263f9c4ca7f50d32b7ba1c965116646090d9551 /src/core/SkBitmapDevice.cpp | |
parent | 47a1e96b957b50662274360f1a390d76ab3d02cc (diff) |
Skia Filter Quality and Scaling Metrics
Adds histogram metrics to log the filter quality and scale factor of
each image draw. To make the data easier to consume, this is broken
down into a number of individual histograms:
- Filter quality across all draw calls
- Scale amount across all draw calls
- Scale amount per filter quality (4 histograms total)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686203002
Review URL: https://codereview.chromium.org/1686203002
Diffstat (limited to 'src/core/SkBitmapDevice.cpp')
-rw-r--r-- | src/core/SkBitmapDevice.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index 8c3c562181..97aed212db 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -247,6 +247,7 @@ void SkBitmapDevice::drawPath(const SkDraw& draw, const SkPath& path, void SkBitmapDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap, const SkMatrix& matrix, const SkPaint& paint) { + LogDrawScaleFactor(SkMatrix::Concat(*draw.fMatrix, matrix), paint.getFilterQuality()); draw.drawBitmap(bitmap, matrix, nullptr, paint); } @@ -267,6 +268,8 @@ void SkBitmapDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, } matrix.setRectToRect(tmpSrc, dst, SkMatrix::kFill_ScaleToFit); + LogDrawScaleFactor(SkMatrix::Concat(*draw.fMatrix, matrix), paint.getFilterQuality()); + const SkRect* dstPtr = &dst; const SkBitmap* bitmapPtr = &bitmap; |