Skip to content

Commit 885d82d

Browse files
author
Romain Guy
committed
reset() should reset. Otherwise it would be called something else.
Bug #7256095 Change-Id: I610bbcaccdceaf2b5bb5f9d231283335911d4cd9
1 parent c521178 commit 885d82d

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

graphics/java/android/graphics/Paint.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,30 @@ public Paint(Paint paint) {
371371
public void reset() {
372372
native_reset(mNativePaint);
373373
setFlags(DEFAULT_PAINT_FLAGS);
374+
374375
// TODO: Turning off hinting has undesirable side effects, we need to
375376
// revisit hinting once we add support for subpixel positioning
376377
// setHinting(DisplayMetrics.DENSITY_DEVICE >= DisplayMetrics.DENSITY_TV
377378
// ? HINTING_OFF : HINTING_ON);
379+
380+
mColorFilter = null;
381+
mMaskFilter = null;
382+
mPathEffect = null;
383+
mRasterizer = null;
384+
mShader = null;
385+
mTypeface = null;
386+
mXfermode = null;
387+
378388
mHasCompatScaling = false;
379-
mCompatScaling = mInvCompatScaling = 1;
389+
mCompatScaling = 1;
390+
mInvCompatScaling = 1;
391+
392+
hasShadow = false;
393+
shadowDx = 0;
394+
shadowDy = 0;
395+
shadowRadius = 0;
396+
shadowColor = 0;
397+
380398
mBidiFlags = BIDI_DEFAULT_LTR;
381399
setTextLocale(Locale.getDefault());
382400
}

0 commit comments

Comments
 (0)