[Magnifier - 3] Reduce number of calls to PixelCopy
* Magnifier#show() takes snapshots of the content and displays them in the Magnifier bitmap * calling show(...) consecutive times with the same arguments is a no-op if already showing (to cater with the miriad of motion events produced by touch which end up calling show(...)) * introduced Magnifier#invalidate(...) which, if currently showing, forces updating the content using the last configuration * clamped the start horizontal value of the Rect which delimits the content to show in order to avoid distorting the rendering of the magnifier content * fixed invalidating the magnifier (invalidate() does not automatically call invalidate(RectF) !) Bug: 63531115 Bug: 67296158 Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest Test: manual test that shows the magnifier working Change-Id: I8e53dfb6582d541922fe05b60311658fb07ca880
Loading
Please register or sign in to comment