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

Unified Diff: cc/resources/shared_bitmap.cc

Issue 1256613002: Add tracing for GL texture objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_process_id
Patch Set: Use helper function. Created 5 years, 4 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: cc/resources/shared_bitmap.cc
diff --git a/cc/resources/shared_bitmap.cc b/cc/resources/shared_bitmap.cc
index 1ac03233dfb94e02750573723fa1aeb325db2f8d..fc15736315b756f438ebd8bc3cb4afbba17458c8 100644
--- a/cc/resources/shared_bitmap.cc
+++ b/cc/resources/shared_bitmap.cc
@@ -7,6 +7,8 @@
#include "base/logging.h"
#include "base/numerics/safe_math.h"
#include "base/rand_util.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/stringprintf.h"
namespace cc {
@@ -66,4 +68,11 @@ SharedBitmapId SharedBitmap::GenerateId() {
return id;
}
+base::trace_event::MemoryAllocatorDumpGuid GetSharedBitmapGUIDForTracing(
+ const SharedBitmapId& bitmap_id) {
+ auto bitmap_id_hex = base::HexEncode(bitmap_id.name, sizeof(bitmap_id.name));
+ return base::trace_event::MemoryAllocatorDumpGuid(
+ base::StringPrintf("sharedbitmap-x-process/%s", bitmap_id_hex.c_str()));
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698