Lab 1 (andrew)

From CDOT Wiki
Jump to: navigation, search

Goal: find any files used by the PNG decoder.


Step2: record the names of the directories that have files that look relevant (the things in /modules/libimg/png/ are exactly the contents of libpng, the files in /modules/libpr0n/ are the glue between libpng and the rest of mozilla)

Step3: figure out why there is a nsPNGEncoder by searching for the name of a function in

Step4: the results of both a text search and an identifier search show it is not used anywhere

Step5: find classes related to nsPNGDecoder by looking at its header file:

Step6: header file includes imgIContainer.h, imgIDecoderObserver.h, gfxIImageFrame.h and has member variables of those classes.

Step7: repeat steps 4-6 for each of these classes to find their relationship

Step8: do some thinking and figure out that the decoder creates the container and adds frames to the container. the container uses its member observer to tell it about events (e.g. decoding started).