Use stack allocation for Android data in SkScalerContext::MakeRec().
In a perfvis run on the "Boogie" test page, descriptorProc() during detachCache() was taking .721 ms, and 20% of that was the flatten() in MakeRec(). Changing this to a smaller stack allocation reduces the time for descriptorProc() to .556 ms. R=reed@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/372323003
This commit is contained in:
parent
0a65e38560
commit
65b6fa1777
@ -1850,7 +1850,8 @@ void SkPaint::descriptorProc(const SkDeviceProperties* deviceProperties,
|
||||
}
|
||||
|
||||
#ifdef SK_BUILD_FOR_ANDROID
|
||||
SkWriteBuffer androidBuffer;
|
||||
char buffer[128];
|
||||
SkWriteBuffer androidBuffer(buffer, sizeof(buffer));
|
||||
fPaintOptionsAndroid.flatten(androidBuffer);
|
||||
descSize += androidBuffer.bytesWritten();
|
||||
entryCount += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user