Skip to content
Commit 10965f39 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Convert ColorLong in native code in Paint

Bug: 127580253
Test: CtsGraphicsTestCases
Perf: systrace

Follow on to I0b42c17159b290868a6bed7b90da096995504c4d, which did this
for other classes. I expect this to be more efficient due to passing
fewer JNI parameters, which appears to be the case based on the systrace
data for setColor(@ColorLong):

Duration:
(w/o this change)       (w/ this change)
avg:	0.010 ms        0.005 ms
max:	9.130 ms        0.239 ms
min:	0.002 ms        0.002 ms
std:	0.052 ms        0.004 ms

The average is twice as fast, the max is significantly shorter, and the
standard deviation is much smaller as well.

Change-Id: I241824bf2a934746df93da1063b14f3080486cb5
parent 03b3e236
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment