Week #3 Status Report

This was the third week since the commencement of official coding period on 1st June. In the last three weeks a lot of work is done and a lot of work still remains. The phase 1 evaluation submissions shall begin from monday next week, so now just 7 days are remaining.

This week was mostly spent on accommodating review changes by my mentors and writing some unit tests.

Work Done:

Tests: 

I started my week writing some unit tests for the draw_dab and get_color methods that I had implemented previous to previous week.

Refactoring: 

Boud suggested me to do some refactoring as the design decisions of my previous approach were not that good. I had linked libmypaint to other component responsible for preset management in the code which was not the right thing to do as a good design would be to have all the dependencies that belong to a plugin contained in the plugin itself. Ideally, a plugin should be removable from the entire system by deleting or commenting a single line. So, I had to implement a separate paintop factory class and hook the plugin within this class. Boud gave me an entire archive with code to the previous mypaint plugin that we had in Krita years ago. So, this was nothing more than understanding its approach and implement the same thing.

Profiling: 

In my previous post I had mentioned that the brush engine is lagging. My mentors suggested me to profile the brush strokes as it would reveal the bottlenecks. I did the same and as it turned out that 3 specific methods (KoColor::toQcolor, KoColor::fromQcolor and KoColor(colorspace)) were responsible for the drag. These methods are designed in a manner that they do colorspace conversions for us so that the user can stay away from the dirty work. The problem with using these methods was that they were doing complex processing for something as simple as divide by 255.0f causing the strokes to lag a lot. To mitigate this, I simply removed those methods and did the operation manually which solved the problem. So the lag is much less severe now. 

In short, the week was mostly good, and it went as expected :)

Comments

Popular posts from this blog

Week #6 Progress [MyPaint Engine]

MyPaint Brush Engine Phase #3 Report

MyPaint Brush Engine Phase #2 Report