Index: mojo/converters/surfaces/surfaces_type_converters.cc |
diff --git a/mojo/converters/surfaces/surfaces_type_converters.cc b/mojo/converters/surfaces/surfaces_type_converters.cc |
index 1a6ab99985ce13a79235bdf08bc9e50c07b9eafa..6a315e8ab01ae45d4bf77f1e07b6740c292a2b94 100644 |
--- a/mojo/converters/surfaces/surfaces_type_converters.cc |
+++ b/mojo/converters/surfaces/surfaces_type_converters.cc |
@@ -16,6 +16,7 @@ |
#include "cc/quads/texture_draw_quad.h" |
#include "cc/quads/tile_draw_quad.h" |
#include "cc/quads/yuv_video_draw_quad.h" |
+#include "cc/surfaces/surface_id_allocator.h" |
#include "mojo/converters/geometry/geometry_type_converters.h" |
namespace mojo { |
@@ -194,14 +195,18 @@ bool ConvertDrawQuad(const QuadPtr& input, |
SurfaceIdPtr TypeConverter<SurfaceIdPtr, cc::SurfaceId>::Convert( |
const cc::SurfaceId& input) { |
SurfaceIdPtr id(SurfaceId::New()); |
- id->id = input.id; |
+ id->local = static_cast<uint32_t>(input.id); |
+ id->id_namespace = cc::SurfaceIdAllocator::NamespaceForId(input); |
return id.Pass(); |
} |
// static |
cc::SurfaceId TypeConverter<cc::SurfaceId, SurfaceIdPtr>::Convert( |
const SurfaceIdPtr& input) { |
- return cc::SurfaceId(input->id); |
+ uint64_t packed_id = input->id_namespace; |
+ packed_id <<= 32ull; |
+ packed_id |= input->local; |
+ return cc::SurfaceId(packed_id); |
} |
// static |