| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ws/server_window_surface.h" | 5 #include "components/mus/ws/server_window_surface.h" |
| 6 | 6 |
| 7 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
| 8 #include "cc/quads/shared_quad_state.h" | 8 #include "cc/quads/shared_quad_state.h" |
| 9 #include "cc/quads/surface_draw_quad.h" | 9 #include "cc/quads/surface_draw_quad.h" |
| 10 #include "components/mus/surfaces/surfaces_state.h" | 10 #include "components/mus/surfaces/surfaces_state.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 underlay_quad->SetAll(sqs, input->rect.To<gfx::Rect>(), | 148 underlay_quad->SetAll(sqs, input->rect.To<gfx::Rect>(), |
| 149 input->opaque_rect.To<gfx::Rect>(), | 149 input->opaque_rect.To<gfx::Rect>(), |
| 150 input->visible_rect.To<gfx::Rect>(), | 150 input->visible_rect.To<gfx::Rect>(), |
| 151 input->needs_blending, underlay_surface->id()); | 151 input->needs_blending, underlay_surface->id()); |
| 152 } | 152 } |
| 153 return true; | 153 return true; |
| 154 } | 154 } |
| 155 | 155 |
| 156 void ServerWindowSurface::ReturnResources( | 156 void ServerWindowSurface::ReturnResources( |
| 157 const cc::ReturnedResourceArray& resources) { | 157 const cc::ReturnedResourceArray& resources) { |
| 158 if (!client_) | 158 if (!client_ || !base::MessageLoop::current()) |
| 159 return; | 159 return; |
| 160 client_->ReturnResources( | 160 client_->ReturnResources( |
| 161 mojo::Array<mojom::ReturnedResourcePtr>::From(resources)); | 161 mojo::Array<mojom::ReturnedResourcePtr>::From(resources)); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void ServerWindowSurface::SetBeginFrameSource( | 164 void ServerWindowSurface::SetBeginFrameSource( |
| 165 cc::BeginFrameSource* begin_frame_source) { | 165 cc::BeginFrameSource* begin_frame_source) { |
| 166 // TODO(tansell): Implement this. | 166 // TODO(tansell): Implement this. |
| 167 } | 167 } |
| 168 | 168 |
| 169 } // namespace ws | 169 } // namespace ws |
| 170 } // namespace mus | 170 } // namespace mus |
| OLD | NEW |