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