Skip to content

render: improve Skia text replay parity#769

Closed
seo-rii wants to merge 3 commits into
edwardkim:develfrom
seo-rii:render-p9
Closed

render: improve Skia text replay parity#769
seo-rii wants to merge 3 commits into
edwardkim:develfrom
seo-rii:render-p9

Conversation

@seo-rii

@seo-rii seo-rii commented May 10, 2026

Copy link
Copy Markdown
Contributor

What

P9는 native Skia text replay가 기존 TextRunNode payload를 더 많이 소비하도록 보강하는 PR입니다. 단순 glyph drawing만 하는 상태에서, 이미 layer payload에 들어있는 text metadata를 가능한 범위에서 replay하게 만듭니다.

  • char overlap, tab leader, text decoration을 native Skia replay에 반영합니다.
  • shade/shadow/outline-style effect, emphasis dot, vertical rotation을 처리합니다.
  • output option에 따른 control mark replay를 보강합니다.
  • char overlap, empty-text tab leader, control mark, decorated text에 대한 native Skia raster 테스트를 추가합니다.
  • 커진 text replay 구현을 src/renderer/skia/text_replay.rs로 분리해서 renderer.rs가 page/layer replay orchestration에 집중하게 정리합니다.

Why

P8에서 Layer IR schema/resource/output option contract를 먼저 고정하고, P9에서는 그 contract 위에서 실제 native Skia text parity를 올립니다. direct Skia replay를 의미 있는 backend로 보려면 기존 TextRunNode에 이미 있는 렌더링 정보를 조용히 무시하면 안 됩니다.

원래 P10으로 따로 빼려던 text replay module split은 순수 리팩터링에 가까워서 P9에 접었습니다. 기능 보강으로 커진 text replay 코드를 같은 PR 안에서 정리하는 편이 리뷰 흐름도 더 자연스럽습니다.

현재 draft는 #761 위에 쌓인 상태라 GitHub diff에 P8 변경이 같이 보일 수 있습니다. 의도한 P9 리뷰 범위는 render-p8 위의 text replay parity + text replay module split 변경입니다.

Non-goals

  • skia 브랜치의 full text source table / glyph-run IR 작업은 아직 넣지 않습니다.
  • Skia를 기본 public render path로 전환하지 않습니다.
  • targeted raster test 외의 visual/pixel regression infrastructure는 추가하지 않습니다.

Validation

  • cargo test --features native-skia --lib skia
  • cargo clippy --features native-skia --lib -- -D warnings

Refs #536

edwardkim added a commit that referenced this pull request May 10, 2026
P9 단계 — native Skia text replay 영역 기존 TextRunNode payload 영역 더 많이 소비. 단순 glyph drawing 영역 layer payload 의 text metadata 영역 가능 범위 영역 replay.

