[go: nahoru, domu]

Move ownership of ResourcePool zero-copy resources to buffer provider

This adds a GpuBacking object to PoolResource, which holds ownership
of all the GpuMemoryBuffer-based backing objects. The
ZeroCopyRasterBufferImpl has a subclass with its own specific types
in it, and populates them:
a) When AcquireBufferForRaster is called it creates the GpuBacking
and ensures the sync token is waited on if present.
b) When the RasterBuffer is destroyed, back on the compositor thread,
it binds the GpuMemoryBuffer to a mailbox, and stores those onto the
GpuBacking.

Then ResourcePool can export the GpuBacking by reading the mailbox
of it. And when the resource is destroyed, the GpuBacking cleans
up the ownership of the mailboxed texture and GpuMemoryBuffer.

R=vmpstr@chromium.org

Bug: 730660, 738190
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Iac964108e2ab767239e9968e03f82bc80d6a6e3b
Reviewed-on: https://chromium-review.googlesource.com/888844
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534726}
12 files changed