+ virtual bool can_output_linear_gamma() const {
+ return (movit_srgb_textures_supported &&
+ type == GL_UNSIGNED_BYTE &&
+ (image_format.gamma_curve == GAMMA_LINEAR ||
+ image_format.gamma_curve == GAMMA_sRGB));
+ }
+ 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);
+ }
+ }
+