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

Side by Side Diff: mojo/cc/output_surface_mojo.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/cc/output_surface_mojo.h" 5 #include "mojo/cc/output_surface_mojo.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/output/output_surface_client.h" 8 #include "cc/output/output_surface_client.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 if (!surface_id_.is_null()) { 42 if (!surface_id_.is_null()) {
43 surface_->DestroySurface(SurfaceId::From(surface_id_)); 43 surface_->DestroySurface(SurfaceId::From(surface_id_));
44 } 44 }
45 surface_id_ = id_allocator_.GenerateId(); 45 surface_id_ = id_allocator_.GenerateId();
46 surface_->CreateSurface(SurfaceId::From(surface_id_), 46 surface_->CreateSurface(SurfaceId::From(surface_id_),
47 Size::From(frame_size)); 47 Size::From(frame_size));
48 output_surface_mojo_client_->DidCreateSurface(surface_id_); 48 output_surface_mojo_client_->DidCreateSurface(surface_id_);
49 surface_size_ = frame_size; 49 surface_size_ = frame_size;
50 } 50 }
51 51
52 surface_->SubmitFrame(SurfaceId::From(surface_id_), Frame::From(*frame)); 52 surface_->SubmitFrame(SurfaceId::From(surface_id_), Frame::From(*frame),
53 mojo::Closure());
53 54
54 client_->DidSwapBuffers(); 55 client_->DidSwapBuffers();
55 client_->DidSwapBuffersComplete(); 56 client_->DidSwapBuffersComplete();
56 } 57 }
57 58
58 } // namespace mojo 59 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698