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

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

Issue 1360513002: Cleanup: Pass std::string as const reference from gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass func_name as const char* in GLES2DecoderImpl::ProduceTextureRef 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5310f38639c8a99e9d856604b13986641dfbfceb 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 char* 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 char* 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 "
@@ -13845,20 +13849,20 @@ void GLES2DecoderImpl::ProduceTextureRef(std::string func_name,
if (!texture_ref) {
LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION, func_name.c_str(), "unknown texture for target");
+ GL_INVALID_OPERATION, func_name, "unknown texture for target");
return;
}
Texture* produced = texture_manager()->Produce(texture_ref);
if (!produced) {
LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION, func_name.c_str(), "invalid texture");
+ GL_INVALID_OPERATION, func_name, "invalid texture");
return;
}
if (produced->target() != target) {
LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION, func_name.c_str(), "invalid target");
+ GL_INVALID_OPERATION, func_name, "invalid target");
return;
}
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698