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 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
16 #include "mojo/ui/base_view.h" | 16 #include "mojo/ui/base_view.h" |
17 #include "mojo/ui/choreographer.h" | 17 #include "mojo/ui/choreographer.h" |
18 #include "skia/ext/refptr.h" | 18 #include "skia/ext/refptr.h" |
19 | 19 |
20 class SkPicture; | 20 class SkPicture; |
21 | 21 |
22 namespace examples { | 22 namespace examples { |
23 | 23 |
24 class Frame; | 24 class Frame; |
25 class Rasterizer; | 25 class Rasterizer; |
26 | 26 |
27 class NoodlesView : public mojo::ui::BaseView, | 27 class NoodlesView : public mojo::ui::BaseView, |
28 public mojo::ui::ChoreographerDelegate { | 28 public mojo::ui::ChoreographerDelegate { |
29 public: | 29 public: |
30 NoodlesView(mojo::ApplicationImpl* app_impl, | 30 NoodlesView(mojo::InterfaceHandle<mojo::ApplicationConnector> app_connector, |
31 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request); | 31 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request); |
32 | 32 |
33 ~NoodlesView() override; | 33 ~NoodlesView() override; |
34 | 34 |
35 private: | 35 private: |
36 // Frame queue, held by a std::shared_ptr. | 36 // Frame queue, held by a std::shared_ptr. |
37 // This object acts as a shared fifo between both threads. | 37 // This object acts as a shared fifo between both threads. |
38 class FrameQueue { | 38 class FrameQueue { |
39 public: | 39 public: |
40 FrameQueue(); | 40 FrameQueue(); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 double alpha_ = 0.0; | 97 double alpha_ = 0.0; |
98 int wx_ = 2; | 98 int wx_ = 2; |
99 int wy_ = 3; | 99 int wy_ = 3; |
100 | 100 |
101 DISALLOW_COPY_AND_ASSIGN(NoodlesView); | 101 DISALLOW_COPY_AND_ASSIGN(NoodlesView); |
102 }; | 102 }; |
103 | 103 |
104 } // namespace examples | 104 } // namespace examples |
105 | 105 |
106 #endif // EXAMPLES_UI_NOODLES_NOODLES_VIEW_H_ | 106 #endif // EXAMPLES_UI_NOODLES_NOODLES_VIEW_H_ |
OLD | NEW |