Skip to content
  • Agata Cacko's avatar
    Fx MyPaint brush engine crashing in big sizes · 0a9b43e3
    Agata Cacko authored and Halla Rempt's avatar Halla Rempt committed
    Before this commit, MyPaint brushes would crash on big sizes
    (easy test: size 1000px on blend+paint) because it was
    initialized in the stack instead of on the heap.
    (For future readers, the wrong/stack initialization for big sizes:
    int array[size];
    heap initialization:
    int array = new array[size]; // and remember to delete [] array;!)
    
    This commit not only removes that initialization which fixes the crash,
    but also changes it to use a fixed device instead, which should
    help with memory fragmentization and make the brush engine
    faster on Windows (hopefully - no benchmarks were done).
    
    BUG:432754
    0a9b43e3