Partial unclipped save layer support
Not yet implemented in renderer.
Change-Id: I491ec6e7886bfa313d1db71dd5981690d45b78a9
diff --git a/libs/hwui/BakedOpRenderer.cpp b/libs/hwui/BakedOpRenderer.cpp
index a0d5fae..4aebe3c 100644
--- a/libs/hwui/BakedOpRenderer.cpp
+++ b/libs/hwui/BakedOpRenderer.cpp
@@ -236,12 +236,13 @@
}
void BakedOpRenderer::prepareRender(const Rect* dirtyBounds, const ClipBase* clip) {
- // prepare scissor / stencil
+ // Prepare scissor (done before stencil, to simplify filling stencil)
mRenderState.scissor().setEnabled(clip != nullptr);
if (clip) {
mRenderState.scissor().set(mRenderTarget.viewportHeight, clip->rect);
}
+ // If stencil may be used for clipping, enable it, fill it, or disable it as appropriate
if (CC_LIKELY(!Properties::debugOverdraw)) {
// only modify stencil mode and content when it's not used for overdraw visualization
if (CC_UNLIKELY(clip && clip->mode != ClipMode::Rectangle)) {