Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ws/frame_generator.h" | 5 #include "services/ui/ws/frame_generator.h" |
| 6 | 6 |
| 7 #include "base/containers/adapters.h" | 7 #include "base/containers/adapters.h" |
| 8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
| 9 #include "cc/quads/render_pass.h" | 9 #include "cc/quads/render_pass.h" |
| 10 #include "cc/quads/render_pass_draw_quad.h" | 10 #include "cc/quads/render_pass_draw_quad.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 RemoveDeadSurfaceReferences(); | 118 RemoveDeadSurfaceReferences(); |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 void FrameGenerator::ReclaimResources( | 122 void FrameGenerator::ReclaimResources( |
| 123 const cc::ReturnedResourceArray& resources) { | 123 const cc::ReturnedResourceArray& resources) { |
| 124 // Nothing to do here because FrameGenerator CompositorFrames don't reference | 124 // Nothing to do here because FrameGenerator CompositorFrames don't reference |
| 125 // any resources. | 125 // any resources. |
| 126 } | 126 } |
| 127 | 127 |
| 128 void FrameGenerator::WillDrawSurface() { | |
| 129 // TODO(fsamuel, staraz): Implement this. | |
| 130 NOTIMPLEMENTED(); | |
|
kylechar
2016/12/05 15:18:31
This is causing lots of console spam. I think it g
| |
| 131 } | |
| 132 | |
| 128 cc::CompositorFrame FrameGenerator::GenerateCompositorFrame( | 133 cc::CompositorFrame FrameGenerator::GenerateCompositorFrame( |
| 129 const gfx::Rect& output_rect) { | 134 const gfx::Rect& output_rect) { |
| 130 const cc::RenderPassId render_pass_id(1, 1); | 135 const cc::RenderPassId render_pass_id(1, 1); |
| 131 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); | 136 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); |
| 132 render_pass->SetNew(render_pass_id, output_rect, output_rect, | 137 render_pass->SetNew(render_pass_id, output_rect, output_rect, |
| 133 gfx::Transform()); | 138 gfx::Transform()); |
| 134 | 139 |
| 135 DrawWindowTree(render_pass.get(), root_window_, gfx::Vector2d(), 1.0f); | 140 DrawWindowTree(render_pass.get(), root_window_, gfx::Vector2d(), 1.0f); |
| 136 | 141 |
| 137 cc::CompositorFrame frame; | 142 cc::CompositorFrame frame; |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 353 cc::SurfaceId underlay_surface_id = | 358 cc::SurfaceId underlay_surface_id = |
| 354 window->compositor_frame_sink_manager()->GetLatestSurfaceId( | 359 window->compositor_frame_sink_manager()->GetLatestSurfaceId( |
| 355 mojom::CompositorFrameSinkType::UNDERLAY); | 360 mojom::CompositorFrameSinkType::UNDERLAY); |
| 356 if (underlay_surface_id.is_valid()) | 361 if (underlay_surface_id.is_valid()) |
| 357 RemoveFrameSinkReference(underlay_surface_id.frame_sink_id()); | 362 RemoveFrameSinkReference(underlay_surface_id.frame_sink_id()); |
| 358 } | 363 } |
| 359 | 364 |
| 360 } // namespace ws | 365 } // namespace ws |
| 361 | 366 |
| 362 } // namespace ui | 367 } // namespace ui |
| OLD | NEW |