The size of this was resulting in cut off results from the pinspect tool, and ...
12 years, 1 month ago
(2012-09-14 18:56:18 UTC)
#1
The size of this was resulting in cut off results from the pinspect tool, and
since we use SkString::appendf() extensively in shader building, hitting this
limit on a really long line (unlikely, but still...) could result in incorrect
shaders.
That said, I dunno if allocating something this much larger on the stack would
hurt performance anywhere (esp. on Android).
On 2012/09/14 18:56:18, rileya wrote: > The size of this was resulting in cut off ...
12 years, 1 month ago
(2012-09-14 19:03:51 UTC)
#3
On 2012/09/14 18:56:18, rileya wrote:
> The size of this was resulting in cut off results from the pinspect tool, and
> since we use SkString::appendf() extensively in shader building, hitting this
> limit on a really long line (unlikely, but still...) could result in incorrect
> shaders.
>
> That said, I dunno if allocating something this much larger on the stack would
> hurt performance anywhere (esp. on Android).
I once looked into whether there was a way to get vsnprintf to give the buffer
size that would be required to print the whole string. Someone on the Internet
concluded that the only portable way to do it (without parsing the format string
and varargs yourself) was to repeatedly call vsnprintf with larger buffers until
the output size stopped increasing.
LGTM.
Issue 6503120: Double size of buffer for SkString::printf()
(Closed)
Created 12 years, 1 month ago by rileya
Modified 12 years, 1 month ago
Reviewers: bsalomon, robertphillips, reed1
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 0