[PATCH 3/5] dwrite: Pass drawing effect to renderer in DrawGlyphRun()

Nikolay Sivov nsivov at codeweavers.com
Tue Jan 12 14:12:07 CST 2016


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 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 */
-- 
2.6.4




More information about the wine-patches mailing list