Skip to content
Commit 03b3e236 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Restore Paint#nSetColor(@ColorInt)

Bug: 127580253
Test: CtsGraphicsTestCases
Perf: systrace

Restored with a partial revert of "Add Paint#get(ShadowLayer)ColorLong"
(commit 6ee41101).

The original CL combined the @ColorInt and @ColorLong version for
simplicity, but required doing extra work for the @ColorInt version.
Separating them back out speeds it up at the cost of more code.
Using systrace I see the following stats:

Duration:
(w/o this change)       (w/ this change)
avg:    0.020 ms        0.001 ms
max:    9.141 ms        0.072 ms
min:    0.005 ms        0.001 ms
std:    0.074 ms        0.001 ms

This change shows a significant speed improvement. It does not do the
same for setShadowLayer, which is likely used less frequently.

Change-Id: I9021864fcad7d0149b93674f09339f805c272994
parent 309eb41a
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