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

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed)

Created:
5 years ago by Łukasz Anforowicz
Modified:
4 years, 10 months ago
CC:
asanka, chromium-reviews, danakj, darin-cc_chromium.org, jam, piman+watch_chromium.org, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. This CL generalizes the pattern used by content::SavePackageId and cc::SurfaceId and puts it into //base/id_type.h. Using this pattern for gpu::CommandBufferId should hopefully help avoid bugs like the mixup fixed by https://crrev.com/365437. BUG=514815, 565545 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=wolenetz@chromium.org, sky@chromium.org Committed: https://crrev.com/2573ce7d143bee9c1f88dac18b9213c03597daae Cr-Commit-Position: refs/heads/master@{#375620}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : Moved base/id_type... into gpu/command_buffer/common/id_type.… #

Total comments: 6

Patch Set 5 : Introducing a separate gpu/ipc/id_type_traits.h header. #

Total comments: 2

Patch Set 6 : Need to change from "namespace base" to "namespace gpu" in one more place. #

Patch Set 7 : Rebasing (i.e. had to add GetSize to IPC traits). #

Total comments: 12

Patch Set 8 : Addressed CR feedback from Daniel. #

Total comments: 2

Patch Set 9 : Rebasing... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+349 lines, -511 lines) Patch
M cc/layers/texture_layer_unittest.cc View 1 2 chunks +10 lines, -3 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M cc/resources/resource_provider_unittest.cc View 1 5 chunks +10 lines, -5 lines 0 comments Download
M cc/resources/video_resource_updater_unittest.cc View 1 2 3 4 5 6 2 chunks +6 lines, -4 lines 0 comments Download
M cc/test/render_pass_test_utils.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M cc/test/test_web_graphics_context_3d.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_perftest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M components/mus/gles2/command_buffer_driver.h View 1 4 chunks +5 lines, -4 lines 0 comments Download
M components/mus/gles2/command_buffer_driver.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M components/mus/gles2/command_buffer_impl.cc View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M components/mus/gles2/command_buffer_local.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M components/mus/gles2/command_buffer_local.cc View 1 2 chunks +5 lines, -4 lines 0 comments Download
M content/browser/download/save_types.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M content/common/cc_messages_unittest.cc View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.cc View 1 4 chunks +8 lines, -5 lines 0 comments Download
M content/common/gpu/client/gpu_context_tests.h View 1 1 chunk +2 lines, -3 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.h View 1 5 chunks +6 lines, -5 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 4 5 6 5 chunks +8 lines, -7 lines 0 comments Download
D content/common/id_type.h View 1 1 chunk +0 lines, -107 lines 0 comments Download
D content/common/id_type_unittest.cc View 1 1 chunk +0 lines, -200 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.h View 1 3 chunks +8 lines, -8 lines 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.cc View 1 2 chunks +6 lines, -7 lines 0 comments Download
M content/renderer/pepper/resource_creation_impl.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/resource_creation_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M gpu/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/client/client_test_helper.h View 1 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -3 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 1 7 chunks +14 lines, -7 lines 0 comments Download
M gpu/command_buffer/client/gpu_control.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M gpu/command_buffer/common/BUILD.gn View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
A gpu/command_buffer/common/command_buffer_id.h View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
A + gpu/command_buffer/common/id_type.h View 1 2 3 4 4 chunks +6 lines, -5 lines 0 comments Download
A + gpu/command_buffer/common/id_type_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M gpu/command_buffer/common/sync_token.h View 1 5 chunks +8 lines, -17 lines 0 comments Download
A gpu/command_buffer/common/sync_token.cc View 1 1 chunk +25 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.h View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.cc View 1 3 chunks +4 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/mailbox_manager_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/sync_point_manager.h View 1 6 chunks +11 lines, -7 lines 0 comments Download
M gpu/command_buffer/service/sync_point_manager.cc View 1 4 chunks +7 lines, -5 lines 0 comments Download
M gpu/command_buffer/service/sync_point_manager_unittest.cc View 1 12 chunks +21 lines, -21 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 1 3 chunks +4 lines, -3 lines 0 comments Download
M gpu/command_buffer_common.gypi View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M gpu/gles2_conform_support/egl/display.h View 1 1 chunk +1 line, -1 line 0 comments Download
M gpu/gles2_conform_support/egl/display.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M gpu/gpu.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M gpu/gpu_ipc.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M gpu/ipc/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M gpu/ipc/gpu_command_buffer_traits.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M gpu/ipc/gpu_command_buffer_traits.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -5 lines 0 comments Download
A gpu/ipc/id_type_traits.h View 1 2 3 4 5 6 7 1 chunk +42 lines, -0 lines 0 comments Download
M media/base/video_frame_unittest.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M media/video/gpu_memory_buffer_video_frame_pool_unittest.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M mojo/converters/surfaces/tests/surface_unittest.cc View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M mojo/gles2/command_buffer_client_impl.h View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M mojo/gles2/command_buffer_client_impl.cc View 1 2 3 4 5 6 4 chunks +5 lines, -3 lines 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.h View 1 4 chunks +4 lines, -3 lines 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.cc View 1 3 chunks +10 lines, -9 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/resource_creation_proxy.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ppapi/thunk/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/thunk/resource_creation_api.h View 1 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 39 (11 generated)
Łukasz Anforowicz
Antoine, could you please take a look?
4 years, 10 months ago (2016-02-05 23:41:41 UTC) #4
piman
Excellent! LGTM++
4 years, 10 months ago (2016-02-05 23:53:53 UTC) #5
Łukasz Anforowicz
Nico, could you please take a look? Some context: - An old CL (crrev.com/1492413002) for ...
4 years, 10 months ago (2016-02-06 00:25:39 UTC) #7
Nico
Before this CL, IdType was used in one file. After this CL, it's used in ...
4 years, 10 months ago (2016-02-09 20:04:29 UTC) #9
piman
On Tue, Feb 9, 2016 at 12:04 PM, <thakis@chromium.org> wrote: > Before this CL, IdType ...
4 years, 10 months ago (2016-02-09 21:47:36 UTC) #10
piman
On Tue, Feb 9, 2016 at 1:47 PM, Antoine Labour <piman@chromium.org> wrote: > > > ...
4 years, 10 months ago (2016-02-09 21:59:55 UTC) #11
Nico
On Tue, Feb 9, 2016 at 4:59 PM, Antoine Labour <piman@chromium.org> wrote: > > > ...
4 years, 10 months ago (2016-02-09 22:03:33 UTC) #12
Łukasz Anforowicz
Thanks for reviewing Nico. I've moved the code out of //base, so technically your sign-off ...
4 years, 10 months ago (2016-02-09 23:06:32 UTC) #13
piman
https://codereview.chromium.org/1548443002/diff/60001/content/browser/download/save_types.h File content/browser/download/save_types.h (right): https://codereview.chromium.org/1548443002/diff/60001/content/browser/download/save_types.h#newcode22 content/browser/download/save_types.h:22: using SavePackageId = gpu::IdType32<SavePackage>; Yeah, this is technically permitted, ...
4 years, 10 months ago (2016-02-09 23:29:32 UTC) #14
Łukasz Anforowicz
+Nick for //content review. Could you please take a look? https://codereview.chromium.org/1548443002/diff/60001/content/browser/download/save_types.h File content/browser/download/save_types.h (right): https://codereview.chromium.org/1548443002/diff/60001/content/browser/download/save_types.h#newcode22 ...
4 years, 10 months ago (2016-02-10 22:18:14 UTC) #16
piman
lgtm
4 years, 10 months ago (2016-02-10 22:54:04 UTC) #17
ncarter (slow)
lgtm
4 years, 10 months ago (2016-02-10 23:29:40 UTC) #18
Nico
lgtm, thanks! https://codereview.chromium.org/1548443002/diff/80001/gpu/command_buffer/common/id_type_unittest.cc File gpu/command_buffer/common/id_type_unittest.cc (right): https://codereview.chromium.org/1548443002/diff/80001/gpu/command_buffer/common/id_type_unittest.cc#newcode200 gpu/command_buffer/common/id_type_unittest.cc:200: } // namespace base namespace gpu
4 years, 10 months ago (2016-02-10 23:31:18 UTC) #19
ncarter (slow)
https://codereview.chromium.org/1548443002/diff/60001/content/browser/download/save_types.h File content/browser/download/save_types.h (right): https://codereview.chromium.org/1548443002/diff/60001/content/browser/download/save_types.h#newcode22 content/browser/download/save_types.h:22: using SavePackageId = gpu::IdType32<SavePackage>; On 2016/02/10 22:18:14, Łukasz Anforowicz ...
4 years, 10 months ago (2016-02-10 23:34:16 UTC) #20
Łukasz Anforowicz
+dcheng for gpu/ipc +fsamuel for components/mus/gles2 +wolenetz for media/ +sky for mojo/ +bbudge for ppapi/ ...
4 years, 10 months ago (2016-02-11 16:51:25 UTC) #22
bbudge
ppapi lgtm
4 years, 10 months ago (2016-02-11 17:02:01 UTC) #23
Fady Samuel
components/mus/gles2 lgtm
4 years, 10 months ago (2016-02-11 17:02:36 UTC) #24
dcheng
https://codereview.chromium.org/1548443002/diff/120001/gpu/ipc/gpu_command_buffer_traits.cc File gpu/ipc/gpu_command_buffer_traits.cc (right): https://codereview.chromium.org/1548443002/diff/120001/gpu/ipc/gpu_command_buffer_traits.cc#newcode121 gpu/ipc/gpu_command_buffer_traits.cc:121: "[%d:%llX] %llu", static_cast<int>(p.namespace_id()), How about: *l += base::StringPrintf("[%d:" PRIu64 ...
4 years, 10 months ago (2016-02-12 19:23:17 UTC) #25
Łukasz Anforowicz
Daniel - can you take another look please? https://codereview.chromium.org/1548443002/diff/120001/gpu/ipc/gpu_command_buffer_traits.cc File gpu/ipc/gpu_command_buffer_traits.cc (right): https://codereview.chromium.org/1548443002/diff/120001/gpu/ipc/gpu_command_buffer_traits.cc#newcode121 gpu/ipc/gpu_command_buffer_traits.cc:121: "[%d:%llX] ...
4 years, 10 months ago (2016-02-12 22:33:24 UTC) #26
dcheng
https://codereview.chromium.org/1548443002/diff/140001/gpu/ipc/gpu_command_buffer_traits.cc File gpu/ipc/gpu_command_buffer_traits.cc (right): https://codereview.chromium.org/1548443002/diff/140001/gpu/ipc/gpu_command_buffer_traits.cc#newcode121 gpu/ipc/gpu_command_buffer_traits.cc:121: "[%" PRId8 ":%" PRIX64 "] %" PRIu64, p.namespace_id(), Should ...
4 years, 10 months ago (2016-02-12 22:38:19 UTC) #27
Łukasz Anforowicz
https://codereview.chromium.org/1548443002/diff/140001/gpu/ipc/gpu_command_buffer_traits.cc File gpu/ipc/gpu_command_buffer_traits.cc (right): https://codereview.chromium.org/1548443002/diff/140001/gpu/ipc/gpu_command_buffer_traits.cc#newcode121 gpu/ipc/gpu_command_buffer_traits.cc:121: "[%" PRId8 ":%" PRIX64 "] %" PRIu64, p.namespace_id(), On ...
4 years, 10 months ago (2016-02-12 22:47:49 UTC) #28
dcheng
ipc changes lgtm
4 years, 10 months ago (2016-02-12 22:52:45 UTC) #29
Łukasz Anforowicz
sky@ + wolenetz@, can you please take a look when you have a chance? I ...
4 years, 10 months ago (2016-02-16 18:04:10 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1548443002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1548443002/160001
4 years, 10 months ago (2016-02-16 18:04:52 UTC) #34
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 10 months ago (2016-02-16 19:17:34 UTC) #35
sky
LGTM
4 years, 10 months ago (2016-02-16 20:09:24 UTC) #36
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/2573ce7d143bee9c1f88dac18b9213c03597daae Cr-Commit-Position: refs/heads/master@{#375620}
4 years, 10 months ago (2016-02-16 22:53:50 UTC) #38
Nico
4 years, 10 months ago (2016-02-17 19:45:19 UTC) #39
Message was sent while issue was closed.
this caused https://code.google.com/p/chromium/issues/detail?id=587558

Powered by Google App Engine
This is Rietveld 408576698