---
title: "CanvasOp.SaveRestore"
description: "Represents a save/restore group (corresponding to RemoteComposeWriter.save and RemoteComposeWriter.restore)."
type: "class"
lastmod: "2026-07-30T07:35:59.207607Z"
---
## API Reference

> Source set: Android

```kotlin
class SaveRestore(
        val parent: SaveRestore? = null,
        val children: MutableList<CanvasOp> = ArrayList(),
    ) : CanvasOp()
```

Represents a save/restore group (corresponding to `RemoteComposeWriter.save` and
`RemoteComposeWriter.restore`).

## Properties

### hasDrawCalls

> Source set: Android

```kotlin
var hasDrawCalls = false
```

Indicates whether this scope or any of its descendants contain actual drawing calls. Used
during the elision pass to discard empty scopes.

### elisionMode

> Source set: Android

```kotlin
var elisionMode = ElisionMode.PRESERVE
```

The elision strategy decided for this scope during the elision pass.

### spanOp

> Source set: Android

```kotlin
var spanOp: CanvasOperationBuffer.SpanOp?
```

### isTopLevel

> Source set: Android

```kotlin
var isTopLevel = false
```

## Functions

### getRootSaveNode

```kotlin
fun getRootSaveNode(): SaveRestore
```

### hasChildTransformsOrClips

```kotlin
fun hasChildTransformsOrClips(): Boolean
```
