OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/surfaces_app/child_gl_impl.h" | 5 #include "examples/surfaces_app/child_gl_impl.h" |
6 | 6 |
7 #ifndef GL_GLEXT_PROTOTYPES | 7 #ifndef GL_GLEXT_PROTOTYPES |
8 #define GL_GLEXT_PROTOTYPES | 8 #define GL_GLEXT_PROTOTYPES |
9 #endif | 9 #endif |
10 | 10 |
11 #include <GLES2/gl2ext.h> | 11 #include <GLES2/gl2ext.h> |
12 #include <GLES2/gl2extmojo.h> | 12 #include <GLES2/gl2extmojo.h> |
13 #include <MGL/mgl.h> | 13 #include <MGL/mgl.h> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
17 #include "cc/output/compositor_frame.h" | 17 #include "cc/output/compositor_frame.h" |
18 #include "cc/output/delegated_frame_data.h" | 18 #include "cc/output/delegated_frame_data.h" |
19 #include "cc/quads/render_pass.h" | 19 #include "cc/quads/render_pass.h" |
20 #include "cc/quads/texture_draw_quad.h" | 20 #include "cc/quads/texture_draw_quad.h" |
21 #include "examples/surfaces_app/surfaces_util.h" | 21 #include "examples/surfaces_app/surfaces_util.h" |
22 #include "gpu/command_buffer/common/mailbox.h" | 22 #include "gpu/command_buffer/common/mailbox.h" |
23 #include "gpu/command_buffer/common/mailbox_holder.h" | 23 #include "gpu/command_buffer/common/mailbox_holder.h" |
24 #include "mojo/converters/geometry/geometry_type_converters.h" | 24 #include "mojo/converters/geometry/geometry_type_converters.h" |
25 #include "mojo/converters/surfaces/surfaces_type_converters.h" | 25 #include "mojo/converters/surfaces/surfaces_type_converters.h" |
26 #include "mojo/public/cpp/application/application_connection.h" | 26 #include "mojo/public/cpp/application/application_connection.h" |
27 #include "mojo/public/cpp/environment/environment.h" | 27 #include "mojo/public/cpp/environment/environment.h" |
28 #include "mojo/services/surfaces/public/interfaces/surface_id.mojom.h" | 28 #include "mojo/services/surfaces/interfaces/surface_id.mojom.h" |
29 #include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h" | 29 #include "mojo/services/surfaces/interfaces/surfaces.mojom.h" |
30 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
31 #include "ui/gfx/transform.h" | 31 #include "ui/gfx/transform.h" |
32 | 32 |
33 namespace mojo { | 33 namespace mojo { |
34 namespace examples { | 34 namespace examples { |
35 | 35 |
36 using cc::RenderPass; | 36 using cc::RenderPass; |
37 using cc::RenderPassId; | 37 using cc::RenderPassId; |
38 using cc::TextureDrawQuad; | 38 using cc::TextureDrawQuad; |
39 using cc::DelegatedFrameData; | 39 using cc::DelegatedFrameData; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 surface_->SubmitFrame(local_id_, mojo::Frame::From(*frame), mojo::Closure()); | 198 surface_->SubmitFrame(local_id_, mojo::Frame::From(*frame), mojo::Closure()); |
199 | 199 |
200 base::MessageLoop::current()->PostDelayedTask( | 200 base::MessageLoop::current()->PostDelayedTask( |
201 FROM_HERE, | 201 FROM_HERE, |
202 base::Bind(&ChildGLImpl::Draw, base::Unretained(this)), | 202 base::Bind(&ChildGLImpl::Draw, base::Unretained(this)), |
203 base::TimeDelta::FromMilliseconds(50)); | 203 base::TimeDelta::FromMilliseconds(50)); |
204 } | 204 } |
205 | 205 |
206 } // namespace examples | 206 } // namespace examples |
207 } // namespace mojo | 207 } // namespace mojo |
OLD | NEW |