| 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/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 Loading... |
| 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 |
| OLD | NEW |