* Only emit image painting events in debug & profile modes.
These events were being emitted in release mode, which was showing up in the
profiler for my app as taking up a noticeable amount of build time (still
well within the frame budget, but this code was near the top of the list).
* Review comment