diff options
author | Derek Sollenberger <djsollen@google.com> | 2017-08-15 16:23:01 -0400 |
---|---|---|
committer | Derek Sollenberger <djsollen@google.com> | 2017-08-15 16:23:01 -0400 |
commit | 6c2a9e2bc1759ae7eefc973941e8a6fc6b3e912c (patch) | |
tree | 8c1b4ecf311761a09b463c703fffee6a2d3a3963 /libs/hwui/VectorDrawable.cpp | |
parent | 46b65e61bd50bb0287ecdfe7e3271991d60707ea (diff) |
Use the faster path when calling drawImageRect.
Bug: 64487466
Test: CtsGraphicsTestCases, CtsUiRenderingTestCases
Change-Id: Ib2312598b50d402b1749d62a10c6ec343eff5b89
Diffstat (limited to 'libs/hwui/VectorDrawable.cpp')
-rw-r--r-- | libs/hwui/VectorDrawable.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/VectorDrawable.cpp b/libs/hwui/VectorDrawable.cpp index 8a1de02e6a0c..f4ce864e83e1 100644 --- a/libs/hwui/VectorDrawable.cpp +++ b/libs/hwui/VectorDrawable.cpp @@ -565,7 +565,7 @@ void Tree::draw(SkCanvas* canvas) { sk_sp<SkSurface> vdSurface = mCache.getSurface(&src); if (vdSurface) { canvas->drawImageRect(vdSurface->makeImageSnapshot().get(), src, - mutateProperties()->getBounds(), getPaint()); + mutateProperties()->getBounds(), getPaint(), SkCanvas::kFast_SrcRectConstraint); } else { // Handle the case when VectorDrawableAtlas has been destroyed, because of memory pressure. // We render the VD into a temporary standalone buffer and mark the frame as dirty. Next @@ -585,7 +585,7 @@ void Tree::draw(SkCanvas* canvas) { draw(surface.get(), src); mCache.clear(); canvas->drawImageRect(surface->makeImageSnapshot().get(), mutateProperties()->getBounds(), - getPaint()); + getPaint(), SkCanvas::kFast_SrcRectConstraint); markDirty(); } } |