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

Unified Diff: components/bitmap_uploader/bitmap_uploader.cc

Issue 2020993004: Implement TransferableResource StructTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/bitmap_uploader/bitmap_uploader.cc
diff --git a/components/bitmap_uploader/bitmap_uploader.cc b/components/bitmap_uploader/bitmap_uploader.cc
index 68b8e5d8663136efae39dbe367bc18fc534bb1da..e34338aed1247c3a73aabebd230682b3da34631e 100644
--- a/components/bitmap_uploader/bitmap_uploader.cc
+++ b/components/bitmap_uploader/bitmap_uploader.cc
@@ -113,18 +113,17 @@ void BitmapUploader::Upload() {
gpu::SyncToken sync_token;
gl->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData());
- mus::mojom::TransferableResourcePtr resource =
- mus::mojom::TransferableResource::New();
- resource->id = next_resource_id_++;
- resource_to_texture_id_map_[resource->id] = texture_id;
- resource->format = mus::mojom::ResourceFormat::RGBA_8888;
- resource->filter = GL_LINEAR;
- resource->size = bitmap_size;
- resource->mailbox_holder =
+ cc::TransferableResource resource;
+ resource.id = next_resource_id_++;
+ resource_to_texture_id_map_[resource.id] = texture_id;
+ resource.format = cc::ResourceFormat::RGBA_8888;
+ resource.filter = GL_LINEAR;
+ resource.size = bitmap_size;
+ resource.mailbox_holder =
gpu::MailboxHolder(mailbox, sync_token, GL_TEXTURE_2D);
- resource->read_lock_fences_enabled = false;
- resource->is_software = false;
- resource->is_overlay_candidate = false;
+ resource.read_lock_fences_enabled = false;
+ resource.is_software = false;
+ resource.is_overlay_candidate = false;
mus::mojom::QuadPtr quad = mus::mojom::Quad::New();
quad->material = mus::mojom::Material::TEXTURE_CONTENT;
@@ -152,7 +151,7 @@ void BitmapUploader::Upload() {
mus::mojom::TextureQuadStatePtr texture_state =
mus::mojom::TextureQuadState::New();
- texture_state->resource_id = resource->id;
+ texture_state->resource_id = resource.id;
texture_state->premultiplied_alpha = true;
texture_state->uv_top_left.SetPoint(0.f, 0.f);
texture_state->uv_bottom_right.SetPoint(1.f, 1.f);
« no previous file with comments | « cc/tiles/software_image_decode_controller.cc ('k') | components/mus/public/cpp/surfaces/surfaces_type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698