Skia native raster 트래킹 (Issue #536) 의 단계적 진전:
- P4 #599 → P5 #626 → P6 #720 → P8 #761 → P9 #769

P9 본질 보강:
- char overlap / tab leader / text decoration (underline/strike/overline)
- shade/shadow/outline-style effect
- emphasis dot (한글 강조점)
- vertical rotation (세로쓰기)
- output options 영역 control mark replay

인프라 도입 — text_replay.rs 모듈 분리 (P10 → P9 통합):
- src/renderer/skia/text_replay.rs 신규 (+748)
- renderer.rs 영역 page/layer replay orchestration 영역 집중
- src/renderer/skia/mod.rs 모듈 등록

본 환경 cherry-pick:
- 49b540a (P8) → empty (PR #761 머지 완료 영역 동일 본질) → skip
- 8f079b1 (P9 본질 1) → cherry-pick
- c74fb92 (P9 본질 2, split) → cherry-pick

Non-goals (PR 본문 명시):
- full text source table / glyph-run IR 미포함
- Skia 영역 기본 public render path 전환 부재
- targeted raster test 외 visual/pixel regression infrastructure 추가 부재

검증:
- cargo build/test/clippy --release ALL GREEN
- cargo test --features native-skia --lib skia → 28/28 PASS (신규 4건 + 기존 24건)
  - renders_char_overlap_text_run_as_ink
  - renders_decorated_text_as_ink
  - renders_tab_leader_for_empty_text_run
  - renders_output_control_marks_as_ink
- cargo clippy --release --features native-skia --lib -- -D warnings 통과
- 광범위 sweep 7 fixture / 170 페이지 / 회귀 0 (skia 만 영역 svg sweep 무영향 입증)
- 시각 판정 면제 (작업지시자 결정 — targeted raster + sweep 통과 + Skia 만 변경)

Refs #536
@edwardkim

Copy link
Copy Markdown
Owner

@seo-rii 검토 완료했습니다. 감사합니다.

처리 결과

Merge commit: 1097fbe4 (devel)

본질

P9 단계 — native Skia text replay 영역 기존 TextRunNode payload 영역 더 많이 소비. PR #599 (P4) → #626 (P5) → #720 (P6) → #761 (P8) → P9 (#769) 단계적 진전.

본 환경 처리

검증

  • cargo build/test/clippy --release ALL GREEN
  • native-skia 28/28 PASS (신규 4건: renders_char_overlap_text_run_as_ink, renders_decorated_text_as_ink, renders_tab_leader_for_empty_text_run, renders_output_control_marks_as_ink)
  • cargo clippy --features native-skia --lib -- -D warnings 통과
  • 광범위 sweep 170/170 same diff=0 (skia 만 영역 svg sweep 무영향 입증)
  • 시각 판정 면제 (targeted raster + sweep 통과 + Skia 만 변경)

5/10 사이클 — Skia text replay parity 보강 + module split, 수고하셨습니다.

@edwardkim

Copy link
Copy Markdown
Owner

Merged. Merge commit: 1097fbe

@edwardkim edwardkim closed this May 10, 2026
edwardkim added a commit that referenced this pull request May 10, 2026
PR #769 (Refs #536) 처리 보고서 + 검토 문서 archives 이동 + 5/10 orders 행 추가.
Skia native raster P9 — text replay parity + module split (P10 통합).

Merge commit: 1097fbe
Cherry-pick: 7a9015f + e275789 (P8 49b540a empty skip)
edwardkim added a commit that referenced this pull request May 10, 2026
5/10 + 5/11 사이클 누적 — 외부 기여자 다수 PR 30+ 머지.

Cargo.toml + rhwp-vscode/package.json + npm/editor/package.json + rhwp-studio/package.json: 0.7.10 → 0.7.11
rhwp-vscode/CHANGELOG.md: [0.7.11] 항목 추가

핵심 변경:
- Skia native raster P8 (#761) + P9 (#769) — Layer IR contract hardening + text replay parity
- HWP3 native 렌더링 (#753) — hwp3-sample10 8 단계 정정 + Git LFS pdf-large/ 신규
- 페이지네이션 정정 (#778) — Task #703 다단 컬럼 분배 회귀 정정
- rhwp-studio 인터랙션 (PR #781/#786/#787/#788) — scrollbar/수식/표 셀/도구 모음 결함 정정
- rhwp-studio editor 신규 기능 (PR #728/#748/#750/#760 등) — 표 편집 Undo/Redo + 다단 설정 + 다수 단축키
@edwardkim edwardkim mentioned this pull request May 10, 2026
4 tasks
edwardkim added a commit that referenced this pull request May 11, 2026
…ract (P11)

P11 단계 — P9 영역 영역 text replay parity 후속 영역 영역 Text IR v2 compatibility contract 추가.

Skia native raster Issue #536 트래킹 단계적 진전:
P4 #599 → P5 #626 → P6 #720 → P8 #761 → P9 #769 → P11 #797

중요: 본 PR 은 GlyphRun 을 기본 경로로 만드는 PR 이 아니라 TextRun v2 compatibility contract 를 완성하는 PR.

4 본질 원칙:
- Compatibility first — 모든 backend 가 TextRun fallback 으로 렌더링 가능
- Additive schema — schemaMinorVersion + feature negotiation (기존 consumer 미파괴)
- Source traceability — text_sources + TextRun.source span
- Placement/cluster metadata — paintStyle/projectionKind/orientation/placement/clusterBasis/clusters/legacyVisuals

신규 인프라:
- PaintOp::{CharOverlap, TextControlMark, TabLeader, TextDecoration} — explicit visual ops
- PageLayerTree.text_sources + TextSourceTable (export-local)
- TextRun.source span + 7 신규 metadata
- schemaMinorVersion + resourceTableMinorVersion + feature negotiation
- docs/text-ir-v2.md migration contract

Renderer 정정 — 4 backend 동기 (feedback_image_renderer_paths_separate 권위 사례):
- svg_layer.rs / canvas.rs / skia/renderer.rs / web_canvas.rs — 신규 special visual op skip (double-painting 방지)

Non-goals (Still designing):
- GlyphRun eligibility / font resource table / cluster basis / fallback diagnostics — P12+ 분리

검증:
- cargo build/test/clippy --release ALL GREEN (clippy -D warnings)
- native-skia 28/28 PASS (PR #769 인프라 보존)
- 광범위 sweep 7 fixture / 170 페이지 / 회귀 0 (Compatibility first 원칙 입증)
- 시각 판정 면제 (작업지시자 결정 — contract 정합 단계 + 결정적 검증 + sweep 통과)

Refs #536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants