| 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 "components/mus/public/cpp/output_surface.h" | 5 #include "components/mus/public/cpp/output_surface.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
| 9 #include "cc/output/compositor_frame_ack.h" | 9 #include "cc/output/compositor_frame_ack.h" |
| 10 #include "cc/output/output_surface_client.h" | 10 #include "cc/output/output_surface_client.h" |
| 11 #include "components/mus/public/cpp/surfaces/surfaces_type_converters.h" |
| 11 #include "components/mus/public/cpp/window_surface.h" | 12 #include "components/mus/public/cpp/window_surface.h" |
| 12 #include "mojo/converters/surfaces/surfaces_type_converters.h" | |
| 13 | 13 |
| 14 namespace mus { | 14 namespace mus { |
| 15 | 15 |
| 16 OutputSurface::OutputSurface( | 16 OutputSurface::OutputSurface( |
| 17 const scoped_refptr<cc::ContextProvider>& context_provider, | 17 const scoped_refptr<cc::ContextProvider>& context_provider, |
| 18 std::unique_ptr<mus::WindowSurface> surface) | 18 std::unique_ptr<mus::WindowSurface> surface) |
| 19 : cc::OutputSurface(context_provider, nullptr, nullptr), | 19 : cc::OutputSurface(context_provider, nullptr, nullptr), |
| 20 surface_(std::move(surface)) { | 20 surface_(std::move(surface)) { |
| 21 capabilities_.delegated_rendering = true; | 21 capabilities_.delegated_rendering = true; |
| 22 } | 22 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 51 cc::CompositorFrameAck cfa; | 51 cc::CompositorFrameAck cfa; |
| 52 cfa.resources = resources.To<cc::ReturnedResourceArray>(); | 52 cfa.resources = resources.To<cc::ReturnedResourceArray>(); |
| 53 ReclaimResources(&cfa); | 53 ReclaimResources(&cfa); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void OutputSurface::SwapBuffersComplete() { | 56 void OutputSurface::SwapBuffersComplete() { |
| 57 client_->DidSwapBuffersComplete(); | 57 client_->DidSwapBuffersComplete(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace mus | 60 } // namespace mus |
| OLD | NEW |