OSDN Git Service

Use own enum instead of SkTypeface::Style.
authorBen Wagner <bungeman@google.com>
Fri, 6 Oct 2017 21:36:23 +0000 (17:36 -0400)
committerBen Wagner <bungeman@google.com>
Mon, 9 Oct 2017 18:26:39 +0000 (18:26 +0000)
commit2763fb726b1dfdf6b9a0685794ca9fa538322776
tree161c21ca7a592c681fe72b0d2598f82bde46bc0e
parent34e83d28f03432f2447928241886c9c668299061
Use own enum instead of SkTypeface::Style.

The current use of SkTypeface::Style and the naming of
Typeface::fSkiaStyle are misleading. Neither is used to actually
interact with Skia (which no longer uses the type in its API). Instead,
this type and field are used to track the values which will be exposed
through the jni layer which match the Android SDK values for the
constants on the android.graphics.Typeface type.

This change allows Skia to hide and eventually remove SkTypeface::Style,
as this is the last known external user. Additionally this allows
Android an easier path when updating the Typeface API in the future.

Test: refactoring CL. Existing unit tests still pass.
Change-Id: Ic820105a5b0d98727586fdc4a9a1c45e8ad40ff3
core/jni/android/graphics/Typeface.cpp
libs/hwui/hwui/Typeface.cpp
libs/hwui/hwui/Typeface.h
libs/hwui/tests/unit/TypefaceTests.cpp