Chromium Code Reviews| Index: cc/resources/resource_provider.cc |
| diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc |
| index f31cfd4da34e776878b87574f37a281741467f94..1307897ee2e7e4f5484fb153b34a58f8144b665d 100644 |
| --- a/cc/resources/resource_provider.cc |
| +++ b/cc/resources/resource_provider.cc |
| @@ -2134,6 +2134,13 @@ GLint ResourceProvider::GetActiveTextureUnit(GLES2Interface* gl) { |
| return active_unit; |
| } |
| +void ResourceProvider::ValidateResource(ResourceId id) { |
| + DCHECK(thread_checker_.CalledOnValidThread()); |
| + CHECK(id); |
| + ResourceMap::iterator it = resources_.find(id); |
| + CHECK(it != resources_.end()); |
|
piman
2015/04/07 00:13:39
nit: all that is essentially (void)GetResource(id)
danakj
2015/04/07 00:15:00
Ya I copied it from there. Heh. My random thought
|
| +} |
| + |
| GLES2Interface* ResourceProvider::ContextGL() const { |
| ContextProvider* context_provider = output_surface_->context_provider(); |
| return context_provider ? context_provider->ContextGL() : NULL; |