src/ui/scenic/lib/flatland/renderer/null_renderer.cc
// Check that the buffer collections for each of the images passed in have been validated.
// DCHECK if they have not.
Check that the buffer collections for each of the images passed in have been validated.
DCHECK if they have not.
Check that the buffer collections for each of the images passed in have been validated . DCHECK if they have not .
void NullRenderer::Render(const ImageMetadata& render_target,
                          const std::vector<Rectangle2D>& rectangles,
                          const std::vector<ImageMetadata>& images,
                          const std::vector<zx::event>& release_fences) {
  for (const auto& image : images) {
    auto collection_id = image.collection_id;
    FX_DCHECK(collection_id != kInvalidId);
    std::unique_lock<std::mutex> lock(lock_);
    auto metadata_itr = collection_metadata_map_.find(collection_id);
    FX_DCHECK(metadata_itr != collection_metadata_map_.end());
    auto metadata = metadata_itr->second;
    lock.release();
    FX_DCHECK(image.vmo_idx < metadata.vmo_count);
    FX_DCHECK(image.width <= metadata.image_constraints.max_coded_width);
    FX_DCHECK(image.height <= metadata.image_constraints.max_coded_height);
  }
  for (auto& fence : release_fences) {
    fence.signal(0, ZX_EVENT_SIGNALED);
  }
}
void NullRenderer :: Render ( const ImageMetadata & render_target , const std :: vector < Rectangle2D > & rectangles , const std :: vector < ImageMetadata > & images , const std :: vector < zx :: event > & release_fences ) { for ( const auto & image : images ) { auto collection_id = image . collection_id ; FX_DCHECK ( collection_id != kInvalidId ) ; std :: unique_lock < std :: mutex > lock ( lock_ ) ; auto metadata_itr = collection_metadata_map_ . find ( collection_id ) ; FX_DCHECK ( metadata_itr != collection_metadata_map_ . end ( ) ) ; auto metadata = metadata_itr -> second ; lock . release ( ) ; FX_DCHECK ( image . vmo_idx < metadata . vmo_count ) ; FX_DCHECK ( image . width <= metadata . image_constraints . max_coded_width ) ; FX_DCHECK ( image . height <= metadata . image_constraints . max_coded_height ) ; } for ( auto & fence : release_fences ) { fence . signal ( 0 , ZX_EVENT_SIGNALED ) ; } }
Check that the buffer collections for each of the images passed in have been validated.
Check that the buffer collections for each of the images passed in have been validated .
// TODO(fxbug.dev/44335): Convert this to a lock-free structure. // Make sure the image conforms to the constraints of the collection. // Fire all of the release fences.