Lines Matching refs:resource
95 // Checks whether a resource is in use by a consumer.
106 // Creates a resource of the default resource type.
112 // Creates a resource which is tagged as being managed for GPU memory
120 // You can also explicitly create a specific resource type.
129 // Wraps an IOSurface into a GL resource.
133 // Wraps an external texture mailbox into a GL resource.
141 // the resource).
174 // Gets the child->parent resource ID map.
184 // Receives resources from a child, moving them from mailboxes. Resource IDs
203 // Receives resources from the parent, moving them from mailboxes. Resource
211 // needed to read and write the resource contents. The user must ensure
323 // Call Unmap before the resource can be read or used for compositing.
331 // which is internally bound to the underlying resource when read.
332 // Call Unmap before the resource can be read or used for compositing.
339 // The pixel buffer needs to be uploaded to the underlying resource
361 // Sets the current read fence. If a resource is locked for read
362 // and has read fences enabled, the resource will not allow writes
366 // Enable read lock fences for a specific resource.
369 // Indicates if we can currently lock this resource for write.
382 struct Resource {
385 Resource();
386 ~Resource();
387 Resource(unsigned texture_id,
396 Resource(uint8_t* pixels,
402 Resource(const SharedBitmapId& bitmap_id,
452 typedef base::hash_map<ResourceId, Resource> ResourceMap;
463 RasterBuffer(const Resource* resource, ResourceProvider* resource_provider);
464 const Resource* resource() const { return resource_; }
471 const Resource* resource_;
479 DirectRasterBuffer(const Resource* resource,
502 BitmapRasterBuffer(const Resource* resource,
520 ImageRasterBuffer(const Resource* resource,
534 PixelRasterBuffer(const Resource* resource,
562 bool ReadLockFenceHasPassed(const Resource* resource) {
563 return !resource->read_lock_fence.get() ||
564 resource->read_lock_fence->HasPassed();
576 Resource* GetResource(ResourceId id);
577 const Resource* LockForRead(ResourceId id);
579 const Resource* LockForWrite(ResourceId id);
582 const Resource* resource);
586 TransferableResource* resource);
596 void LazyCreate(Resource* resource);
597 void LazyAllocate(Resource* resource);
600 // Acquire pixel buffer for resource. The pixel buffer can be used to
601 // set resource pixels without performing unnecessary copying.
602 void AcquirePixelBuffer(Resource* resource);
603 void ReleasePixelBuffer(Resource* resource);
605 uint8_t* MapPixelBuffer(const Resource* resource, int* stride);
606 void UnmapPixelBuffer(const Resource* resource);
611 void AcquireImage(Resource* resource);
612 void ReleaseImage(Resource* resource);
615 uint8_t* MapImage(const Resource* resource, int* stride);
616 void UnmapImage(const Resource* resource);
618 void BindImageForSampling(Resource* resource);
619 // Binds the given GL resource to a texture target for sampling using the
621 // texture target used. The resource must be locked for reading.