[go: nahoru, domu]

[//cc] Refine GpuRasterBufferProvider RASTER SI usage

The SharedImages that this class creates serve as the destination of
raster operations before being read by the display compositor.

Bug: 1519074
Change-Id: I15fb9cb6f300372f7450995fc7038a67b8d020d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5250514
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1254568}
diff --git a/cc/raster/gpu_raster_buffer_provider.cc b/cc/raster/gpu_raster_buffer_provider.cc
index 82fb7a7..49bffdb 100644
--- a/cc/raster/gpu_raster_buffer_provider.cc
+++ b/cc/raster/gpu_raster_buffer_provider.cc
@@ -373,8 +373,10 @@
   if (!backing_->shared_image) {
     DCHECK(!backing_->returned_sync_token.HasData());
     auto* sii = client_->worker_context_provider_->SharedImageInterface();
+
+    // This SharedImage will serve as the destination of the raster defined by
+    // `raster_source` before being sent off to the display compositor.
     uint32_t flags = gpu::SHARED_IMAGE_USAGE_DISPLAY_READ |
-                     gpu::SHARED_IMAGE_USAGE_RASTER_READ |
                      gpu::SHARED_IMAGE_USAGE_RASTER_WRITE |
                      gpu::SHARED_IMAGE_USAGE_OOP_RASTERIZATION;
     if (backing_->overlay_candidate) {