| 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 "services/ui/public/cpp/output_surface.h" | 5 #include "services/ui/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/output_surface_client.h" | 9 #include "cc/output/output_surface_client.h" |
| 10 #include "gpu/ipc/client/gpu_channel_host.h" | 10 #include "gpu/ipc/client/gpu_channel_host.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // destroyed then SubmitCompositorFrame's callback will never get called. | 63 // destroyed then SubmitCompositorFrame's callback will never get called. |
| 64 // Thus, base::Unretained is safe here. | 64 // Thus, base::Unretained is safe here. |
| 65 surface_->SubmitCompositorFrame( | 65 surface_->SubmitCompositorFrame( |
| 66 std::move(frame), | 66 std::move(frame), |
| 67 base::Bind(&OutputSurface::SwapBuffersComplete, base::Unretained(this))); | 67 base::Bind(&OutputSurface::SwapBuffersComplete, base::Unretained(this))); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void OutputSurface::OnResourcesReturned( | 70 void OutputSurface::OnResourcesReturned( |
| 71 ui::WindowSurface* surface, | 71 ui::WindowSurface* surface, |
| 72 mojo::Array<cc::ReturnedResource> resources) { | 72 mojo::Array<cc::ReturnedResource> resources) { |
| 73 ReclaimResources(resources.To<cc::ReturnedResourceArray>()); | 73 client_->ReclaimResources(resources.To<cc::ReturnedResourceArray>()); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void OutputSurface::SwapBuffersComplete() { | 76 void OutputSurface::SwapBuffersComplete() { |
| 77 client_->DidSwapBuffersComplete(); | 77 client_->DidSwapBuffersComplete(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace ui | 80 } // namespace ui |
| OLD | NEW |