Commit abc59ef6 authored by danakj's avatar danakj Committed by Commit Bot

Make ResourcePool export the resource format on TransferableResource

This format isn't part of the TransferableResource::MakeFoo() helpers
but is important nonetheless for memory accounting, and would be
important for software resources. For GL the format is known in the
service so it ends up not being used for correctness.

R=ericrk@chromium.org

Bug: 811432, 730660
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ibaacf987cbbdb1cc17ad624325c843aca7ba7230
Reviewed-on: https://chromium-review.googlesource.com/927021
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537874}
parent bb1d3b95
......@@ -291,6 +291,7 @@ void ResourcePool::PrepareForExport(const InUsePoolResource& resource) {
resource.resource_->shared_bitmap()->sequence_number(),
resource.resource_->size());
}
transferable.format = resource.resource_->format();
transferable.color_space = resource.resource_->color_space();
resource.resource_->set_resource_id(resource_provider_->ImportResource(
std::move(transferable),
......
......@@ -93,7 +93,7 @@ struct VIZ_COMMON_EXPORT TransferableResource {
gfx::Size size;
// The format of the pixels in the gpu mailbox/software bitmap. This should
// almost always be RGBA_8888 for resources generted by compositor clients,
// almost always be RGBA_8888 for resources generated by compositor clients,
// and must be RGBA_8888 always for software resources.
ResourceFormat format = RGBA_8888;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment