How to find the pixels of a texture for a certain face
By the sounds of it, you just need to optimize what you have.

Some suggestions.


Don't check every pixel, at the very least calculate a bounding box around the face's UV's and only check those pixels.
Rather then do a point-in-polygon test for each pixel. Use a scan-line method. See:  Darel Rex Finley's Efficient Polygon Fill, Or Blenders version of it fill_poly_v2i_n


Note that being a scripting language Python isn't ideal for these tasks - but it can likely be sped up enough to be usable as long as you don't need real-time feedback.



Update, made a more efficient version of Darel Rex's algorithm, see link.(avoids looping over all coordinates for each y-pixel).