if (format == CAIRO_FORMAT_RGB24 || format == CAIRO_FORMAT_ARGB32)
{ int cap = GetDeviceCaps(dc, RASTERCAPS); if (cap & RC_BITBLT)
flags |= CAIRO_WIN32_SURFACE_CAN_BITBLT; if (!is_display && GetDeviceCaps(dc, SHADEBLENDCAPS) != SB_NONE)
flags |= CAIRO_WIN32_SURFACE_CAN_ALPHABLEND;
/* ARGB32 available operations are a strict subset of RGB24 *availableoperations.ThisisbecausethesameGDIfunctions *canbeusedbutmostofthemalwaysresetalphachannelto0 *whichisbadforARGB32.
*/ if (format == CAIRO_FORMAT_RGB24)
{
flags |= CAIRO_WIN32_SURFACE_CAN_RGB_BRUSH; if (cap & RC_STRETCHBLT)
flags |= CAIRO_WIN32_SURFACE_CAN_STRETCHBLT; if (cap & RC_STRETCHDIB)
flags |= CAIRO_WIN32_SURFACE_CAN_STRETCHDIB;
}
}
if (is_display) {
flags |= CAIRO_WIN32_SURFACE_IS_DISPLAY;
/* These will always be possible, but the actual GetDeviceCaps *callswillreturnwhetherthey'reacceleratedornot. *Wemaywanttouseourown(pixman)routinessometimes *ifthey'reeventuallyfaster,butfornowhaveGDIdo *everything.
*/ #if0
flags |= CAIRO_WIN32_SURFACE_CAN_BITBLT;
flags |= CAIRO_WIN32_SURFACE_CAN_ALPHABLEND;
flags |= CAIRO_WIN32_SURFACE_CAN_STRETCHBLT;
flags |= CAIRO_WIN32_SURFACE_CAN_STRETCHDIB; #endif
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.