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

Unified Diff: gpu/command_buffer/client/program_info_manager.cc

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 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
Index: gpu/command_buffer/client/program_info_manager.cc
diff --git a/gpu/command_buffer/client/program_info_manager.cc b/gpu/command_buffer/client/program_info_manager.cc
index 779d914ac4c441a6fc40d0a00a958281a7df7c83..89e8913a63ae382ba1dc630e88e707549c01ba4d 100644
--- a/gpu/command_buffer/client/program_info_manager.cc
+++ b/gpu/command_buffer/client/program_info_manager.cc
@@ -332,11 +332,10 @@ void ProgramInfoManager::Program::UpdateES2(const std::vector<int8>& result) {
if (!link_status_) {
return;
}
- attrib_infos_.clear();
- uniform_infos_.clear();
- frag_data_locations_.clear();
- max_attrib_name_length_ = 0;
- max_uniform_name_length_ = 0;
+ DCHECK_EQ(0u, attrib_infos_.size());
+ DCHECK_EQ(0u, uniform_infos_.size());
+ DCHECK_EQ(0, max_attrib_name_length_);
+ DCHECK_EQ(0, max_uniform_name_length_);
const ProgramInput* inputs = LocalGetAs<const ProgramInput*>(
result, sizeof(*header),
sizeof(ProgramInput) * (header->num_attribs + header->num_uniforms));
@@ -382,8 +381,8 @@ void ProgramInfoManager::Program::UpdateES3UniformBlocks(
// This should only happen on a lost context.
return;
}
- uniform_blocks_.clear();
- active_uniform_block_max_name_length_ = 0;
+ DCHECK_EQ(0u, uniform_blocks_.size());
+ DCHECK_EQ(0u, active_uniform_block_max_name_length_);
// |result| comes from GPU process. We consider it trusted data. Therefore,
// no need to check for overflows as the GPU side did the checks already.
@@ -453,7 +452,7 @@ void ProgramInfoManager::Program::UpdateES3Uniformsiv(
// This should only happen on a lost context.
return;
}
- uniforms_es3_.clear();
+ DCHECK_EQ(0u, uniforms_es3_.size());
// |result| comes from GPU process. We consider it trusted data. Therefore,
// no need to check for overflows as the GPU side did the checks already.
@@ -495,8 +494,8 @@ void ProgramInfoManager::Program::UpdateES3TransformFeedbackVaryings(
// This should only happen on a lost context.
return;
}
- transform_feedback_varyings_.clear();
- transform_feedback_varying_max_length_ = 0;
+ DCHECK_EQ(0u, transform_feedback_varyings_.size());
+ DCHECK_EQ(0u, transform_feedback_varying_max_length_);
// |result| comes from GPU process. We consider it trusted data. Therefore,
// no need to check for overflows as the GPU side did the checks already.
« no previous file with comments | « gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h ('k') | gpu/command_buffer/cmd_buffer_functions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698