Index: cc/resources/prioritized_resource.cc |
diff --git a/cc/resources/prioritized_resource.cc b/cc/resources/prioritized_resource.cc |
index 968083cb968ed491e98475abe7029731db4765d7..1fe66b5ecf4588765d2d5296e3a3bd12e17e7e41 100644 |
--- a/cc/resources/prioritized_resource.cc |
+++ b/cc/resources/prioritized_resource.cc |
@@ -25,7 +25,9 @@ PrioritizedResource::PrioritizedResource(PrioritizedResourceManager* manager, |
is_self_managed_(false), |
backing_(NULL), |
manager_(NULL) { |
- bytes_ = Resource::MemorySizeBytes(size, format); |
+ // We can use UncheckedMemorySizeBytes here, since the size is controlled by |
+ // the compositor (used for tiles). |
+ bytes_ = Resource::UncheckedMemorySizeBytes(size, format); |
if (manager) |
manager->RegisterTexture(this); |
} |
@@ -51,7 +53,9 @@ void PrioritizedResource::SetDimensions(const gfx::Size& size, |
is_above_priority_cutoff_ = false; |
format_ = format; |
size_ = size; |
- bytes_ = Resource::MemorySizeBytes(size, format); |
+ // We can use UncheckedMemorySizeBytes here, since the size is controlled by |
+ // the compositor (used for tiles). |
+ bytes_ = Resource::UncheckedMemorySizeBytes(size, format); |
DCHECK(manager_ || !backing_); |
if (manager_) |
manager_->ReturnBackingTexture(this); |