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

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

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 6 years 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 | « mojo/cc/output_surface_mojo.cc ('k') | mojo/edk/embedder/BUILD.gn » ('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 c064dc800bc49d570ac452de416db3e5003f0673..863e9c5445dbc825c4f54d4f9ad8dd844ed6ede2 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 {
@@ -195,14 +196,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
« no previous file with comments | « mojo/cc/output_surface_mojo.cc ('k') | mojo/edk/embedder/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698