Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: mojo/services/native_viewport/viewport_surface.cc

Issue 756673004: Surfaces should acknowledge frame submissions (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698