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

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: review feedback Created 5 years, 5 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..90d80f3809f47e575b3d9818403a88ea8d26176a 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));
ssid 2015/07/29 11:17:43 Please add a line pmd->CreateSharedGlobalAllocato
ericrk 2015/07/29 18:46:46 We've currently been doing this at the call-site (
+ return base::trace_event::MemoryAllocatorDumpGuid(base::StringPrintf(
+ "gpumemorybuffer-x-process/%s", bitmap_id_hex.c_str()));
ericrk 2015/07/28 21:02:32 These IDs are globally unique already right? Share
reveman 2015/07/28 21:38:49 s/gpumemorybuffer-x-process/sharedbitmap-x-process
petrcermak 2015/07/29 16:13:34 Yest, the IDs are globally unique.
ericrk 2015/07/29 18:46:46 Done.
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698