<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic NXP LVGL 0.1 sized draw buffers in i.MX Graphics</title>
    <link>https://community.nxp.com/t5/i-MX-Graphics/NXP-LVGL-0-1-sized-draw-buffers/m-p/2167995#M936</link>
    <description>&lt;P&gt;Has anyone been able to figure out what code needs to be modified in 'lvgl_support.c' to be able to have LVGL draw buffers be 1/10th the size of the screen as described below:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Draw buffer(s) are simple array(s) that LVGL uses to render the screen content. Once rendering is ready the content of the draw buffer is sent to the display using the&amp;nbsp;&lt;SPAN class=""&gt;flush_cb&amp;nbsp;&lt;/SPAN&gt;function set in the display driver (see below).&lt;/P&gt;&lt;P&gt;A draw buffer can be initialized via a&amp;nbsp;&lt;SPAN class=""&gt;lv_disp_draw_buf_t&amp;nbsp;&lt;/SPAN&gt;variable like this:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;/*A static or global variable to store the buffers*/&lt;/SPAN&gt;
&lt;SPAN class=""&gt;static&lt;/SPAN&gt; &lt;SPAN class=""&gt;lv_disp_draw_buf_t&lt;/SPAN&gt; &lt;SPAN class=""&gt;disp_buf&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;

&lt;SPAN class=""&gt;/*Static or global buffer(s). The second buffer is optional*/&lt;/SPAN&gt;
&lt;SPAN class=""&gt;static&lt;/SPAN&gt; &lt;SPAN class=""&gt;lv_color_t&lt;/SPAN&gt; &lt;SPAN class=""&gt;buf_1&lt;/SPAN&gt;&lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;MY_DISP_HOR_RES&lt;/SPAN&gt; &lt;SPAN class=""&gt;*&lt;/SPAN&gt; &lt;SPAN class=""&gt;10&lt;/SPAN&gt;&lt;SPAN class=""&gt;];&lt;/SPAN&gt;
&lt;SPAN class=""&gt;static&lt;/SPAN&gt; &lt;SPAN class=""&gt;lv_color_t&lt;/SPAN&gt; &lt;SPAN class=""&gt;buf_2&lt;/SPAN&gt;&lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;MY_DISP_HOR_RES&lt;/SPAN&gt; &lt;SPAN class=""&gt;*&lt;/SPAN&gt; &lt;SPAN class=""&gt;10&lt;/SPAN&gt;&lt;SPAN class=""&gt;];&lt;/SPAN&gt;

&lt;SPAN class=""&gt;/*Initialize `disp_buf` with the buffer(s). With only one buffer use NULL instead buf_2 */&lt;/SPAN&gt;
&lt;SPAN class=""&gt;lv_disp_draw_buf_init&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;disp_buf&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;buf_1&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;buf_2&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;MY_DISP_HOR_RES&lt;/SPAN&gt;&lt;SPAN class=""&gt;*&lt;/SPAN&gt;&lt;SPAN class=""&gt;10&lt;/SPAN&gt;&lt;SPAN class=""&gt;);&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Note that&amp;nbsp;&lt;SPAN class=""&gt;lv_disp_draw_buf_t&amp;nbsp;&lt;/SPAN&gt;must be a static, global or dynamically allocated variable. It cannot be a local variable as they are destroyed upon end of scope.&lt;/P&gt;&lt;P&gt;As you can see above, the draw buffer may be smaller than the screen. In this case, larger areas are redrawn in smaller segments that fit into the draw buffer(s). If only a small area changes (e.g. a button is pressed) then only that area will be refreshed.&lt;/P&gt;&lt;P&gt;A larger buffer results in better performance but above 1/10 screen sized buffer(s) there is no significant performance improvement. Therefore it's recommended to choose the size of the draw buffer(s) to be at least 1/10 screen sized.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The 'lvgl_support.c' file can be found from the SDK_2.x_MIMXRT1170-EVK version 2.16.000, any of the lvgl_examples.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Sep 2025 17:08:00 GMT</pubDate>
    <dc:creator>CMoran</dc:creator>
    <dc:date>2025-09-11T17:08:00Z</dc:date>
    <item>
      <title>NXP LVGL 0.1 sized draw buffers</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/NXP-LVGL-0-1-sized-draw-buffers/m-p/2167995#M936</link>
      <description>&lt;P&gt;Has anyone been able to figure out what code needs to be modified in 'lvgl_support.c' to be able to have LVGL draw buffers be 1/10th the size of the screen as described below:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Draw buffer(s) are simple array(s) that LVGL uses to render the screen content. Once rendering is ready the content of the draw buffer is sent to the display using the&amp;nbsp;&lt;SPAN class=""&gt;flush_cb&amp;nbsp;&lt;/SPAN&gt;function set in the display driver (see below).&lt;/P&gt;&lt;P&gt;A draw buffer can be initialized via a&amp;nbsp;&lt;SPAN class=""&gt;lv_disp_draw_buf_t&amp;nbsp;&lt;/SPAN&gt;variable like this:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;/*A static or global variable to store the buffers*/&lt;/SPAN&gt;
