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 "mojo/services/native_viewport/viewport_surface.h" | 5 #include "mojo/services/native_viewport/viewport_surface.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "cc/surfaces/surface_id_allocator.h" | 8 #include "cc/surfaces/surface_id_allocator.h" |
9 #include "mojo/converters/geometry/geometry_type_converters.h" | 9 #include "mojo/converters/geometry/geometry_type_converters.h" |
10 #include "mojo/converters/surfaces/surfaces_type_converters.h" | 10 #include "mojo/converters/surfaces/surfaces_type_converters.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 PassPtr pass = CreateDefaultPass(1, *mojo::Rect::From(bounds)); | 96 PassPtr pass = CreateDefaultPass(1, *mojo::Rect::From(bounds)); |
97 | 97 |
98 pass->quads.push_back(surface_quad.Pass()); | 98 pass->quads.push_back(surface_quad.Pass()); |
99 pass->shared_quad_states.push_back(CreateDefaultSQS( | 99 pass->shared_quad_states.push_back(CreateDefaultSQS( |
100 *mojo::Size::From(size_))); | 100 *mojo::Size::From(size_))); |
101 | 101 |
102 FramePtr frame = Frame::New(); | 102 FramePtr frame = Frame::New(); |
103 frame->passes.push_back(pass.Pass()); | 103 frame->passes.push_back(pass.Pass()); |
104 frame->resources.resize(0u); | 104 frame->resources.resize(0u); |
105 surface_->SubmitFrame(SurfaceId::From(id_), frame.Pass()); | 105 surface_->SubmitFrame(SurfaceId::From(id_), frame.Pass(), mojo::Closure()); |
106 } | 106 } |
107 | 107 |
108 void ViewportSurface::ReturnResources(Array<ReturnedResourcePtr> resources) { | 108 void ViewportSurface::ReturnResources(Array<ReturnedResourcePtr> resources) { |
109 // We never submit resources so we should never get any back. | 109 // We never submit resources so we should never get any back. |
110 DCHECK_EQ(0u, resources.size()); | 110 DCHECK_EQ(0u, resources.size()); |
111 } | 111 } |
112 | 112 |
113 } // namespace mojo | 113 } // namespace mojo |
OLD | NEW |