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

Unified Diff: cc/resources/resource_pool.cc

Issue 1379783002: Allow one-copy task tile worker pool to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 5 years 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
Index: cc/resources/resource_pool.cc
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index 778ddbe853ca87dc4f194643d7c44bf62c6788bb..f1a405dd5248a1628b3e37ea3246b31d53b25945 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -92,6 +92,9 @@ ResourcePool::~ResourcePool() {
Resource* ResourcePool::AcquireResource(const gfx::Size& size,
ResourceFormat format) {
+ DCHECK_EQ(size.width() % 4, 0);
+ DCHECK_EQ(size.height() % 4, 0);
+
// Finding resources in |unused_resources_| from MRU to LRU direction, touches
// LRU resources only if needed, which increases possibility of expiring more
// LRU resources within kResourceExpirationDelayMs.

Powered by Google App Engine
This is Rietveld 408576698