With current code and document
Since Direct2D buffers drawing, Scintilla's buffering can be turned off with SCI_SETBUFFEREDDRAW(0).
application currently will need following steps to proper set buffered drawing:
SCI_SETTECHNOLOGY(technology)
technology = SCI_GETTECHNOLOGY();
SCI_SETBUFFEREDDRAW(technology == SC_TECHNOLOGY_DEFAULT);
with one line addition in case SCI_SETTECHNOLOGY:, there is no need to call SCI_SETBUFFEREDDRAW:
#if defined(USE_D2D)
DropRenderTarget();
view.bufferedDraw = technologyNew == SC_TECHNOLOGY_DEFAULT;
#endif
This sets buffered draw on for SC_TECHNOLOGY_DEFAULT which seems reasonable in most cases but could defeat the intention of applications that, when using GDI, prefer no buffering, perhaps using the old single phase drawing path.
They do have to have had Direct2D turned on, then switch back to GDI for this to be a problem, so it would not be common. May just need documentation: switching technology may reset other settings (buffering, drawing phases, ...) so other modes should be set if desired.
Committed as [d5a2f0].
Related
Commit: [d5a2f0]
Committed as [d5a2f0].
Related
Commit: [d5a2f0]