commit | 4e871d8fb606cb411e2883be013479bddbc37837 | [log] [tgz] |
---|---|---|
author | danakj <danakj@chromium.org> | Thu Jan 18 21:56:57 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jan 18 21:56:57 2018 |
tree | 54cac2d8a3eb38e4a8593f47bd085d976c449a9d | |
parent | 37746b16232f4237e0cbbc62f01935bd927d62fe [diff] |
Vend resources from ResourcePool with an RAII object. This RAII object, InUsePoolResource wraps an underlying backing from the ResourcePool, and verifies at runtime that the object is passed back to the ResourcePool exactly once to indicate the backing is no longer in use and release it into the pool again. The RAII object exposes the backing but requires the caller to know if they are expecting a software or gpu backing when they ask for it. This means that TileManager can no longer try to access the backing, and must always go through the RasterBufferProvider. It was already doing this mostly, but the API was a bit lazy and leaked the backing info (the ResourceId) into TileManager in a couple places, so we must resolve that and make it use InUsePoolResource exclusively. PictureLayerImpl grabs a ResourceId off the TileDrawInfo as before, but it is explicitly marked as an id meant for export to the display compositor, as opposed to a backing that can be written to. For now the backing is still a ResourceId for both software/gpu and it is written to via the ResourceProvider locks, but this sets us up to be able to change that. R=vmpstr@chromium.org Bug: 730660 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel Change-Id: I79292834482a8d1a3858d61a8313f14b3221337e Reviewed-on: https://chromium-review.googlesource.com/868713 Reviewed-by: vmpstr <vmpstr@chromium.org> Commit-Queue: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/master@{#530286}
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 .