diff options
author | reveman <reveman@chromium.org> | 2014-10-29 14:04:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-29 21:04:53 +0000 |
commit | 51883faa0a6104c390251f57ebc794f714cf98d0 (patch) | |
tree | e287b106ca95f8a6b799a3dd061107796dbfdf1a /cc/resources/resource_pool.h | |
parent | cae3ac4afe15aca930e55c72cc929a7b830be2db (diff) | |
download | chromium_src-51883faa0a6104c390251f57ebc794f714cf98d0.zip chromium_src-51883faa0a6104c390251f57ebc794f714cf98d0.tar.gz chromium_src-51883faa0a6104c390251f57ebc794f714cf98d0.tar.bz2 |
cc: Detect miss-behaving fence extensions when using 1-copy rasterizer.
This adds a wait_if_needed parameter to
ResourcePool::CheckBusyResources. CheckBusyResources will use existing
ResourceProvider API to wait for any read locks to complete if needed
by a resource prior to checking if it's still busy when this parameter
is true.
1-copy rasterizer will use this functionality after too many failed
attempts to check if copy operations have completed. This provides a
reliable method to detect drivers with miss-behaving fence extensions.
BUG=406404
Review URL: https://codereview.chromium.org/683263004
Cr-Commit-Position: refs/heads/master@{#301926}
Diffstat (limited to 'cc/resources/resource_pool.h')
-rw-r--r-- | cc/resources/resource_pool.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h index 102b242..e1ee35a 100644 --- a/cc/resources/resource_pool.h +++ b/cc/resources/resource_pool.h @@ -34,7 +34,10 @@ class CC_EXPORT ResourcePool { size_t max_resource_count); void ReduceResourceUsage(); - void CheckBusyResources(); + // This might block if |wait_if_needed| is true and one of the currently + // busy resources has a read lock fence that needs to be waited upon before + // it can be locked for write again. + void CheckBusyResources(bool wait_if_needed); size_t total_memory_usage_bytes() const { return memory_usage_bytes_; } size_t acquired_memory_usage_bytes() const { |