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

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

Issue 593233002: Modified GPU command signature hash to use a binary representation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/framebuffer_manager.cc
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc
index 4022b3defaa1e286e85e72f7ac6aa702fa1e9fb2..95aa2f73f0a65e99513c50df0287fc3e49d1e273 100644
--- a/gpu/command_buffer/service/framebuffer_manager.cc
+++ b/gpu/command_buffer/service/framebuffer_manager.cc
@@ -508,12 +508,14 @@ GLenum Framebuffer::GetStatus(
// Check if we have this combo already.
std::string signature;
vmiura 2014/09/23 20:26:47 I think it would help to pre-reserve enough space
David Yen 2014/09/23 20:45:24 Since I will be adding structures for the binary b
if (allow_framebuffer_combo_complete_map_) {
- signature = base::StringPrintf("|FBO|target=%04x", target);
+ signature.append("|Target|");
+ signature.append(reinterpret_cast<const char*>(&target), sizeof(target));
+ signature.push_back('|');
vmiura 2014/09/23 20:26:47 I think we could remove fillers like "|Target|" an
David Yen 2014/09/23 20:45:24 I think it's a good idea to keep marker tags to en
vmiura 2014/09/23 22:37:17 I'd think we need to keep them in the attachments
David Yen 2014/09/23 22:42:51 Done. Removed it in the last patch.
for (AttachmentMap::const_iterator it = attachments_.begin();
it != attachments_.end(); ++it) {
Attachment* attachment = it->second.get();
- signature +=
- base::StringPrintf("|Attachment|attachmentpoint=%04x", it->first);
+ signature.append(reinterpret_cast<const char*>(&it->first),
+ sizeof(it->first));
attachment->AddToSignature(texture_manager, &signature);
}
« no previous file with comments | « no previous file | gpu/command_buffer/service/renderbuffer_manager.cc » ('j') | gpu/command_buffer/service/renderbuffer_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698