render: expand CanvasKit image replay coverage#1096
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds richer CanvasKit image replay support and reporting, including direct-replay classification, image geometry payloads, and CanvasKit-side rendering for crop/fill/transform with improved cache keys.
Changes:
- Classify image ops as Direct vs Overlay based on supported image effects/adjustments and attach detail payloads for debugging.
- Implement CanvasKit image rendering for crop, fill-mode anchors, tiling, and transforms; improve image cache key uniqueness.
- Add Rust and TS tests covering new image replay behaviors (cache key, crop scaling, placement).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/canvaskit_policy.rs | Adds image replay item classification and detail strings; updates/extends replay plan tests for images. |
| rhwp-studio/src/view/canvaskit/image-replay.ts | New shared helpers for image cache keys, crop → source-rect conversion, placement, and tiling detection. |
| rhwp-studio/src/view/canvaskit-renderer.ts | Uses new helpers; adds crop/fill/tiling/transform support and tighter validation around image drawing. |
| rhwp-studio/src/core/types.ts | Extends LayerImageOp with originalSize/crop/transform metadata needed by the renderer. |
| rhwp-studio/tests/render-backend.test.ts | Adds tests for image cache key fingerprinting, crop scaling, and placement anchors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
edwardkim
added a commit
that referenced
this pull request
May 25, 2026
- pr_1096_review.md: 검토 (P-series 컨텍스트 + 코드 정독 + scope 명확) - pr_1096_report.md: 최종 결정 — merge 수용 (검증 7/7 + CI 전부 pass) 본 PR 의 본질: - CanvasKit image replay 가 crop/originalSize/fillMode/transform payload 직접 소비 - image cache key 강화 (base64 fingerprint, 같은 ref 다른 payload 충돌 방지) - 순수 함수 helper 분리 (image-replay.ts 신규) + 회귀 테스트 4 - replay item 분류 (direct vs deterministic detail) — effect/brightness/contrast 후속 검증: - cargo test canvaskit: 18 passed - lib 1341 passed / 0 failed - clippy + fmt clean - npm test 34 passed - npm run build 성공 - CI 전부 pass 호환성: - 기본 Canvas2D 무영향 - CanvasKit opt-in path 만 확장 - public Skia/PDF API 변경 없음 merge: 6cbd25e (GitHub admin merge — BEHIND 상태 우회, CI/검증 모두 통과 확인 후), 이슈 #536 은 트래킹 유지 (P19+ 후속). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
crop,originalSize,fillMode,transformpayload를 소비하도록 확장합니다.imageRef만 보지 않고 base64 payload fingerprint까지 포함하도록 바꿔 같은 ref의 다른 payload 충돌을 막습니다.getCanvasKitReplayPlan에서 단순 image는 direct item으로 보고, image effect/brightness/contrast처럼 아직 직접 적용하지 않는 항목은 deterministic detail로 남깁니다.imageEffect:*diagnostics로 드러냅니다.Why
P17에서
default/compat모두 hidden Canvas2D overlay 없이 direct replay contract로 고정했습니다. P18은 그 다음 단계로 CanvasKit image replay가 이미 layer JSON에 있는 image geometry payload를 실제로 소비하게 만드는 작업입니다.특히 crop/fill-mode/transform은 Canvas2D overlay 없이도 CanvasKit이 직접 replay할 수 있는 범위라 이번 PR에 넣고, raster effect/filter와 resource-cache 확장은 후속 범위로 남깁니다.
Compatibility
Non-goals
Validation
npm --prefix rhwp-studio testnpm --prefix rhwp-studio run buildcargo test canvaskit --libcargo fmt --checkgit diff --cached --checkRefs #536