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 17:00:15 UTC

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

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



##########
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:
       But the LCD framebuffer driver simply emulates a framebuffer over LCD operations. In fact, with the putarea() interface, you can achieve the same behavior as the LCD framebuffer has now, which blits the entire buffer using putrun() for each call. So, you can get the same results by just doing putarea() over the whole display whenever you want.




----------------------------------------------------------------
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