OLD | NEW |
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 | 10 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 NoodlesView::RasterizerDelegate::RasterizerDelegate( | 162 NoodlesView::RasterizerDelegate::RasterizerDelegate( |
163 const std::shared_ptr<FrameQueue>& frame_queue) | 163 const std::shared_ptr<FrameQueue>& frame_queue) |
164 : frame_queue_(frame_queue) { | 164 : frame_queue_(frame_queue) { |
165 DCHECK(frame_queue_); | 165 DCHECK(frame_queue_); |
166 } | 166 } |
167 | 167 |
168 NoodlesView::RasterizerDelegate::~RasterizerDelegate() {} | 168 NoodlesView::RasterizerDelegate::~RasterizerDelegate() {} |
169 | 169 |
170 void NoodlesView::RasterizerDelegate::CreateRasterizer( | 170 void NoodlesView::RasterizerDelegate::CreateRasterizer( |
171 mojo::InterfacePtrInfo<mojo::ApplicationConnector> connector_info, | 171 mojo::InterfaceHandle<mojo::ApplicationConnector> connector_info, |
172 mojo::InterfacePtrInfo<mojo::gfx::composition::Scene> scene_info) { | 172 mojo::InterfaceHandle<mojo::gfx::composition::Scene> scene_info) { |
173 rasterizer_.reset( | 173 rasterizer_.reset( |
174 new Rasterizer(mojo::MakeProxy(connector_info.Pass()).Pass(), | 174 new Rasterizer(mojo::MakeProxy(connector_info.Pass()).Pass(), |
175 mojo::MakeProxy(scene_info.Pass()).Pass())); | 175 mojo::MakeProxy(scene_info.Pass()).Pass())); |
176 } | 176 } |
177 | 177 |
178 void NoodlesView::RasterizerDelegate::PublishNextFrame() { | 178 void NoodlesView::RasterizerDelegate::PublishNextFrame() { |
179 std::unique_ptr<Frame> frame(frame_queue_->TakeFrame()); | 179 std::unique_ptr<Frame> frame(frame_queue_->TakeFrame()); |
180 DCHECK(frame); | 180 DCHECK(frame); |
181 rasterizer_->PublishFrame(std::move(frame)); | 181 rasterizer_->PublishFrame(std::move(frame)); |
182 } | 182 } |
183 | 183 |
184 } // namespace examples | 184 } // namespace examples |
OLD | NEW |