diff options
author | msarett <msarett@google.com> | 2016-08-16 09:31:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-16 09:31:08 -0700 |
commit | 168820625c35a8c19f66c661efcbce7a5e334837 (patch) | |
tree | d2af91d684ed335271850941a5bccedd84346c73 /src/core/SkRecorder.h | |
parent | c4d2f907311fca08303c254b2488bd7990fa2f32 (diff) |
Add onDrawBitmapLattice(), avoid unnecessary bitmap->image copy
out/Release/nanobench --match Lattice --config gpu --ms 3000
3.42ms -> 17.2us
For reference, a loop over drawBitmapRects (which is what
Android currently does) is about 13us.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2205273003
Review-Url: https://codereview.chromium.org/2205273003
Diffstat (limited to 'src/core/SkRecorder.h')
-rw-r--r-- | src/core/SkRecorder.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkRecorder.h b/src/core/SkRecorder.h index 6da3824123..ba171a17ee 100644 --- a/src/core/SkRecorder.h +++ b/src/core/SkRecorder.h @@ -111,14 +111,16 @@ public: void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, SrcRectConstraint) override; void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; - void onDrawImageLattice(const SkImage*, const Lattice& lattice, const SkRect& dst, - const SkPaint*) override; void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, const SkPaint*, SrcRectConstraint) override; void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& dst, const SkPaint*) override; void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, const SkPaint*) override; + void onDrawImageLattice(const SkImage*, const Lattice& lattice, const SkRect& dst, + const SkPaint*) override; + void onDrawBitmapLattice(const SkBitmap&, const Lattice& lattice, const SkRect& dst, + const SkPaint*) override; void onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, |