Nikolay Sivov : dwrite: Improve SetScriptAnalysis()/SetBidiLevel() tracing.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Feb 2 09:59:29 CST 2016
Module: wine
Branch: master
Commit: e94264e6bde1e733e055f48be54540a958785352
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e94264e6bde1e733e055f48be54540a958785352
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Feb 2 01:41:11 2016 +0300
dwrite: Improve SetScriptAnalysis()/SetBidiLevel() tracing.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dwrite/analyzer.c | 5 +++++
dlls/dwrite/dwrite_private.h | 2 ++
dlls/dwrite/layout.c | 4 ++--
dlls/dwrite/tests/layout.c | 2 +-
4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
index 4b21f11..0f88fd9 100644
--- a/dlls/dwrite/analyzer.c
+++ b/dlls/dwrite/analyzer.c
@@ -177,6 +177,11 @@ static const struct dwritescript_properties dwritescripts_properties[Script_Last
};
#undef _OT
+const char *debugstr_sa_script(UINT16 script)
+{
+ return script < Script_LastId ? debugstr_an((char*)&dwritescripts_properties[script].props.isoScriptCode, 4): "not defined";
+}
+
struct dwrite_numbersubstitution {
IDWriteNumberSubstitution IDWriteNumberSubstitution_iface;
LONG ref;
diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h
index 79b34a5..ce08572 100644
--- a/dlls/dwrite/dwrite_private.h
+++ b/dlls/dwrite/dwrite_private.h
@@ -99,6 +99,8 @@ static inline const char *debugstr_matrix(const DWRITE_MATRIX *m)
m->dx, m->dy);
}
+const char *debugstr_sa_script(UINT16) DECLSPEC_HIDDEN;
+
static inline unsigned short get_table_entry(const unsigned short *table, WCHAR ch)
{
return table[table[table[ch >> 8] + ((ch >> 4) & 0x0f)] + (ch & 0xf)];
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index d281243..93c9c7b 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -3977,7 +3977,7 @@ static HRESULT WINAPI dwritetextlayout_sink_SetScriptAnalysis(IDWriteTextAnalysi
struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink1(iface);
struct layout_run *run;
- TRACE("%u %u script=%d\n", position, length, sa->script);
+ TRACE("[%u,%u) script=%u:%s\n", position, position + length, sa->script, debugstr_sa_script(sa->script));
run = alloc_layout_run(LAYOUT_RUN_REGULAR);
if (!run)
@@ -4009,7 +4009,7 @@ static HRESULT WINAPI dwritetextlayout_sink_SetBidiLevel(IDWriteTextAnalysisSink
struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink1(iface);
struct layout_run *cur_run;
- TRACE("%u %u %u %u\n", position, length, explicitLevel, resolvedLevel);
+ TRACE("[%u,%u) %u %u\n", position, position + length, explicitLevel, resolvedLevel);
LIST_FOR_EACH_ENTRY(cur_run, &layout->runs, struct layout_run, entry) {
struct regular_layout_run *cur = &cur_run->u.regular;
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index fe760c6..bc49b2f 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -1410,7 +1410,7 @@ static const struct drawcall_entry draw_seq2[] = {
};
static const struct drawcall_entry draw_seq3[] = {
- { DRAW_GLYPHRUN },
+ { DRAW_GLYPHRUN, {0x202a,0x202c,0} },
{ DRAW_GLYPHRUN, {'a','b',0} },
{ DRAW_LAST_KIND }
};
More information about the wine-cvs
mailing list