{"action":"created","comment":{"url":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/comments/190450350","pull_request_review_id":122827829,"id":190450350,"diff_hunk":"@@ -195,97 +195,97 @@ bool NestedDisplay::Present(std::vector<HwcLayer *> &source_layers,\n   HWC_UNUSED(source_layers);\n   return true;\n #else\n-  int ret = 0;\n-  size_t size = source_layers.size();\n-  const uint32_t *pitches;\n-  const uint32_t *offsets;\n-  HWCNativeHandle sf_handle;\n-  size_t buffer_number = 0;\n-  size_t info_size = sizeof(vm_buffer_info);\n-  size_t header_size = sizeof(vm_header);\n-\n-  for (size_t layer_index = 0; layer_index < size; layer_index++) {\n-    uint32_t surf_index = 0;\n-    HwcLayer *layer = source_layers.at(layer_index);\n-    if (!layer->IsVisible())\n-      continue;\n-\n-    const HwcRect<int> &display_frame = layer->GetDisplayFrame();\n-    sf_handle = layer->GetNativeHandle();\n-    auto search = mHyperDmaExportedBuffers.find(sf_handle);\n-    if (search == mHyperDmaExportedBuffers.end()) {\n-      std::shared_ptr<OverlayBuffer> buffer(NULL);\n-      buffer = OverlayBuffer::CreateOverlayBuffer();\n-      buffer->InitializeFromNativeHandle(sf_handle, resource_manager_.get());\n-\n-      if (mHyperDmaBuf_Fd > 0 && buffer->GetPrimeFD() > 0) {\n-        struct ioctl_hyper_dmabuf_export_remote msg;\n-        memset(&msg, 0, sizeof(ioctl_hyper_dmabuf_export_remote));\n-\n-        /* TODO: add more flexibility here, instead of hardcoded domain 0*/\n-        msg.remote_domain = 0;\n-        msg.dmabuf_fd = buffer->GetPrimeFD();\n-\n-        ret = ioctl(mHyperDmaBuf_Fd, IOCTL_HYPER_DMABUF_EXPORT_REMOTE, &msg);\n-        if (ret) {\n-          ETRACE(\"Hyper DmaBuf: Exporting hyper_dmabuf failed with error %d\\n\",\n-                 ret);\n-          return false;\n-        } else {\n-          ETRACE(\"Hyper DmaBuf: Exporting hyper_dmabuf Done! 0x%x\\n\",\n-                 msg.hid.id);\n-          mHyperDmaExportedBuffers[sf_handle].surf_index = surf_index++;\n-          mHyperDmaExportedBuffers[sf_handle].width = buffer->GetWidth();\n-          mHyperDmaExportedBuffers[sf_handle].height = buffer->GetHeight();\n-          mHyperDmaExportedBuffers[sf_handle].format = buffer->GetFormat();\n-          pitches = buffer->GetPitches();\n-          offsets = buffer->GetOffsets();\n-          mHyperDmaExportedBuffers[sf_handle].pitch[0] = pitches[0];\n-          mHyperDmaExportedBuffers[sf_handle].pitch[1] = pitches[1];\n-          mHyperDmaExportedBuffers[sf_handle].pitch[2] = pitches[2];\n-          mHyperDmaExportedBuffers[sf_handle].offset[0] = offsets[0];\n-          mHyperDmaExportedBuffers[sf_handle].offset[1] = offsets[1];\n-          mHyperDmaExportedBuffers[sf_handle].offset[2] = offsets[2];\n-          mHyperDmaExportedBuffers[sf_handle].tile_format =\n-              buffer->GetTilingMode();\n-          mHyperDmaExportedBuffers[sf_handle].rotation = 0;\n-          mHyperDmaExportedBuffers[sf_handle].status = 0;\n-          mHyperDmaExportedBuffers[sf_handle].counter = 0;\n-          mHyperDmaExportedBuffers[sf_handle].hyper_dmabuf_id = msg.hid;\n-          mHyperDmaExportedBuffers[sf_handle].surface_id = (uint64_t)sf_handle;\n-          strncpy(mHyperDmaExportedBuffers[sf_handle].surface_name, \"Cluster\",\n-                  SURFACE_NAME_LENGTH);\n-          mHyperDmaExportedBuffers[sf_handle].bbox[0] = display_frame.left;\n-          mHyperDmaExportedBuffers[sf_handle].bbox[1] = display_frame.top;\n-          mHyperDmaExportedBuffers[sf_handle].bbox[2] = buffer->GetWidth();\n-          mHyperDmaExportedBuffers[sf_handle].bbox[3] = buffer->GetHeight();\n+  if (mconnected) {","path":"common/core/nesteddisplay.cpp","position":104,"original_position":104,"commit_id":"a393bc76737fc67367bced0158cc55a7d0a56e6f","original_commit_id":"a393bc76737fc67367bced0158cc55a7d0a56e6f","user":{"login":"kalyankondapally","id":975889,"avatar_url":"https://avatars3.githubusercontent.com/u/975889?v=4","gravatar_id":"","url":"https://api.github.com/users/kalyankondapally","html_url":"https://github.com/kalyankondapally","followers_url":"https://api.github.com/users/kalyankondapally/followers","following_url":"https://api.github.com/users/kalyankondapally/following{/other_user}","gists_url":"https://api.github.com/users/kalyankondapally/gists{/gist_id}","starred_url":"https://api.github.com/users/kalyankondapally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalyankondapally/subscriptions","organizations_url":"https://api.github.com/users/kalyankondapally/orgs","repos_url":"https://api.github.com/users/kalyankondapally/repos","events_url":"https://api.github.com/users/kalyankondapally/events{/privacy}","received_events_url":"https://api.github.com/users/kalyankondapally/received_events","type":"User","site_admin":false},"body":"just do an early return here ? indentation needs to be fixed.","created_at":"2018-05-24T02:28:32Z","updated_at":"2018-05-24T02:28:33Z","html_url":"https://github.com/intel/IA-Hardware-Composer/pull/380#discussion_r190450350","pull_request_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/380","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/comments/190450350"},"html":{"href":"https://github.com/intel/IA-Hardware-Composer/pull/380#discussion_r190450350"},"pull_request":{"href":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/380"}}},"pull_request":{"url":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/380","id":190150736,"html_url":"https://github.com/intel/IA-Hardware-Composer/pull/380","diff_url":"https://github.com/intel/IA-Hardware-Composer/pull/380.diff","patch_url":"https://github.com/intel/IA-Hardware-Composer/pull/380.patch","issue_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/issues/380","number":380,"state":"open","locked":false,"title":"Don't compose Nesteddisplay surface while no SOS side connection","user":{"login":"yugang","id":1248665,"avatar_url":"https://avatars0.githubusercontent.com/u/1248665?v=4","gravatar_id":"","url":"https://api.github.com/users/yugang","html_url":"https://github.com/yugang","followers_url":"https://api.github.com/users/yugang/followers","following_url":"https://api.github.com/users/yugang/following{/other_user}","gists_url":"https://api.github.com/users/yugang/gists{/gist_id}","starred_url":"https://api.github.com/users/yugang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugang/subscriptions","organizations_url":"https://api.github.com/users/yugang/orgs","repos_url":"https://api.github.com/users/yugang/repos","events_url":"https://api.github.com/users/yugang/events{/privacy}","received_events_url":"https://api.github.com/users/yugang/received_events","type":"User","site_admin":false},"body":"submit the this patch for yifei from Randy's team\r\n\r\nNesteddisplay leverage SurfaceFlinger do composition, skip it while no\r\nSOS side buffer sharing request to optimize GPU consumption.\r\n\r\nChange-Id: I40d5ba07c45af9c4e2a0b58090cbb36641b311b0\r\nJira: None\r\nTest: Tested on android\r\nSigned-off-by: xue.yifei <yifei.xue@intel.com>","created_at":"2018-05-24T02:05:56Z","updated_at":"2018-05-24T02:28:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5089e84502149aeadfe6820a53f065f2f8f44cd5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/380/commits","review_comments_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/380/comments","review_comment_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/issues/380/comments","statuses_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/statuses/a393bc76737fc67367bced0158cc55a7d0a56e6f","head":{"label":"yugang:yifei_branch","ref":"yifei_branch","sha":"a393bc76737fc67367bced0158cc55a7d0a56e6f","user":{"login":"yugang","id":1248665,"avatar_url":"https://avatars0.githubusercontent.com/u/1248665?v=4","gravatar_id":"","url":"https://api.github.com/users/yugang","html_url":"https://github.com/yugang","followers_url":"https://api.github.com/users/yugang/followers","following_url":"https://api.github.com/users/yugang/following{/other_user}","gists_url":"https://api.github.com/users/yugang/gists{/gist_id}","starred_url":"https://api.github.com/users/yugang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugang/subscriptions","organizations_url":"https://api.github.com/users/yugang/orgs","repos_url":"https://api.github.com/users/yugang/repos","events_url":"https://api.github.com/users/yugang/events{/privacy}","received_events_url":"https://api.github.com/users/yugang/received_events","type":"User","site_admin":false},"repo":{"id":82504917,"name":"IA-Hardware-Composer","full_name":"yugang/IA-Hardware-Composer","owner":{"login":"yugang","id":1248665,"avatar_url":"https://avatars0.githubusercontent.com/u/1248665?v=4","gravatar_id":"","url":"https://api.github.com/users/yugang","html_url":"https://github.com/yugang","followers_url":"https://api.github.com/users/yugang/followers","following_url":"https://api.github.com/users/yugang/following{/other_user}","gists_url":"https://api.github.com/users/yugang/gists{/gist_id}","starred_url":"https://api.github.com/users/yugang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugang/subscriptions","organizations_url":"https://api.github.com/users/yugang/orgs","repos_url":"https://api.github.com/users/yugang/repos","events_url":"https://api.github.com/users/yugang/events{/privacy}","received_events_url":"https://api.github.com/users/yugang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yugang/IA-Hardware-Composer","description":null,"fork":true,"url":"https://api.github.com/repos/yugang/IA-Hardware-Composer","forks_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/forks","keys_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/teams","hooks_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/hooks","issue_events_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/issues/events{/number}","events_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/events","assignees_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/assignees{/user}","branches_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/branches{/branch}","tags_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/tags","blobs_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/git/refs{/sha}","trees_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/statuses/{sha}","languages_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/languages","stargazers_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/stargazers","contributors_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/contributors","subscribers_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/subscribers","subscription_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/subscription","commits_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/commits{/sha}","git_commits_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/git/commits{/sha}","comments_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/comments{/number}","issue_comment_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/issues/comments{/number}","contents_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/contents/{+path}","compare_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/merges","archive_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/downloads","issues_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/issues{/number}","pulls_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/pulls{/number}","milestones_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/milestones{/number}","notifications_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/labels{/name}","releases_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/releases{/id}","deployments_url":"https://api.github.com/repos/yugang/IA-Hardware-Composer/deployments","created_at":"2017-02-20T01:44:38Z","updated_at":"2018-05-24T02:01:48Z","pushed_at":"2018-05-24T02:04:59Z","git_url":"git://github.com/yugang/IA-Hardware-Composer.git","ssh_url":"git@github.com:yugang/IA-Hardware-Composer.git","clone_url":"https://github.com/yugang/IA-Hardware-Composer.git","svn_url":"https://github.com/yugang/IA-Hardware-Composer","homepage":null,"size":65702,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"intel:master","ref":"master","sha":"84f405037f886e709db1425669e3965d375d56a1","user":{"login":"intel","id":17888862,"avatar_url":"https://avatars3.githubusercontent.com/u/17888862?v=4","gravatar_id":"","url":"https://api.github.com/users/intel","html_url":"https://github.com/intel","followers_url":"https://api.github.com/users/intel/followers","following_url":"https://api.github.com/users/intel/following{/other_user}","gists_url":"https://api.github.com/users/intel/gists{/gist_id}","starred_url":"https://api.github.com/users/intel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel/subscriptions","organizations_url":"https://api.github.com/users/intel/orgs","repos_url":"https://api.github.com/users/intel/repos","events_url":"https://api.github.com/users/intel/events{/privacy}","received_events_url":"https://api.github.com/users/intel/received_events","type":"Organization","site_admin":false},"repo":{"id":81935252,"name":"IA-Hardware-Composer","full_name":"intel/IA-Hardware-Composer","owner":{"login":"intel","id":17888862,"avatar_url":"https://avatars3.githubusercontent.com/u/17888862?v=4","gravatar_id":"","url":"https://api.github.com/users/intel","html_url":"https://github.com/intel","followers_url":"https://api.github.com/users/intel/followers","following_url":"https://api.github.com/users/intel/following{/other_user}","gists_url":"https://api.github.com/users/intel/gists{/gist_id}","starred_url":"https://api.github.com/users/intel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel/subscriptions","organizations_url":"https://api.github.com/users/intel/orgs","repos_url":"https://api.github.com/users/intel/repos","events_url":"https://api.github.com/users/intel/events{/privacy}","received_events_url":"https://api.github.com/users/intel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/intel/IA-Hardware-Composer","description":null,"fork":false,"url":"https://api.github.com/repos/intel/IA-Hardware-Composer","forks_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/forks","keys_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/teams","hooks_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/hooks","issue_events_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/issues/events{/number}","events_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/events","assignees_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/assignees{/user}","branches_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/branches{/branch}","tags_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/tags","blobs_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/git/refs{/sha}","trees_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/statuses/{sha}","languages_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/languages","stargazers_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/stargazers","contributors_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/contributors","subscribers_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/subscribers","subscription_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/subscription","commits_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/commits{/sha}","git_commits_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/git/commits{/sha}","comments_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/comments{/number}","issue_comment_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/issues/comments{/number}","contents_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/contents/{+path}","compare_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/merges","archive_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/downloads","issues_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/issues{/number}","pulls_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls{/number}","milestones_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/milestones{/number}","notifications_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/labels{/name}","releases_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/releases{/id}","deployments_url":"https://api.github.com/repos/intel/IA-Hardware-Composer/deployments","created_at":"2017-02-14T10:45:35Z","updated_at":"2018-05-24T01:11:21Z","pushed_at":"2018-05-24T02:05:57Z","git_url":"git://github.com/intel/IA-Hardware-Composer.git","ssh_url":"git@github.com:intel/IA-Hardware-Composer.git","clone_url":"https://github.com/intel/IA-Hardware-Composer.git","svn_url":"https://github.com/intel/IA-Hardware-Composer","homepage":null,"size":33707,"stargazers_count":17,"watchers_count":17,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"archived":false,"open_issues_count":16,"license":null,"forks":59,"open_issues":16,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/380"},"html":{"href":"https://github.com/intel/IA-Hardware-Composer/pull/380"},"issue":{"href":"https://api.github.com/repos/intel/IA-Hardware-Composer/issues/380"},"comments":{"href":"https://api.github.com/repos/intel/IA-Hardware-Composer/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/380/comments"},"review_comment":{"href":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/intel/IA-Hardware-Composer/pulls/380/commits"},"statuses":{"href":"https://api.github.com/repos/intel/IA-Hardware-Composer/statuses/a393bc76737fc67367bced0158cc55a7d0a56e6f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kalyankondapally"}}