Skip to content
Commit 70cf50c2 authored by Michael Ludwig's avatar Michael Ludwig
Browse files

Emulate replace clip ops using SkAndroidFrameworkUtils::ResetClip

At the JNI bridge, Region::Op::kReplace_Op is detected and sent
to new functions on Canvas.h -> emulateReplaceClip[Rect|Path].
The SkiaCanvas implementation calls
SkAndroidFrameworkUtils::ResetClip to turn the SkCanvas' clip
wide open (modulo the device clip restriction), followed by
an intersect op with the actual clip geometry.

SkiaCanvas is also updated to record the replace ops in its
Clip struct for partial saves.

This should result in no visible behavioral change at the Java
Canvas level, but allows the removal of the
SK_SUPPORT_DEPRECATED_CLIPOPS flag.

Test: Updated SkiaPipeline.clip_replace unit test to use the new
  emulateReplaceClipRect function instead of SkClipOp::kReplace.
  Builds and recently added CTS tests for clip ops pass.
Bug: b/151725198
Bug: b/143352151
Change-Id: I8fb8765b4ead92bbe8eceadb52710a5673b6cf6b
parent 311da53f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment