+ virtual AlphaHandling alpha_handling() const {
+ switch (pixel_format) {
+ case FORMAT_RGBA_PREMULTIPLIED_ALPHA:
+ case FORMAT_BGRA_PREMULTIPLIED_ALPHA:
+ return INPUT_AND_OUTPUT_PREMULTIPLIED_ALPHA;
+ case FORMAT_RGBA_POSTMULTIPLIED_ALPHA:
+ case FORMAT_BGRA_POSTMULTIPLIED_ALPHA:
+ return OUTPUT_POSTMULTIPLIED_ALPHA;
+ case FORMAT_RGB:
+ case FORMAT_BGR:
+ case FORMAT_GRAYSCALE:
+ return OUTPUT_BLANK_ALPHA;
+ default:
+ assert(false);
+ }
+ }