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

Unified Diff: mojo/converters/surfaces/surfaces_type_converters.cc

Issue 1496103002: Reusing base::IdType<...> to implement SurfaceId. Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-id-base
Patch Set: Rebasing + dusting off... Created 4 years, 10 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
« no previous file with comments | « content/renderer/render_frame_proxy.h ('k') | mojo/converters/surfaces/tests/surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8c624779182e43c40ca130d73d3c6a552f9eb03a..e36ff9d6c35ce633a46431045fb85bc113becb4a 100644
--- a/mojo/converters/surfaces/surfaces_type_converters.cc
+++ b/mojo/converters/surfaces/surfaces_type_converters.cc
@@ -261,7 +261,7 @@ bool ConvertDrawQuad(const QuadPtr& input,
SurfaceIdPtr TypeConverter<SurfaceIdPtr, cc::SurfaceId>::Convert(
const cc::SurfaceId& input) {
SurfaceIdPtr id(SurfaceId::New());
- id->local = static_cast<uint32_t>(input.id);
+ id->local = static_cast<uint32_t>(input.GetUnsafeValue());
id->id_namespace = cc::SurfaceIdAllocator::NamespaceForId(input);
return id;
}
@@ -272,7 +272,7 @@ cc::SurfaceId TypeConverter<cc::SurfaceId, SurfaceIdPtr>::Convert(
uint64_t packed_id = input->id_namespace;
packed_id <<= 32ull;
packed_id |= input->local;
- return cc::SurfaceId(packed_id);
+ return cc::SurfaceId::FromUnsafeValue(packed_id);
}
// static
« no previous file with comments | « content/renderer/render_frame_proxy.h ('k') | mojo/converters/surfaces/tests/surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698