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

Unified Diff: examples/bitmap_uploader/bitmap_uploader.cc

Issue 807733002: Split surface id and simplify connecting to surfaces service (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
Index: examples/bitmap_uploader/bitmap_uploader.cc
diff --git a/examples/bitmap_uploader/bitmap_uploader.cc b/examples/bitmap_uploader/bitmap_uploader.cc
index 86e3bc219f0df984959280c82bf10423f02e5e4b..07becf6c7a03b2d8c6cf5edeac94fd493a176967 100644
--- a/examples/bitmap_uploader/bitmap_uploader.cc
+++ b/examples/bitmap_uploader/bitmap_uploader.cc
@@ -103,10 +103,10 @@ void BitmapUploader::Upload() {
surface_->DestroySurface(surface_id_.Clone());
} else {
surface_id_ = SurfaceId::New();
- surface_id_->id = static_cast<uint64_t>(id_namespace_) << 32;
+ surface_id_->id_namespace = id_namespace_;
}
- surface_id_->id++;
- surface_->CreateSurface(surface_id_.Clone(), size.Clone());
+ surface_id_->local++;
+ surface_->CreateSurface(surface_id_.Clone());
view_->SetSurfaceId(surface_id_.Clone());
surface_size_ = size;
}
@@ -225,6 +225,9 @@ void BitmapUploader::Upload() {
surface_->SubmitFrame(surface_id_.Clone(), frame.Pass(), mojo::Closure());
}
+void BitmapUploader::SetIdNamespace(uint32_t id_namespace) {
+}
+
void BitmapUploader::ReturnResources(Array<ReturnedResourcePtr> resources) {
if (!resources.size())
return;

Powered by Google App Engine
This is Rietveld 408576698