Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-gbm_gralloc: コミット

external/gbm_gralloc


コミットメタ情報

リビジョン709726cad68d89f468e8bbf359ac004ed28d842f (tree)
日時2020-03-03 22:51:41
作者Rob Herring <robh@kern...>
コミッターGitHub

ログメッセージ

Merge pull request #14 from johnstultz-work/null-crop-fix

gralloc_gbm: Handle null crop values

変更サマリ

差分

--- a/gralloc_gbm.cpp
+++ b/gralloc_gbm.cpp
@@ -428,6 +428,15 @@ int gralloc_gbm_bo_lock(buffer_handle_t handle,
428428
429429 usage |= bo_data->locked_for;
430430
431+ /*
432+ * Some users will lock with an null crop rect.
433+ * Interpret this as no-crop (full buffer WxH).
434+ */
435+ if (w == 0 && h == 0) {
436+ w = gbm_handle->width;
437+ h = gbm_handle->height;
438+ }
439+
431440 if (usage & (GRALLOC_USAGE_SW_WRITE_MASK |
432441 GRALLOC_USAGE_SW_READ_MASK)) {
433442 /* the driver is supposed to wait for the bo */
旧リポジトリブラウザで表示