Fix mipScale issue in GrSmallPathRenderer
Bug: skia:11840 Change-Id: Ief89855554e4ed21da20a2fdef4945294cf46498 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393416 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
8cad6374f0
commit
cbbd5653da
@ -292,7 +292,9 @@ private:
|
||||
SkScalar log = SkScalarCeilToScalar(SkScalarLog2(maxScale));
|
||||
mipScale = SkScalarPow(2, log);
|
||||
}
|
||||
SkASSERT(maxScale <= mipScale);
|
||||
// Log2 isn't very precise at values close to a power of 2,
|
||||
// so add a little tolerance here. A little bit of scaling up is fine.
|
||||
SkASSERT(maxScale <= mipScale + SK_ScalarNearlyZero);
|
||||
|
||||
SkScalar mipSize = mipScale*SkScalarAbs(maxDim);
|
||||
// For sizes less than kIdealMinMIP we want to use as large a distance field as we can
|
||||
|
Loading…
Reference in New Issue
Block a user