| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/containers/adapters.h" | 9 #include "base/containers/adapters.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 cc::FilterOperations filters; | 145 cc::FilterOperations filters; |
| 146 filters.Append(cc::FilterOperation::CreateInvertFilter(1.f)); | 146 filters.Append(cc::FilterOperation::CreateInvertFilter(1.f)); |
| 147 quad->SetNew(shared_state, output_rect, output_rect, render_pass_id, | 147 quad->SetNew(shared_state, output_rect, output_rect, render_pass_id, |
| 148 0 /* mask_resource_id */, gfx::Vector2dF() /* mask_uv_scale */, | 148 0 /* mask_resource_id */, gfx::Vector2dF() /* mask_uv_scale */, |
| 149 gfx::Size() /* mask_texture_size */, filters, | 149 gfx::Size() /* mask_texture_size */, filters, |
| 150 gfx::Vector2dF() /* filters_scale */, | 150 gfx::Vector2dF() /* filters_scale */, |
| 151 gfx::PointF() /* filters_origin */, | 151 gfx::PointF() /* filters_origin */, |
| 152 cc::FilterOperations() /* background_filters */); | 152 cc::FilterOperations() /* background_filters */); |
| 153 frame.render_pass_list.push_back(std::move(invert_pass)); | 153 frame.render_pass_list.push_back(std::move(invert_pass)); |
| 154 } | 154 } |
| 155 frame.metadata.device_scale_factor = device_scale_factor_; |
| 155 | 156 |
| 156 return frame; | 157 return frame; |
| 157 } | 158 } |
| 158 | 159 |
| 159 void FrameGenerator::DrawWindowTree( | 160 void FrameGenerator::DrawWindowTree( |
| 160 cc::RenderPass* pass, | 161 cc::RenderPass* pass, |
| 161 ServerWindow* window, | 162 ServerWindow* window, |
| 162 const gfx::Vector2d& parent_to_root_origin_offset, | 163 const gfx::Vector2d& parent_to_root_origin_offset, |
| 163 float opacity) { | 164 float opacity) { |
| 164 if (!window->visible()) | 165 if (!window->visible()) |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 cc::SurfaceId underlay_surface_id = | 344 cc::SurfaceId underlay_surface_id = |
| 344 window->compositor_frame_sink_manager()->GetLatestSurfaceId( | 345 window->compositor_frame_sink_manager()->GetLatestSurfaceId( |
| 345 mojom::CompositorFrameSinkType::UNDERLAY); | 346 mojom::CompositorFrameSinkType::UNDERLAY); |
| 346 if (underlay_surface_id.is_valid()) | 347 if (underlay_surface_id.is_valid()) |
| 347 RemoveFrameSinkReference(underlay_surface_id.frame_sink_id()); | 348 RemoveFrameSinkReference(underlay_surface_id.frame_sink_id()); |
| 348 } | 349 } |
| 349 | 350 |
| 350 } // namespace ws | 351 } // namespace ws |
| 351 | 352 |
| 352 } // namespace ui | 353 } // namespace ui |
| OLD | NEW |