| 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 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 vertex_opacity, | 170 vertex_opacity, |
| 171 false); | 171 false); |
| 172 | 172 |
| 173 scoped_ptr<DelegatedFrameData> delegated_frame_data(new DelegatedFrameData); | 173 scoped_ptr<DelegatedFrameData> delegated_frame_data(new DelegatedFrameData); |
| 174 delegated_frame_data->render_pass_list.push_back(pass.Pass()); | 174 delegated_frame_data->render_pass_list.push_back(pass.Pass()); |
| 175 delegated_frame_data->resource_list.push_back(resource); | 175 delegated_frame_data->resource_list.push_back(resource); |
| 176 | 176 |
| 177 scoped_ptr<CompositorFrame> frame(new CompositorFrame); | 177 scoped_ptr<CompositorFrame> frame(new CompositorFrame); |
| 178 frame->delegated_frame_data = delegated_frame_data.Pass(); | 178 frame->delegated_frame_data = delegated_frame_data.Pass(); |
| 179 | 179 |
| 180 surface_->SubmitFrame(mojo::SurfaceId::From(id_), mojo::Frame::From(*frame)); | 180 surface_->SubmitFrame(mojo::SurfaceId::From(id_), mojo::Frame::From(*frame), |
| 181 mojo::Closure()); |
| 181 | 182 |
| 182 base::MessageLoop::current()->PostDelayedTask( | 183 base::MessageLoop::current()->PostDelayedTask( |
| 183 FROM_HERE, | 184 FROM_HERE, |
| 184 base::Bind(&ChildGLImpl::Draw, base::Unretained(this)), | 185 base::Bind(&ChildGLImpl::Draw, base::Unretained(this)), |
| 185 base::TimeDelta::FromMilliseconds(50)); | 186 base::TimeDelta::FromMilliseconds(50)); |
| 186 } | 187 } |
| 187 | 188 |
| 188 } // namespace examples | 189 } // namespace examples |
| 189 } // namespace mojo | 190 } // namespace mojo |
| OLD | NEW |