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

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

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 410f1cc09454b3a3ccb13b86d5adc6f76efde3e8..4ff246dfa55c73f95c5acf997c95fb79df0f2291 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1054,8 +1054,10 @@ class GLES2DecoderImpl : public GLES2Decoder,
void DoProduceTextureCHROMIUM(GLenum target, const GLbyte* key);
void DoProduceTextureDirectCHROMIUM(GLuint texture, GLenum target,
const GLbyte* key);
- void ProduceTextureRef(std::string func_name, TextureRef* texture_ref,
- GLenum target, const GLbyte* data);
+ void ProduceTextureRef(const std::string& func_name,
+ TextureRef* texture_ref,
+ GLenum target,
+ const GLbyte* data);
void EnsureTextureForClientId(GLenum target, GLuint client_id);
void DoConsumeTextureCHROMIUM(GLenum target, const GLbyte* key);
@@ -13836,8 +13838,10 @@ void GLES2DecoderImpl::DoProduceTextureDirectCHROMIUM(GLuint client_id,
target, data);
}
-void GLES2DecoderImpl::ProduceTextureRef(std::string func_name,
- TextureRef* texture_ref, GLenum target, const GLbyte* data) {
+void GLES2DecoderImpl::ProduceTextureRef(const std::string& func_name,
+ TextureRef* texture_ref,
+ GLenum target,
+ const GLbyte* data) {
const Mailbox& mailbox = *reinterpret_cast<const Mailbox*>(data);
DLOG_IF(ERROR, !mailbox.Verify()) << func_name << " was passed a "
"mailbox that was not generated by "

Powered by Google App Engine
This is Rietveld 408576698