diff options
author | sergeyv <sergeyv@google.com> | 2016-10-20 15:04:28 -0700 |
---|---|---|
committer | sergeyv <sergeyv@google.com> | 2016-10-20 15:04:28 -0700 |
commit | 5fd2a1cb2726afa7d40fe4750e9defd89c24ed37 (patch) | |
tree | 6fd60d98275b89d4957befdb03b02644d34f4cd8 /libs/hwui/RecordingCanvas.cpp | |
parent | fc9999505a36c66892d7ccce85187936105f4f36 (diff) |
Pass Bitmap instead of SkBitmap in drawNinePatch & drawBitmapMesh
Test: refactoring cl.
bug:32216791
Change-Id: I5adcd59daf752d36012456b0a9960c59d07e2e3d
Diffstat (limited to 'libs/hwui/RecordingCanvas.cpp')
-rw-r--r-- | libs/hwui/RecordingCanvas.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/hwui/RecordingCanvas.cpp b/libs/hwui/RecordingCanvas.cpp index d25202690c19..77be38db216c 100644 --- a/libs/hwui/RecordingCanvas.cpp +++ b/libs/hwui/RecordingCanvas.cpp @@ -527,8 +527,10 @@ void RecordingCanvas::drawBitmap(Bitmap& hwuiBitmap, float srcLeft, float srcTop } } -void RecordingCanvas::drawBitmapMesh(const SkBitmap& bitmap, int meshWidth, int meshHeight, +void RecordingCanvas::drawBitmapMesh(Bitmap& hwuiBitmap, int meshWidth, int meshHeight, const float* vertices, const int* colors, const SkPaint* paint) { + SkBitmap bitmap; + hwuiBitmap.getSkBitmap(&bitmap); int vertexCount = (meshWidth + 1) * (meshHeight + 1); addOp(alloc().create_trivial<BitmapMeshOp>( calcBoundsOfPoints(vertices, vertexCount * 2), @@ -539,9 +541,11 @@ void RecordingCanvas::drawBitmapMesh(const SkBitmap& bitmap, int meshWidth, int refBuffer<int>(colors, vertexCount))); // 1 color per vertex } -void RecordingCanvas::drawNinePatch(const SkBitmap& bitmap, const android::Res_png_9patch& patch, +void RecordingCanvas::drawNinePatch(Bitmap& hwuiBitmap, const android::Res_png_9patch& patch, float dstLeft, float dstTop, float dstRight, float dstBottom, const SkPaint* paint) { + SkBitmap bitmap; + hwuiBitmap.getSkBitmap(&bitmap); addOp(alloc().create_trivial<PatchOp>( Rect(dstLeft, dstTop, dstRight, dstBottom), *(mState.currentSnapshot()->transform), |