Chromium Code Reviews| 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 |