&lt;SPAN class=""&gt;static&lt;/SPAN&gt; &lt;SPAN class=""&gt;lv_disp_draw_buf_t&lt;/SPAN&gt; &lt;SPAN class=""&gt;disp_buf&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;

&lt;SPAN class=""&gt;/*Static or global buffer(s). The second buffer is optional*/&lt;/SPAN&gt;
&lt;SPAN class=""&gt;static&lt;/SPAN&gt; &lt;SPAN class=""&gt;lv_color_t&lt;/SPAN&gt; &lt;SPAN class=""&gt;buf_1&lt;/SPAN&gt;&lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;MY_DISP_HOR_RES&lt;/SPAN&gt; &lt;SPAN class=""&gt;*&lt;/SPAN&gt; &lt;SPAN class=""&gt;10&lt;/SPAN&gt;&lt;SPAN class=""&gt;];&lt;/SPAN&gt;
&lt;SPAN class=""&gt;static&lt;/SPAN&gt; &lt;SPAN class=""&gt;lv_color_t&lt;/SPAN&gt; &lt;SPAN class=""&gt;buf_2&lt;/SPAN&gt;&lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;MY_DISP_HOR_RES&lt;/SPAN&gt; &lt;SPAN class=""&gt;*&lt;/SPAN&gt; &lt;SPAN class=""&gt;10&lt;/SPAN&gt;&lt;SPAN class=""&gt;];&lt;/SPAN&gt;

&lt;SPAN class=""&gt;/*Initialize `disp_buf` with the buffer(s). With only one buffer use NULL instead buf_2 */&lt;/SPAN&gt;
&lt;SPAN class=""&gt;lv_disp_draw_buf_init&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;disp_buf&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;buf_1&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;buf_2&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;MY_DISP_HOR_RES&lt;/SPAN&gt;&lt;SPAN class=""&gt;*&lt;/SPAN&gt;&lt;SPAN class=""&gt;10&lt;/SPAN&gt;&lt;SPAN class=""&gt;);&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Note that&amp;nbsp;&lt;SPAN class=""&gt;lv_disp_draw_buf_t&amp;nbsp;&lt;/SPAN&gt;must be a static, global or dynamically allocated variable. It cannot be a local variable as they are destroyed upon end of scope.&lt;/P&gt;&lt;P&gt;As you can see above, the draw buffer may be smaller than the screen. In this case, larger areas are redrawn in smaller segments that fit into the draw buffer(s). If only a small area changes (e.g. a button is pressed) then only that area will be refreshed.&lt;/P&gt;&lt;P&gt;A larger buffer results in better performance but above 1/10 screen sized buffer(s) there is no significant performance improvement. Therefore it's recommended to choose the size of the draw buffer(s) to be at least 1/10 screen sized.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The 'lvgl_support.c' file can be found from the SDK_2.x_MIMXRT1170-EVK version 2.16.000, any of the lvgl_examples.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 17:08:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/NXP-LVGL-0-1-sized-draw-buffers/m-p/2167995#M936</guid>
      <dc:creator>CMoran</dc:creator>
      <dc:date>2025-09-11T17:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: NXP LVGL 0.1 sized draw buffers</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/NXP-LVGL-0-1-sized-draw-buffers/m-p/2168630#M937</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/193765"&gt;@CMoran&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your interest in NXP MIMXRT series!&lt;/P&gt;
&lt;P&gt;The SDK for the RT series MCUs uses full-size frame buffers for flush operations. For your application scenario, you can refer to examples in the MCX series SDK, such as MCXN947. It utilizes a virtual buffer size and the LV_DISPLAY_RENDER_MODE_PARTIAL mode.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;BR /&gt;Gavin&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 06:08:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/NXP-LVGL-0-1-sized-draw-buffers/m-p/2168630#M937</guid>
      <dc:creator>Gavin_Jia</dc:creator>
      <dc:date>2025-09-12T06:08:56Z</dc:date>
    </item>
  </channel>
</rss>

