Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1024)

Issue 547733002: [Pepper GL] Use shared state to fix a memory leak in MapSub GL extension. (Closed)

Created:
6 years, 3 months ago by Peng
Modified:
6 years, 3 months ago
CC:
chromium-reviews, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

When use the Pepper MapTexSubImage2DCHROMIUM() and the Compositor API together, it may cause memory leak, and then run out of memory. The problem is because the Compositor API uses sync point to sync texture producer and the Chrome compositor, it does not need any IPC, so the PpapiCommandBufferProxy::last_state_[1] will not get updated, so the client does not known when the GPU process finishes accessing the memory, and then the memory can not be reused forever. This change add a shared state in PpapiCommandBufferProxy. It allows PpapiCommandBufferProxy updating state from a shared memory without an IPC. It fix this issue. BUG=411004 Committed: https://crrev.com/a206fb49cc1af7e022fd5d3028271323b00f3c6d Cr-Commit-Position: refs/heads/master@{#294012}

Patch Set 1 #

Patch Set 2 : WIP #

Patch Set 3 : Update #

Patch Set 4 : Update #

Patch Set 5 : Update #

Total comments: 2

Patch Set 6 : Fix review issue #

Patch Set 7 : Fix compile errors in mojo #

Patch Set 8 : Remve base/memory/shared_memory.h from DEPS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -70 lines) Patch
M content/common/gpu/client/command_buffer_proxy_impl.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.h View 3 chunks +9 lines, -4 lines 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.cc View 5 chunks +13 lines, -7 lines 0 comments Download
M content/renderer/pepper/resource_creation_impl.h View 1 2 3 4 1 chunk +5 lines, -3 lines 0 comments Download
M content/renderer/pepper/resource_creation_impl.cc View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M mojo/examples/pepper_container_app/resource_creation_impl.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M mojo/examples/pepper_container_app/resource_creation_impl.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M ppapi/proxy/nacl_message_scanner.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.h View 1 2 3 4 3 chunks +12 lines, -1 line 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.cc View 1 2 3 4 4 chunks +48 lines, -27 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 3 1 chunk +3 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.h View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.cc View 1 2 3 4 5 7 chunks +27 lines, -15 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M ppapi/proxy/resource_creation_proxy.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M ppapi/thunk/resource_creation_api.h View 1 2 3 4 2 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 20 (7 generated)
piman
Awesome, LGTM. Adding security person for ppapi_messages.h https://codereview.chromium.org/547733002/diff/80001/ppapi/proxy/ppb_graphics_3d_proxy.cc File ppapi/proxy/ppb_graphics_3d_proxy.cc (right): https://codereview.chromium.org/547733002/diff/80001/ppapi/proxy/ppb_graphics_3d_proxy.cc#newcode173 ppapi/proxy/ppb_graphics_3d_proxy.cc:173: // ppapi::proxy::SerializedHandle::SHARED_MEMORY); ...
6 years, 3 months ago (2014-09-08 21:02:04 UTC) #3
Peng
On 2014/09/08 21:02:04, piman (Very slow to review) wrote: > Awesome, LGTM. Adding security person ...
6 years, 3 months ago (2014-09-08 21:10:35 UTC) #6
Peng
https://codereview.chromium.org/547733002/diff/80001/ppapi/proxy/ppb_graphics_3d_proxy.cc File ppapi/proxy/ppb_graphics_3d_proxy.cc (right): https://codereview.chromium.org/547733002/diff/80001/ppapi/proxy/ppb_graphics_3d_proxy.cc#newcode173 ppapi/proxy/ppb_graphics_3d_proxy.cc:173: // ppapi::proxy::SerializedHandle::SHARED_MEMORY); On 2014/09/08 21:02:04, piman (Very slow to ...
6 years, 3 months ago (2014-09-08 21:12:23 UTC) #7
Tom Sepez
Messages LGTM
6 years, 3 months ago (2014-09-08 21:16:39 UTC) #8
dmichael (off chromium)
pepper OWNER lgtm
6 years, 3 months ago (2014-09-08 22:56:04 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/penghuang@chromium.org/547733002/120001
6 years, 3 months ago (2014-09-08 23:02:02 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/9529)
6 years, 3 months ago (2014-09-09 02:36:43 UTC) #13
Peng
On 2014/09/09 02:36:43, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 3 months ago (2014-09-09 03:36:17 UTC) #14
brettw
I don't understand why you made the change in the deps file. Were you seeing ...
6 years, 3 months ago (2014-09-09 17:31:12 UTC) #15
Peng
On 2014/09/09 17:31:12, brettw wrote: > I don't understand why you made the change in ...
6 years, 3 months ago (2014-09-09 18:17:50 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/penghuang@chromium.org/547733002/140001
6 years, 3 months ago (2014-09-09 18:21:18 UTC) #18
commit-bot: I haz the power
Committed patchset #8 (id:140001) as b48187dc25fed1a79b5cb6b0bb55dafe4d5a0237
6 years, 3 months ago (2014-09-09 21:28:52 UTC) #19
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:55:45 UTC) #20
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/a206fb49cc1af7e022fd5d3028271323b00f3c6d
Cr-Commit-Position: refs/heads/master@{#294012}

Powered by Google App Engine
This is Rietveld 408576698