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

Unified Diff: examples/ganesh_app/texture_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/ganesh_app/texture_uploader.cc
diff --git a/examples/ganesh_app/texture_uploader.cc b/examples/ganesh_app/texture_uploader.cc
index 7b77d8da0084c89a1876d1458485d53374c27a17..2c8f831dd0ca4d08331d20378ab9dd584e5bea66 100644
--- a/examples/ganesh_app/texture_uploader.cc
+++ b/examples/ganesh_app/texture_uploader.cc
@@ -132,11 +132,11 @@ void TextureUploader::EnsureSurfaceForSize(const mojo::Size& size) {
surface_->DestroySurface(surface_id_.Clone());
} else {
surface_id_ = mojo::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());
client_->OnSurfaceIdAvailable(surface_id_.Clone());
surface_size_ = size;
}
@@ -145,6 +145,9 @@ void TextureUploader::OnContextLost() {
LOG(FATAL) << "Context lost.";
}
+void TextureUploader::SetIdNamespace(uint32_t id_namespace) {
+}
+
void TextureUploader::ReturnResources(
mojo::Array<mojo::ReturnedResourcePtr> resources) {
if (!resources.size())

Powered by Google App Engine
This is Rietveld 408576698