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

Side by Side Diff: services/gfx/compositor/graph/scene_def.cc

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments 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 unified diff | Download patch
« no previous file with comments | « services/gfx/compositor/compositor_impl.cc ('k') | services/gfx/compositor/scene_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/gfx/compositor/graph/scene_def.h" 5 #include "services/gfx/compositor/graph/scene_def.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 #include <utility>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
12 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
13 #include "mojo/services/gfx/composition/cpp/formatting.h" 14 #include "mojo/services/gfx/composition/cpp/formatting.h"
14 #include "services/gfx/compositor/graph/snapshot.h" 15 #include "services/gfx/compositor/graph/snapshot.h"
15 #include "services/gfx/compositor/render/render_image.h" 16 #include "services/gfx/compositor/render/render_image.h"
16 #include "services/gfx/compositor/render/render_layer.h" 17 #include "services/gfx/compositor/render/render_layer.h"
17 18
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 << ", height=" << height; 286 << ", height=" << height;
286 return nullptr; 287 return nullptr;
287 } 288 }
288 std::shared_ptr<RenderImage> image = RenderImage::CreateFromMailboxTexture( 289 std::shared_ptr<RenderImage> image = RenderImage::CreateFromMailboxTexture(
289 reinterpret_cast<GLbyte*>( 290 reinterpret_cast<GLbyte*>(
290 mailbox_texture_resource_decl->mailbox_name.data()), 291 mailbox_texture_resource_decl->mailbox_name.data()),
291 mailbox_texture_resource_decl->sync_point, width, height, 292 mailbox_texture_resource_decl->sync_point, width, height,
292 base::MessageLoop::current()->task_runner(), 293 base::MessageLoop::current()->task_runner(),
293 base::Bind( 294 base::Bind(
294 &ReleaseMailboxTexture, 295 &ReleaseMailboxTexture,
295 base::Passed(mailbox_texture_resource_decl->callback.Pass()))); 296 base::Passed(
297 mojo::gfx::composition::MailboxTextureCallbackPtr::Create(
298 std::move(mailbox_texture_resource_decl->callback)))));
296 if (!image) { 299 if (!image) {
297 err << "Could not create MailboxTexture"; 300 err << "Could not create MailboxTexture";
298 return nullptr; 301 return nullptr;
299 } 302 }
300 return new ImageResourceDef(image); 303 return new ImageResourceDef(image);
301 } 304 }
302 305
303 err << "Unsupported resource type: resource_id=" << resource_id; 306 err << "Unsupported resource type: resource_id=" << resource_id;
304 return nullptr; 307 return nullptr;
305 } 308 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 391
389 SceneDef::Publication::Publication( 392 SceneDef::Publication::Publication(
390 mojo::gfx::composition::SceneMetadataPtr metadata) 393 mojo::gfx::composition::SceneMetadataPtr metadata)
391 : metadata(metadata.Pass()) { 394 : metadata(metadata.Pass()) {
392 DCHECK(this->metadata); 395 DCHECK(this->metadata);
393 } 396 }
394 397
395 SceneDef::Publication::~Publication() {} 398 SceneDef::Publication::~Publication() {}
396 399
397 } // namespace compositor 400 } // namespace compositor
OLDNEW
« no previous file with comments | « services/gfx/compositor/compositor_impl.cc ('k') | services/gfx/compositor/scene_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698