commit | 0443a8fb9e6e862ee70aea4644eeea5297334416 | [log] [tgz] |
---|---|---|
author | Alexandr Ilin <alexilin@chromium.org> | Fri Jul 20 20:14:50 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jul 20 20:14:50 2018 |
tree | f1125c31e79076fe5ec4c9274442af84a69cd7e8 | |
parent | 5cf9692cef4a23a457228cd18e08524e96d41918 [diff] |
gfx: Improve handle management in gfx::GpuMemoryBuffer The handle returned from gfx::GpuMemoryBuffer::GetHandle() is either passed to CloneHandleForIPC immediately or used to obtain some handle metadata (type, GUID). This CL replaces GpuMemoryBuffer::GetHandle() with the new method GpuMemoryBuffer::CloneHandle() that is equivalent of calling CloneHandleForIPC(buffer.GetHandle()). This will allow to use scoped objects for all types of underlying platform handles, since no two GpuMemoryBufferHandles will refer to the same system resource. New methods are also added to access type/GUID of buffer. As a demonstration, this CL changes the type of the GpuMemoryBufferHandle::android_hardware_buffer from AHardwareBuffer* to base::android::ScopedHardwareBufferHandle. Bug: 854594, 863011 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I0306f4295cf28113cf467dba3c2a2b1717ca2e67 Reviewed-on: https://chromium-review.googlesource.com/1126394 Commit-Queue: Alexandr Ilin <alexilin@chromium.org> Reviewed-by: danakj <danakj@chromium.org> Reviewed-by: Daniele Castagna <dcastagna@chromium.org> Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org> Reviewed-by: Ricky Liang <jcliang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Ken Rockot <rockot@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Klaus Weidner <klausw@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#576964}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .