# lv_nanovg_fbo_cache.h (/api/draw/nanovg/lv_nanovg_fbo_cache_h)



<ApiSummary functions="5" />

Functions [#functions]

<ApiTabs items="[&#x22;Getters (1)&#x22;,&#x22;Other (4)&#x22;]">
  <ApiTab value="Getters (1)">
    <ApiMember kind="function" name="lv_nanovg_fbo_cache_get" file="draw/nanovg/lv_nanovg_fbo_cache.h" line="58" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/nanovg/lv_nanovg_fbo_cache.h#L58">
      lv_nanovg_fbo_cache_get [#lv_nanovg_fbo_cache_get]

      Get the FBO from the cache, create a new one if not found.

      ```c title=" " lineNumbers=1
      struct _lv_cache_entry_t * lv_nanovg_fbo_cache_get(struct _lv_draw_nanovg_unit_t *u, int width, int height, int flags, int format)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                                                | Description                |
      | -------- | ----------------------------------------------------------------------------------- | -------------------------- |
      | `u`      | <ApiLink name="_lv_draw_nanovg_unit_t" display="struct _lv_draw_nanovg_unit_t *" /> | pointer to the nanovg unit |
      | `width`  | `int`                                                                               | the width of the FBO       |
      | `height` | `int`                                                                               | the height of the FBO      |
      | `flags`  | `int`                                                                               | the FBO flags              |
      | `format` | `int`                                                                               | the texture format         |

      **Returns:** <ApiLink name="_lv_cache_entry_t" display="struct _lv_cache_entry_t *" /> — the FBO cache entry, or NULL if not found
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (4)">
    <ApiMember kind="function" name="lv_nanovg_fbo_cache_init" file="draw/nanovg/lv_nanovg_fbo_cache.h" line="41" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/nanovg/lv_nanovg_fbo_cache.h#L41">
      lv_nanovg_fbo_cache_init [#lv_nanovg_fbo_cache_init]

      Initialize the FBO cache.

      ```c title=" " lineNumbers=1
      void lv_nanovg_fbo_cache_init(struct _lv_draw_nanovg_unit_t *u)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name | Type                                                                                | Description                |
      | ---- | ----------------------------------------------------------------------------------- | -------------------------- |
      | `u`  | <ApiLink name="_lv_draw_nanovg_unit_t" display="struct _lv_draw_nanovg_unit_t *" /> | pointer to the nanovg unit |
    </ApiMember>

    <ApiMember kind="function" name="lv_nanovg_fbo_cache_deinit" file="draw/nanovg/lv_nanovg_fbo_cache.h" line="47" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/nanovg/lv_nanovg_fbo_cache.h#L47">
      lv_nanovg_fbo_cache_deinit [#lv_nanovg_fbo_cache_deinit]

      Deinitialize the FBO cache.

      ```c title=" " lineNumbers=1
      void lv_nanovg_fbo_cache_deinit(struct _lv_draw_nanovg_unit_t *u)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name | Type                                                                                | Description                |
      | ---- | ----------------------------------------------------------------------------------- | -------------------------- |
      | `u`  | <ApiLink name="_lv_draw_nanovg_unit_t" display="struct _lv_draw_nanovg_unit_t *" /> | pointer to the nanovg unit |
    </ApiMember>

    <ApiMember kind="function" name="lv_nanovg_fbo_cache_release" file="draw/nanovg/lv_nanovg_fbo_cache.h" line="66" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/nanovg/lv_nanovg_fbo_cache.h#L66">
      lv_nanovg_fbo_cache_release [#lv_nanovg_fbo_cache_release]

      Release the FBO from the cache.

      ```c title=" " lineNumbers=1
      void lv_nanovg_fbo_cache_release(struct _lv_draw_nanovg_unit_t *u, struct _lv_cache_entry_t *entry)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                                                | Description                    |
      | ------- | ----------------------------------------------------------------------------------- | ------------------------------ |
      | `u`     | <ApiLink name="_lv_draw_nanovg_unit_t" display="struct _lv_draw_nanovg_unit_t *" /> | pointer to the nanovg unit     |
      | `entry` | <ApiLink name="_lv_cache_entry_t" display="struct _lv_cache_entry_t *" />           | the FBO cache entry to release |
    </ApiMember>

    <ApiMember kind="function" name="lv_nanovg_fbo_cache_entry_to_fb" file="draw/nanovg/lv_nanovg_fbo_cache.h" line="73" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/nanovg/lv_nanovg_fbo_cache.h#L73">
      lv_nanovg_fbo_cache_entry_to_fb [#lv_nanovg_fbo_cache_entry_to_fb]

      Convert a cache entry to a framebuffer.

      ```c title=" " lineNumbers=1
      struct NVGLUframebuffer * lv_nanovg_fbo_cache_entry_to_fb(struct _lv_cache_entry_t *entry)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                                      | Description         |
      | ------- | ------------------------------------------------------------------------- | ------------------- |
      | `entry` | <ApiLink name="_lv_cache_entry_t" display="struct _lv_cache_entry_t *" /> | the FBO cache entry |

      **Returns:** `struct NVGLUframebuffer *` — the framebuffer pointer
    </ApiMember>
  </ApiTab>
</ApiTabs>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;]" transitiveIncludes="[&#x22;lv_conf_kconfig.h&#x22;]" />
