Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1beddee4 authored by Nathaniel Nifong's avatar Nathaniel Nifong Committed by Android (Google) Code Review
Browse files

Merge "Do not clip draw commands during recording of SKP files"

parents bd0ae945 89a5dc51
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -458,9 +458,15 @@ void SkiaPipeline::renderFrameImpl(const SkRect& clip,
                                   const SkMatrix& preTransform) {
    SkAutoCanvasRestore saver(canvas, true);
    auto clipRestriction = preTransform.mapRect(clip).roundOut();
    canvas->androidFramework_setDeviceClipRestriction(clipRestriction);
    if (CC_UNLIKELY(mCaptureMode == CaptureMode::SingleFrameSKP
         || mCaptureMode == CaptureMode::MultiFrameSKP)) {
        canvas->drawAnnotation(SkRect::Make(clipRestriction), "AndroidDeviceClipRestriction",
            nullptr);
    } else {
        // clip drawing to dirty region only when not recording SKP files (which should contain all
        // draw ops on every frame)
        canvas->androidFramework_setDeviceClipRestriction(clipRestriction);
    }
    canvas->concat(preTransform);

    // STOPSHIP: Revert, temporary workaround to clear always F16 frame buffer for b/74976293