• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

external/gbm_gralloc


Commit MetaInfo

Revision709726cad68d89f468e8bbf359ac004ed28d842f (tree)
Zeit2020-03-03 22:51:41
AutorRob Herring <robh@kern...>
CommiterGitHub

Log Message

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

gralloc_gbm: Handle null crop values

Ändern Zusammenfassung

Diff

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