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

Unified Diff: cc/resources/resource_pool.cc

Issue 1688953002: Mac: Suppress asserts about resources being in use (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missed function Created 4 years, 10 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
« no previous file with comments | « no previous file | cc/resources/resource_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_pool.cc
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index 4bc9c32457e8d3f2f1770cd9df81fc32c631e2da..c12abfe402b175a191eb05cb58d8ad96faf52daa 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -102,8 +102,11 @@ Resource* ResourcePool::AcquireResource(const gfx::Size& size,
for (ResourceDeque::iterator it = unused_resources_.begin();
it != unused_resources_.end(); ++it) {
ScopedResource* resource = it->get();
- // TODO(ccameron): Investigate why this fails (http://crbug.com/577121).
- // DCHECK(resource_provider_->CanLockForWrite(resource->id()));
+ // TODO(ccameron): The allowance for IsInUseByMacOSWindowServer should not
+ // be needed.
+ // http://crbug.com/577121
+ DCHECK(resource_provider_->CanLockForWrite(resource->id()) ||
+ resource_provider_->IsInUseByMacOSWindowServer(resource->id()));
if (resource->format() != format)
continue;
@@ -153,7 +156,11 @@ Resource* ResourcePool::TryAcquireResourceWithContentId(uint64_t content_id) {
return nullptr;
Resource* resource = it->get();
- DCHECK(resource_provider_->CanLockForWrite(resource->id()));
+ // TODO(ccameron): The allowance for IsInUseByMacOSWindowServer should not
+ // be needed.
+ // http://crbug.com/577121
+ DCHECK(resource_provider_->CanLockForWrite(resource->id()) ||
+ resource_provider_->IsInUseByMacOSWindowServer(resource->id()));
// Transfer resource to |in_use_resources_|.
in_use_resources_[resource->id()] = std::move(*it);
« no previous file with comments | « no previous file | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698