| 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 #ifndef EXAMPLES_UI_NOODLES_NOODLES_VIEW_H_ | 5 #ifndef EXAMPLES_UI_NOODLES_NOODLES_VIEW_H_ |
| 6 #define EXAMPLES_UI_NOODLES_NOODLES_VIEW_H_ | 6 #define EXAMPLES_UI_NOODLES_NOODLES_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <mutex> | 9 #include <mutex> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 DISALLOW_COPY_AND_ASSIGN(FrameQueue); | 55 DISALLOW_COPY_AND_ASSIGN(FrameQueue); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 // Wrapper around state which is only accessible by the rasterizer thread. | 58 // Wrapper around state which is only accessible by the rasterizer thread. |
| 59 class RasterizerDelegate { | 59 class RasterizerDelegate { |
| 60 public: | 60 public: |
| 61 explicit RasterizerDelegate(const std::shared_ptr<FrameQueue>& frame_queue); | 61 explicit RasterizerDelegate(const std::shared_ptr<FrameQueue>& frame_queue); |
| 62 ~RasterizerDelegate(); | 62 ~RasterizerDelegate(); |
| 63 | 63 |
| 64 void CreateRasterizer( | 64 void CreateRasterizer( |
| 65 mojo::InterfacePtrInfo<mojo::ApplicationConnector> connector_info, | 65 mojo::InterfaceHandle<mojo::ApplicationConnector> connector_info, |
| 66 mojo::InterfacePtrInfo<mojo::gfx::composition::Scene> scene_info); | 66 mojo::InterfaceHandle<mojo::gfx::composition::Scene> scene_info); |
| 67 | 67 |
| 68 void PublishNextFrame(); | 68 void PublishNextFrame(); |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 std::shared_ptr<FrameQueue> frame_queue_; | 71 std::shared_ptr<FrameQueue> frame_queue_; |
| 72 std::unique_ptr<Rasterizer> rasterizer_; | 72 std::unique_ptr<Rasterizer> rasterizer_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(RasterizerDelegate); | 74 DISALLOW_COPY_AND_ASSIGN(RasterizerDelegate); |
| 75 }; | 75 }; |
| 76 | 76 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 100 double alpha_ = 0.0; | 100 double alpha_ = 0.0; |
| 101 int wx_ = 2; | 101 int wx_ = 2; |
| 102 int wy_ = 3; | 102 int wy_ = 3; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(NoodlesView); | 104 DISALLOW_COPY_AND_ASSIGN(NoodlesView); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace examples | 107 } // namespace examples |
| 108 | 108 |
| 109 #endif // EXAMPLES_UI_NOODLES_NOODLES_VIEW_H_ | 109 #endif // EXAMPLES_UI_NOODLES_NOODLES_VIEW_H_ |
| OLD | NEW |