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

Issue 24466004: PPAPI: Make GLES2 calls resilient to bad/dead resources. (Closed)

Created:
7 years, 2 months ago by dmichael (off chromium)
Modified:
7 years, 2 months ago
Reviewers:
teravest, piman
CC:
chromium-reviews, piman+watch_chromium.org, apatrick_chromium
Visibility:
Public.

Description

PPAPI: Make GLES2 calls resilient to bad/dead resources. Currently, if PPB_OpenGLES2 is passed a bad resource, or if a bad resource is set prior to OpenGLES2 calls, our code happily dereferences a NULL pointer. This CL tries to address that by handling failure in a way that's consistent with our other Pepper interfaces. It also appears that the "old" approach to locking would end up locking twice per call. Once to get the PPB_GLES2Impl, then unlocked, and then locked again inside the LockingCommandBuffer (meaning that the PPB_GLES2Impl might not actually be valid at the time we dereference it!!). This change simplifies that and removes the old/hacky way of locking. BUG=275815 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226017

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : re-gen ppb_opengles2_shared.cc #

Total comments: 12

Patch Set 4 : tiny simplification in build_gles2_cmd_buffer.py #

Total comments: 2

Patch Set 5 : teravest@ review comments #

Patch Set 6 : Add AssertAcquiredDebugOnly #

Total comments: 1

Patch Set 7 : Update test #

Patch Set 8 : merge #

Patch Set 9 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+824 lines, -449 lines) Patch
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 3 4 13 chunks +60 lines, -19 lines 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -4 lines 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -6 lines 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.cc View 1 2 3 4 5 6 7 6 chunks +2 lines, -159 lines 0 comments Download
M ppapi/shared_impl/ppb_graphics_3d_shared.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -33 lines 0 comments Download
M ppapi/shared_impl/ppb_graphics_3d_shared.cc View 1 2 3 4 5 6 7 5 chunks +0 lines, -14 lines 0 comments Download
M ppapi/shared_impl/ppb_opengles2_shared.cc View 1 2 3 1 chunk +722 lines, -205 lines 0 comments Download
M ppapi/shared_impl/ppb_video_decoder_shared.cc View 1 chunk +1 line, -9 lines 0 comments Download
M ppapi/shared_impl/proxy_lock.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M ppapi/tests/test_graphics_3d.h View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/tests/test_graphics_3d.cc View 1 2 3 4 5 6 2 chunks +30 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
dmichael (off chromium)
Antoine: Please focus on gpu/OpenGLES stuff. Justin: Please focus on Pepper stuff. https://codereview.chromium.org/24466004/diff/5001/gpu/command_buffer/build_gles2_cmd_buffer.py File gpu/command_buffer/build_gles2_cmd_buffer.py ...
7 years, 2 months ago (2013-09-25 20:05:13 UTC) #1
piman
https://codereview.chromium.org/24466004/diff/11001/gpu/command_buffer/build_gles2_cmd_buffer.py File gpu/command_buffer/build_gles2_cmd_buffer.py (right): https://codereview.chromium.org/24466004/diff/11001/gpu/command_buffer/build_gles2_cmd_buffer.py#newcode1957 gpu/command_buffer/build_gles2_cmd_buffer.py:1957: 'shader, count, const_cast<const char* const*>(str), length' Ah, sigh. A ...
7 years, 2 months ago (2013-09-25 22:23:54 UTC) #2
dmichael (off chromium)
https://codereview.chromium.org/24466004/diff/11001/gpu/command_buffer/build_gles2_cmd_buffer.py File gpu/command_buffer/build_gles2_cmd_buffer.py (right): https://codereview.chromium.org/24466004/diff/11001/gpu/command_buffer/build_gles2_cmd_buffer.py#newcode1957 gpu/command_buffer/build_gles2_cmd_buffer.py:1957: 'shader, count, const_cast<const char* const*>(str), length' On 2013/09/25 22:23:55, ...
7 years, 2 months ago (2013-09-26 19:26:33 UTC) #3
teravest
It would be nice if there was a debug version of ProxyLock::AssertAcquired that you could ...
7 years, 2 months ago (2013-09-26 19:42:59 UTC) #4
piman
On 2013/09/26 19:26:33, dmichael wrote: > https://codereview.chromium.org/24466004/diff/11001/gpu/command_buffer/build_gles2_cmd_buffer.py > File gpu/command_buffer/build_gles2_cmd_buffer.py (right): > > https://codereview.chromium.org/24466004/diff/11001/gpu/command_buffer/build_gles2_cmd_buffer.py#newcode1957 > ...
7 years, 2 months ago (2013-09-26 20:02:26 UTC) #5
dmichael (off chromium)
https://codereview.chromium.org/24466004/diff/48001/gpu/command_buffer/build_gles2_cmd_buffer.py File gpu/command_buffer/build_gles2_cmd_buffer.py (right): https://codereview.chromium.org/24466004/diff/48001/gpu/command_buffer/build_gles2_cmd_buffer.py#newcode1219 gpu/command_buffer/build_gles2_cmd_buffer.py:1219: # pepper_args_to_pass: A string representing the parameters to pass ...
7 years, 2 months ago (2013-09-26 22:26:38 UTC) #6
teravest
lgtm On Thu, Sep 26, 2013 at 4:26 PM, <dmichael@chromium.org> wrote: > > https://codereview.chromium.org/24466004/diff/48001/gpu/command_buffer/build_gles2_cmd_buffer.py > ...
7 years, 2 months ago (2013-09-26 23:31:14 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmichael@chromium.org/24466004/77001
7 years, 2 months ago (2013-09-27 16:18:23 UTC) #8
commit-bot: I haz the power
Failed to apply patch for ppapi/proxy/ppb_graphics_3d_proxy.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 2 months ago (2013-09-27 16:18:27 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmichael@chromium.org/24466004/81001
7 years, 2 months ago (2013-09-27 16:52:11 UTC) #10
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=82475
7 years, 2 months ago (2013-09-27 20:33:17 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmichael@chromium.org/24466004/77002
7 years, 2 months ago (2013-09-27 21:35:10 UTC) #12
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) content_browsertests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=82775
7 years, 2 months ago (2013-09-28 01:50:59 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmichael@chromium.org/24466004/77002
7 years, 2 months ago (2013-09-30 16:29:58 UTC) #14
commit-bot: I haz the power
7 years, 2 months ago (2013-09-30 18:36:04 UTC) #15
Message was sent while issue was closed.
Change committed as 226017

Powered by Google App Engine
This is Rietveld 408576698