# HardwareBufferRenderer.RenderResult

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# RenderResult

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/graphics/HardwareBufferRenderer.RenderResult "View this page in Java")  

```
class RenderResult
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                               ||
| ↳ | [android.graphics.HardwareBufferRenderer.RenderResult](https://developer.android.com/reference/kotlin/android/graphics/HardwareBufferRenderer.RenderResult#) |

Class that contains data regarding the result of the render request. Consumers are to wait on the provided[SyncFence](https://developer.android.com/reference/kotlin/android/hardware/SyncFence.html#)before consuming the HardwareBuffer provided to[HardwareBufferRenderer](https://developer.android.com/reference/kotlin/android/graphics/HardwareBufferRenderer)as well as verify that the status returned by[RenderResult.getStatus()](https://developer.android.com/reference/kotlin/android/graphics/HardwareBufferRenderer.RenderResult#getStatus())returns[RenderResult.SUCCESS](https://developer.android.com/reference/kotlin/android/graphics/HardwareBufferRenderer.RenderResult#SUCCESS:kotlin.Int).

## Summary

|                                                                                                                                  Constants                                                                                                                                  ||
|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_UNKNOWN](https://developer.android.com/reference/kotlin/android/graphics/HardwareBufferRenderer.RenderResult#ERROR_UNKNOWN:kotlin.Int) Render request failed with an unknown error |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [SUCCESS](https://developer.android.com/reference/kotlin/android/graphics/HardwareBufferRenderer.RenderResult#SUCCESS:kotlin.Int) Render request was completed successfully               |

|                                                                                                            Public methods                                                                                                             ||
|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| [SyncFence](https://developer.android.com/reference/kotlin/android/hardware/SyncFence.html#) | [getFence](https://developer.android.com/reference/kotlin/android/graphics/HardwareBufferRenderer.RenderResult#getFence())`()` <br />   |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                   | [getStatus](https://developer.android.com/reference/kotlin/android/graphics/HardwareBufferRenderer.RenderResult#getStatus())`()` <br /> |

## Constants

### ERROR_UNKNOWN

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val ERROR_UNKNOWN: Int
```

Render request failed with an unknown error  

    Value: 1

### SUCCESS

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val SUCCESS: Int
```

Render request was completed successfully  

    Value: 0

## Public methods

### getFence

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getFence(): SyncFence
```

|                                                          Return                                                           ||
|----------------------------------------------------------------------------------------------|-----------------------------|
| [SyncFence](https://developer.android.com/reference/kotlin/android/hardware/SyncFence.html#) | This value cannot be`null`. |

### getStatus

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getStatus(): Int
```

|                                                                                                                                                                                                                                      Return                                                                                                                                                                                                                                      ||
|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is[android.graphics.HardwareBufferRenderer.RenderResult#SUCCESS](https://developer.android.com/reference/kotlin/android/graphics/HardwareBufferRenderer.RenderResult#SUCCESS:kotlin.Int), or[android.graphics.HardwareBufferRenderer.RenderResult#ERROR_UNKNOWN](https://developer.android.com/reference/kotlin/android/graphics/HardwareBufferRenderer.RenderResult#ERROR_UNKNOWN:kotlin.Int) |