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

Side by Side Diff: services/ui/public/cpp/window_compositor_frame_sink.cc

Issue 2661543002: Rename LocalFrameId to LocalSurfaceId (Closed)
Patch Set: c 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/public/cpp/window_compositor_frame_sink.h" 5 #include "services/ui/public/cpp/window_compositor_frame_sink.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_sink_client.h" 10 #include "cc/output/compositor_frame_sink_client.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void WindowCompositorFrameSink::SubmitCompositorFrame( 64 void WindowCompositorFrameSink::SubmitCompositorFrame(
65 cc::CompositorFrame frame) { 65 cc::CompositorFrame frame) {
66 DCHECK(thread_checker_); 66 DCHECK(thread_checker_);
67 DCHECK(thread_checker_->CalledOnValidThread()); 67 DCHECK(thread_checker_->CalledOnValidThread());
68 if (!compositor_frame_sink_) 68 if (!compositor_frame_sink_)
69 return; 69 return;
70 70
71 gfx::Size frame_size = last_submitted_frame_size_; 71 gfx::Size frame_size = last_submitted_frame_size_;
72 if (!frame.render_pass_list.empty()) 72 if (!frame.render_pass_list.empty())
73 frame_size = frame.render_pass_list[0]->output_rect.size(); 73 frame_size = frame.render_pass_list[0]->output_rect.size();
74 if (!local_frame_id_.is_valid() || frame_size != last_submitted_frame_size_) 74 if (!local_surface_id_.is_valid() || frame_size != last_submitted_frame_size_)
75 local_frame_id_ = id_allocator_.GenerateId(); 75 local_surface_id_ = id_allocator_.GenerateId();
76 76
77 compositor_frame_sink_->SubmitCompositorFrame(local_frame_id_, 77 compositor_frame_sink_->SubmitCompositorFrame(local_surface_id_,
78 std::move(frame)); 78 std::move(frame));
79 79
80 last_submitted_frame_size_ = frame_size; 80 last_submitted_frame_size_ = frame_size;
81 } 81 }
82 82
83 WindowCompositorFrameSink::WindowCompositorFrameSink( 83 WindowCompositorFrameSink::WindowCompositorFrameSink(
84 const cc::FrameSinkId& frame_sink_id, 84 const cc::FrameSinkId& frame_sink_id,
85 scoped_refptr<cc::ContextProvider> context_provider, 85 scoped_refptr<cc::ContextProvider> context_provider,
86 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 86 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
87 cc::mojom::MojoCompositorFrameSinkPtrInfo compositor_frame_sink_info, 87 cc::mojom::MojoCompositorFrameSinkPtrInfo compositor_frame_sink_info,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 WindowCompositorFrameSinkBinding::TakeFrameSinkRequest() { 137 WindowCompositorFrameSinkBinding::TakeFrameSinkRequest() {
138 return std::move(compositor_frame_sink_request_); 138 return std::move(compositor_frame_sink_request_);
139 } 139 }
140 140
141 cc::mojom::MojoCompositorFrameSinkClientPtrInfo 141 cc::mojom::MojoCompositorFrameSinkClientPtrInfo
142 WindowCompositorFrameSinkBinding::TakeFrameSinkClient() { 142 WindowCompositorFrameSinkBinding::TakeFrameSinkClient() {
143 return std::move(compositor_frame_sink_client_); 143 return std::move(compositor_frame_sink_client_);
144 } 144 }
145 145
146 } // namespace ui 146 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window_compositor_frame_sink.h ('k') | services/ui/surfaces/display_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698