Alexandre Julliard : gdi32: Add support for pushing a font driver on the DC driver stack.

Alexandre Julliard julliard at winehq.org
Wed Oct 19 14:05:26 CDT 2011


Module: wine
Branch: master
Commit: 6bb001da6fa43d2a6a0cc021d2ab8c3c897ae388
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6bb001da6fa43d2a6a0cc021d2ab8c3c897ae388

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct 18 11:43:23 2011 +0200

gdi32: Add support for pushing a font driver on the DC driver stack.

---

 dlls/gdi32/dc.c          |    6 ++++++
 dlls/gdi32/driver.c      |    2 ++
 dlls/gdi32/gdi_private.h |    1 +
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c
index 74d3747..13e48fd 100644
--- a/dlls/gdi32/dc.c
+++ b/dlls/gdi32/dc.c
@@ -154,6 +154,12 @@ DC *alloc_dc_ptr( WORD magic )
         return NULL;
     }
     dc->nulldrv.hdc = dc->hSelf;
+
+    if (font_driver && !font_driver->pCreateDC( &dc->physDev, NULL, NULL, NULL, NULL ))
+    {
+        free_dc_ptr( dc );
+        return NULL;
+    }
     return dc;
 }
 
diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c
index 565e0ad..d0b30be 100644
--- a/dlls/gdi32/driver.c
+++ b/dlls/gdi32/driver.c
@@ -49,6 +49,8 @@ struct graphics_driver
 static struct list drivers = LIST_INIT( drivers );
 static struct graphics_driver *display_driver;
 
+const struct gdi_dc_funcs *font_driver = NULL;
+
 static CRITICAL_SECTION driver_section;
 static CRITICAL_SECTION_DEBUG critsect_debug =
 {
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
index 0d38efe..9ee6c04 100644
--- a/dlls/gdi32/gdi_private.h
+++ b/dlls/gdi32/gdi_private.h
@@ -270,6 +270,7 @@ extern DWORD blend_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struc
 /* driver.c */
 extern const struct gdi_dc_funcs null_driver DECLSPEC_HIDDEN;
 extern const struct gdi_dc_funcs dib_driver DECLSPEC_HIDDEN;
+extern const struct gdi_dc_funcs *font_driver DECLSPEC_HIDDEN;
 extern const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name ) DECLSPEC_HIDDEN;
 extern BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size ) DECLSPEC_HIDDEN;
 




More information about the wine-cvs mailing list