Nikolay Sivov : dwrite: Pass drawing effect to renderer in DrawGlyphRun().

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 13 12:14:17 CST 2016


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Jan 12 23:12:07 2016 +0300

dwrite: Pass drawing effect to renderer in DrawGlyphRun().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dwrite/layout.c       | 4 +++-
 dlls/dwrite/tests/layout.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index 344523c..09dbcfb 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -184,6 +184,7 @@ struct layout_effective_run {
     UINT32 start;           /* relative text position, 0 means first text position of a nominal run */
     UINT32 length;          /* length in codepoints that this run covers */
     UINT32 glyphcount;      /* total glyph count in this run */
+    IUnknown *effect;       /* original reference is kept only at range level */
     FLOAT origin_x;         /* baseline X position */
     FLOAT origin_y;         /* baseline Y position */
     FLOAT align_dx;         /* adjustment from text alignment */
@@ -1106,6 +1107,7 @@ static HRESULT layout_add_effective_run(struct dwrite_textlayout *layout, const
     for (i = 0; i < length; i++)
         run->clustermap[i] = r->u.regular.clustermap[start + i] - r->u.regular.clustermap[start];
 
+    run->effect = params->effect;
     list_add_tail(&layout->eruns, &run->entry);
 
     /* Strikethrough style is guaranteed to be consistent within effective run,
@@ -2979,7 +2981,7 @@ static HRESULT WINAPI dwritetextlayout_Draw(IDWriteTextLayout2 *iface,
             This->measuringmode,
             &glyph_run,
             &descr,
-            NULL);
+            run->effect);
     }
 
     /* 2. Inline objects */
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index bb5963f..07829bd 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -2998,7 +2998,7 @@ static void test_SetDrawingEffect(void)
     flush_sequence(sequences, RENDERER_ID);
     hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0, 0.0);
     ok(hr == S_OK, "got 0x%08x\n", hr);
-    ok_sequence(sequences, RENDERER_ID, draweffect2_seq, "effect draw test 2", TRUE);
+    ok_sequence(sequences, RENDERER_ID, draweffect2_seq, "effect draw test 2", FALSE);
     IDWriteTextLayout_Release(layout);
 
     /* Inline object - effect set for same range */




More information about the wine-cvs mailing list