Index: cc/tile.cc |
diff --git a/cc/tile.cc b/cc/tile.cc |
index 1b04a5dac5288a84394f67a317614370c48ca710..9ebaa51793a30509a6d7b5fdad6d4e4a0e16e343 100644 |
--- a/cc/tile.cc |
+++ b/cc/tile.cc |
@@ -33,6 +33,15 @@ void Tile::set_priority(WhichTree tree, const TilePriority& priority) { |
priority_[tree] = priority; |
} |
+ResourceProvider::ResourceId Tile::GetResourceId() const { |
+ if (!managed_state_.resource) |
+ return 0; |
+ if (managed_state_.resource_is_being_initialized) |
+ return 0; |
+ |
+ return managed_state_.resource->id(); |
+} |
+ |
size_t Tile::bytes_consumed_if_allocated() const { |
DCHECK(format_ == GL_RGBA); |
return 4 * tile_size_.width() * tile_size_.height(); |