• Tor Lillqvist's avatar
    tdf#95054: Make sure glyphs alpha blend properly in the Graphite+OpenGL case · ac04051a
    Tor Lillqvist yazdı
    The problem apparently was that the GraphiteWinLayout::DrawTextImpl()
    function drew each glyph using a separate call to ExtTextOutW().  That
    mishandled anti-aliased glyphs (alpha), somewhat in the way as
    described in the nice long comment (thanks kendy!) in
    WinLayout::DrawText().
    
    The irony here is that in the case of Graphite fonts and OpenGL, it is
    exactly from that code block in WinLayout::DrawText() that
    GraphiteWinLayout::DrawTextImpl() gets called, and in that situation
    it itself runs into the same or similar problem as the calling code
    wants to avoid for the run as a whole. It draws each glyph separately,
    and subsequent glyphs will overwrite the rightmost pixels of the
    earlier one instead of blend properly. Or something like that.
    
    As a solution, change the interface of DrawTextImpl() so that instead
    of being called once to draw a run of text, it might draw just a part
    of the run, and in that case expects to be called repeatedly to draw
    the whole text.
    
    The GraphiteWinLayout::DrawTextImpl() implementation does it like this
    in the case of using OpenGL (as indicated by the presence of a
    non-null pRectToErase, as added in
    b7842c93 for tdf#95648). The end
    result is that it draws one glyph at a time into the DC for the bitmap
    allocated in the caller, WinLayout::DrawText(). The caller uses that
    bitmap as a texture and blends it into the actual destination,
    separately for each glyph.
    
    For non-Graphite fonts, or when not using OpenGL, nothing should
    change. No repeated DrawTextImpl calls are done to iterate over a run.
    
    Change-Id: Ib7adc30665fc7804913fd2f8886c5b29d9ca42c4
    (cherry picked from commit 61085083)
    ac04051a
Adı
Son kayıt (commit)
Son güncelleme
..
android Loading commit data...
generic Loading commit data...
glyphy Loading commit data...
headless Loading commit data...
inc Loading commit data...
ios Loading commit data...
null Loading commit data...
opengl Loading commit data...
osx Loading commit data...
qa Loading commit data...
quartz Loading commit data...
source Loading commit data...
uiconfig/ui Loading commit data...
unx Loading commit data...
win/source Loading commit data...
workben Loading commit data...
AllLangResTarget_vcl.mk Loading commit data...
CppunitTest_vcl_app_test.mk Loading commit data...
CppunitTest_vcl_bitmap_test.mk Loading commit data...
CppunitTest_vcl_complextext.mk Loading commit data...
CppunitTest_vcl_filters_test.mk Loading commit data...
CppunitTest_vcl_fontcharmap.mk Loading commit data...
CppunitTest_vcl_lifecycle.mk Loading commit data...
CppunitTest_vcl_outdev.mk Loading commit data...
CppunitTest_vcl_timer.mk Loading commit data...
CppunitTest_vcl_wmf_test.mk Loading commit data...
CustomTarget_afm_hash.mk Loading commit data...
CustomTarget_kde4_moc.mk Loading commit data...
CustomTarget_tde_moc.mk Loading commit data...
Executable_fftester.mk Loading commit data...
Executable_icontest.mk Loading commit data...
Executable_mtfdemo.mk Loading commit data...
Executable_outdevgrind.mk Loading commit data...
Executable_svdemo.mk Loading commit data...
Executable_svpclient.mk Loading commit data...
Executable_svptest.mk Loading commit data...
Executable_tdefilepicker.mk Loading commit data...
Executable_ui-previewer.mk Loading commit data...
Executable_vcldemo.mk Loading commit data...
Executable_xid_fullscreen_on_all_monitors.mk Loading commit data...
Library_desktop_detector.mk Loading commit data...
Library_vcl.mk Loading commit data...
Library_vclplug_gen.mk Loading commit data...
Library_vclplug_gtk.mk Loading commit data...
Library_vclplug_gtk3.mk Loading commit data...
Library_vclplug_kde4.mk Loading commit data...
Library_vclplug_tde.mk Loading commit data...
Makefile Loading commit data...
Module_vcl.mk Loading commit data...
Package_fontunxppds.mk Loading commit data...
Package_fontunxpsprint.mk Loading commit data...
Package_opengl.mk Loading commit data...
Package_opengl_blacklist.mk Loading commit data...
Package_osxres.mk Loading commit data...
README Loading commit data...
README.GDIMetaFile Loading commit data...
README.lifecycle Loading commit data...
README.vars Loading commit data...
StaticLibrary_glxtest.mk Loading commit data...
StaticLibrary_vclmain.mk Loading commit data...
UIConfig_vcl.mk Loading commit data...
WinResTarget_vcl.mk Loading commit data...
vcl.android.component Loading commit data...
vcl.headless.component Loading commit data...
vcl.ios.component Loading commit data...
vcl.macosx.component Loading commit data...
vcl.unx.component Loading commit data...
vcl.windows.component Loading commit data...