dwrite: Use more intuitive naming for layout stages.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-07-18 13:03:44 +03:00 committed by Alexandre Julliard
parent b22dfdc98c
commit 84a36f27b8
1 changed files with 11 additions and 11 deletions

View File

@ -224,10 +224,10 @@ struct layout_cluster {
}; };
enum layout_recompute_mask { enum layout_recompute_mask {
RECOMPUTE_NOMINAL_RUNS = 1 << 0, RECOMPUTE_CLUSTERS = 1 << 0,
RECOMPUTE_MINIMAL_WIDTH = 1 << 1, RECOMPUTE_MINIMAL_WIDTH = 1 << 1,
RECOMPUTE_EFFECTIVE_RUNS = 1 << 2, RECOMPUTE_LINES = 1 << 2,
RECOMPUTE_EVERYTHING = 0xffff RECOMPUTE_EVERYTHING = 0xffff
}; };
struct dwrite_textlayout { struct dwrite_textlayout {
@ -1037,7 +1037,7 @@ static HRESULT layout_compute(struct dwrite_textlayout *layout)
{ {
HRESULT hr; HRESULT hr;
if (!(layout->recompute & RECOMPUTE_NOMINAL_RUNS)) if (!(layout->recompute & RECOMPUTE_CLUSTERS))
return S_OK; return S_OK;
/* nominal breakpoints are evaluated only once, because string never changes */ /* nominal breakpoints are evaluated only once, because string never changes */
@ -1076,7 +1076,7 @@ static HRESULT layout_compute(struct dwrite_textlayout *layout)
} }
} }
layout->recompute &= ~RECOMPUTE_NOMINAL_RUNS; layout->recompute &= ~RECOMPUTE_CLUSTERS;
return hr; return hr;
} }
@ -1714,7 +1714,7 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout)
UINT32 i, start, line, textpos; UINT32 i, start, line, textpos;
HRESULT hr; HRESULT hr;
if (!(layout->recompute & RECOMPUTE_EFFECTIVE_RUNS)) if (!(layout->recompute & RECOMPUTE_LINES))
return S_OK; return S_OK;
hr = layout_compute(layout); hr = layout_compute(layout);
@ -1910,7 +1910,7 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout)
layout->metrics.heightIncludingTrailingWhitespace = layout->metrics.height; /* FIXME: not true for vertical text */ layout->metrics.heightIncludingTrailingWhitespace = layout->metrics.height; /* FIXME: not true for vertical text */
layout->recompute &= ~RECOMPUTE_EFFECTIVE_RUNS; layout->recompute &= ~RECOMPUTE_LINES;
return hr; return hr;
} }
@ -3765,7 +3765,7 @@ static HRESULT WINAPI dwritetextformat_layout_SetTextAlignment(IDWriteTextFormat
return hr; return hr;
/* if layout is not ready there's nothing to align */ /* if layout is not ready there's nothing to align */
if (changed && !(This->recompute & RECOMPUTE_EFFECTIVE_RUNS)) if (changed && !(This->recompute & RECOMPUTE_LINES))
layout_apply_text_alignment(This); layout_apply_text_alignment(This);
return S_OK; return S_OK;
@ -3784,7 +3784,7 @@ static HRESULT WINAPI dwritetextformat_layout_SetParagraphAlignment(IDWriteTextF
return hr; return hr;
/* if layout is not ready there's nothing to align */ /* if layout is not ready there's nothing to align */
if (changed && !(This->recompute & RECOMPUTE_EFFECTIVE_RUNS)) if (changed && !(This->recompute & RECOMPUTE_LINES))
layout_apply_par_alignment(This); layout_apply_par_alignment(This);
return S_OK; return S_OK;
@ -3803,7 +3803,7 @@ static HRESULT WINAPI dwritetextformat_layout_SetWordWrapping(IDWriteTextFormat1
return hr; return hr;
if (changed) if (changed)
This->recompute |= RECOMPUTE_EFFECTIVE_RUNS; This->recompute |= RECOMPUTE_LINES;
return S_OK; return S_OK;
} }