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

Side by Side Diff: examples/ui/noodles/noodles_view.cc

Issue 1677753002: Mojo C++ bindings: InterfacePtr::PassInterface -> PassInterfaceHandle (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 | « examples/spinning_cube/gles2_client_impl.cc ('k') | mojo/gpu/gl_context.cc » ('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 "examples/ui/noodles/noodles_view.h" 5 #include "examples/ui/noodles/noodles_view.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <cstdlib> 9 #include <cstdlib>
10 #include <utility> 10 #include <utility>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 rasterizer_thread_.reset(new base::Thread("noodles_rasterizer")); 62 rasterizer_thread_.reset(new base::Thread("noodles_rasterizer"));
63 rasterizer_thread_->StartWithOptions(options); 63 rasterizer_thread_->StartWithOptions(options);
64 rasterizer_task_runner_ = rasterizer_thread_->message_loop()->task_runner(); 64 rasterizer_task_runner_ = rasterizer_thread_->message_loop()->task_runner();
65 65
66 rasterizer_task_runner_->PostTask( 66 rasterizer_task_runner_->PostTask(
67 FROM_HERE, 67 FROM_HERE,
68 base::Bind(&RasterizerDelegate::CreateRasterizer, 68 base::Bind(&RasterizerDelegate::CreateRasterizer,
69 base::Unretained(rasterizer_delegate_.get()), 69 base::Unretained(rasterizer_delegate_.get()),
70 base::Passed(app_impl->CreateApplicationConnector()), 70 base::Passed(app_impl->CreateApplicationConnector()),
71 base::Passed(TakeScene().PassInterface()))); 71 base::Passed(TakeScene().PassInterfaceHandle())));
72 } 72 }
73 73
74 NoodlesView::~NoodlesView() { 74 NoodlesView::~NoodlesView() {
75 // Ensure destruction happens on the correct thread. 75 // Ensure destruction happens on the correct thread.
76 rasterizer_task_runner_->PostTask( 76 rasterizer_task_runner_->PostTask(
77 FROM_HERE, base::Bind(&Drop<RasterizerDelegate>, 77 FROM_HERE, base::Bind(&Drop<RasterizerDelegate>,
78 base::Passed(&rasterizer_delegate_))); 78 base::Passed(&rasterizer_delegate_)));
79 } 79 }
80 80
81 void NoodlesView::OnLayout(mojo::ui::ViewLayoutParamsPtr layout_params, 81 void NoodlesView::OnLayout(mojo::ui::ViewLayoutParamsPtr layout_params,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 mojo::gfx::composition::ScenePtr::Create(std::move(scene_info)))); 176 mojo::gfx::composition::ScenePtr::Create(std::move(scene_info))));
177 } 177 }
178 178
179 void NoodlesView::RasterizerDelegate::PublishNextFrame() { 179 void NoodlesView::RasterizerDelegate::PublishNextFrame() {
180 std::unique_ptr<Frame> frame(frame_queue_->TakeFrame()); 180 std::unique_ptr<Frame> frame(frame_queue_->TakeFrame());
181 DCHECK(frame); 181 DCHECK(frame);
182 rasterizer_->PublishFrame(std::move(frame)); 182 rasterizer_->PublishFrame(std::move(frame));
183 } 183 }
184 184
185 } // namespace examples 185 } // namespace examples
OLDNEW
« no previous file with comments | « examples/spinning_cube/gles2_client_impl.cc ('k') | mojo/gpu/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698