• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoapythonrubywindowsphpgameguibathyscaphec翻訳omegatframework計画中(planning stage)twitterdombtronvb.nettestarduinodirectxpreviewerゲームエンジン

external/gbm_gralloc


Commit MetaInfo

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

Log Message

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

gralloc_gbm: Handle null crop values

Change Summary

Incremental Difference

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