Avoid unnecessary comparison if both Typeface are NULL
BUG=skia: Review URL: https://codereview.chromium.org/1177833004
This commit is contained in:
parent
781d58215f
commit
48fc0ea272
@ -107,7 +107,7 @@ uint32_t SkTypeface::UniqueID(const SkTypeface* face) {
|
||||
}
|
||||
|
||||
bool SkTypeface::Equal(const SkTypeface* facea, const SkTypeface* faceb) {
|
||||
return SkTypeface::UniqueID(facea) == SkTypeface::UniqueID(faceb);
|
||||
return facea == faceb || SkTypeface::UniqueID(facea) == SkTypeface::UniqueID(faceb);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user