Fix anonymous GLImageIOSurface memory double counting

Anonymous GLImageIOSurfaces are textures from the client's perspective
so the client adds a shared ownership edge with the GPU process texture
instead of considering it as a GpuMemoryBuffer. However, the service
also adds another shared ownership edge with the GpuMemoryBuffer using
the GMB id at the face_X/level_Y nested level. This adds edges at
different nesting levels which causes double counting by memory-infra.

This change removes the shared ownership edge when the GLImageIOSurface
is anonymous, and replaces that with a nested "anonymous-iosurface"
level. This gets rid of the double counting as the memory is charged to
cc's tile or resource memory due to its higher importance.


Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Id5b69e38b525d5bfdbb997fec2479b644cfae656
Reviewed-by: ccameron <>
Reviewed-by: Antoine Labour <>
Reviewed-by: Eric Karl <>
Commit-Queue: Sunny Sachanandani <>
Cr-Commit-Position: refs/heads/master@{#578021}
4 files changed