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

Unified Diff: cc/resources/resource_provider.cc

Issue 1062043003: cc: Add ResourceId validation checks at the time of AppendQuads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « cc/resources/resource_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « cc/resources/resource_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698