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

Unified Diff: gpu/command_buffer/service/program_manager.cc

Issue 2674263003: Check that the shader source exists before loading from the ProgramCache. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/program_manager.cc
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc
index 6cbff3ba7e800fbc0cecb35af2b8ac2e02939bda..f8dcbc197a9a5113feda4e464e7572495238e9bb 100644
--- a/gpu/command_buffer/service/program_manager.cc
+++ b/gpu/command_buffer/service/program_manager.cc
@@ -1282,9 +1282,9 @@ bool Program::Link(ShaderManager* manager,
TimeTicks before_time = TimeTicks::Now();
bool link = true;
ProgramCache* cache = manager_->program_cache_;
- if (cache) {
- DCHECK(!attached_shaders_[0]->last_compiled_source().empty() &&
- !attached_shaders_[1]->last_compiled_source().empty());
+ if (cache &&
+ !attached_shaders_[0]->last_compiled_source().empty() &&
+ !attached_shaders_[1]->last_compiled_source().empty()) {
ProgramCache::LinkedProgramStatus status = cache->GetLinkedProgramStatus(
attached_shaders_[0]->last_compiled_signature(),
attached_shaders_[1]->last_compiled_signature(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698