Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: services/ui/ws/frame_generator.cc

Issue 2683583005: Move display_ From CompositorFrameSinkSupport To GpuDisplayCompositorFrameSink (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/adapters.h" 10 #include "base/containers/adapters.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 gfx::Size frame_size = last_submitted_frame_size_; 85 gfx::Size frame_size = last_submitted_frame_size_;
86 if (!frame.render_pass_list.empty()) 86 if (!frame.render_pass_list.empty())
87 frame_size = frame.render_pass_list[0]->output_rect.size(); 87 frame_size = frame.render_pass_list[0]->output_rect.size();
88 88
89 if (!local_surface_id_.is_valid() || 89 if (!local_surface_id_.is_valid() ||
90 frame_size != last_submitted_frame_size_) { 90 frame_size != last_submitted_frame_size_) {
91 local_surface_id_ = id_allocator_.GenerateId(); 91 local_surface_id_ = id_allocator_.GenerateId();
92 display_private_->ResizeDisplay(frame_size); 92 display_private_->ResizeDisplay(frame_size);
93 } 93 }
94 94
95 display_private_->SetLocalSurfaceId(local_surface_id_,
96 device_scale_factor_);
95 compositor_frame_sink_->SubmitCompositorFrame(local_surface_id_, 97 compositor_frame_sink_->SubmitCompositorFrame(local_surface_id_,
96 std::move(frame)); 98 std::move(frame));
97 compositor_frame_sink_->SetNeedsBeginFrame(false); 99 compositor_frame_sink_->SetNeedsBeginFrame(false);
98 last_submitted_frame_size_ = frame_size; 100 last_submitted_frame_size_ = frame_size;
99 } 101 }
100 } 102 }
101 103
102 void FrameGenerator::ReclaimResources( 104 void FrameGenerator::ReclaimResources(
103 const cc::ReturnedResourceArray& resources) { 105 const cc::ReturnedResourceArray& resources) {
104 // Nothing to do here because FrameGenerator CompositorFrames don't reference 106 // Nothing to do here because FrameGenerator CompositorFrames don't reference
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 0 /* sorting-context_id */); 178 0 /* sorting-context_id */);
177 auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>(); 179 auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>();
178 quad->SetAll(sqs, bounds_at_origin /* rect */, gfx::Rect() /* opaque_rect */, 180 quad->SetAll(sqs, bounds_at_origin /* rect */, gfx::Rect() /* opaque_rect */,
179 bounds_at_origin /* visible_rect */, true /* needs_blending*/, 181 bounds_at_origin /* visible_rect */, true /* needs_blending*/,
180 window_manager_surface_info_.id()); 182 window_manager_surface_info_.id());
181 } 183 }
182 184
183 } // namespace ws 185 } // namespace ws
184 186
185 } // namespace ui 187 } // namespace ui
OLDNEW
« no previous file with comments | « content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698