You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/11/03 16:56:15 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2208: lcd: add optional putarea()/getarea() operations

xiaoxiang781216 commented on a change in pull request #2208:
URL: https://github.com/apache/incubator-nuttx/pull/2208#discussion_r516816640



##########
File path: drivers/lcd/lcd_dev.c
##########
@@ -123,20 +123,56 @@ static int lcddev_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
     {
     case LCDDEVIO_GETRUN:
       {
-        FAR struct lcddev_run_s *lcd_putrun =
+        FAR struct lcddev_run_s *lcd_run =
             (FAR struct lcddev_run_s *)arg;
 
-        ret = priv->planeinfo.getrun(lcd_putrun->row, lcd_putrun->col,
-                                     lcd_putrun->data, lcd_putrun->npixels);
+        ret = priv->planeinfo.getrun(lcd_run->row, lcd_run->col,
+                                     lcd_run->data, lcd_run->npixels);
       }
       break;
     case LCDDEVIO_PUTRUN:
       {
-        const FAR struct lcddev_run_s *lcd_putrun =
+        const FAR struct lcddev_run_s *lcd_run =
             (const FAR struct lcddev_run_s *)arg;
 
-        ret = priv->planeinfo.putrun(lcd_putrun->row, lcd_putrun->col,
-                                     lcd_putrun->data, lcd_putrun->npixels);
+        ret = priv->planeinfo.putrun(lcd_run->row, lcd_run->col,
+                                     lcd_run->data, lcd_run->npixels);
+      }
+      break;
+    case LCDDEVIO_PUTAREA:
+      {
+        const FAR struct lcddev_area_s *lcd_area =
+            (const FAR struct lcddev_area_s *)arg;
+
+        if (priv->planeinfo.putarea)
+          {
+            ret = priv->planeinfo.putarea(lcd_area->row_start,

Review comment:
       It depend on how the GUI library implement. framebuffer may fast than putrun/putarea for the advantage animation or a alpha blending. Yes, framebuffer consume more memory, but some project more care about the visual experience than resource. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org