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

Side by Side Diff: content/renderer/android/synchronous_compositor_frame_sink.cc

Issue 2468633002: Replaced cc::Display::SetSurfaceId() with SetLocalFrameId() (Closed)
Patch Set: Fixed Android compile errors Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/android/synchronous_compositor_frame_sink.h" 5 #include "content/renderer/android/synchronous_compositor_frame_sink.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 base::MakeUnique<SoftwareDevice>(&current_sw_canvas_)); 177 base::MakeUnique<SoftwareDevice>(&current_sw_canvas_));
178 software_output_surface_ = output_surface.get(); 178 software_output_surface_ = output_surface.get();
179 179
180 // The shared_bitmap_manager and gpu_memory_buffer_manager here are null as 180 // The shared_bitmap_manager and gpu_memory_buffer_manager here are null as
181 // this Display is only used for resourcesless software draws, where no 181 // this Display is only used for resourcesless software draws, where no
182 // resources are included in the frame swapped from the compositor. So there 182 // resources are included in the frame swapped from the compositor. So there
183 // is no need for these. 183 // is no need for these.
184 display_.reset(new cc::Display( 184 display_.reset(new cc::Display(
185 nullptr /* shared_bitmap_manager */, 185 nullptr /* shared_bitmap_manager */,
186 nullptr /* gpu_memory_buffer_manager */, software_renderer_settings, 186 nullptr /* gpu_memory_buffer_manager */, software_renderer_settings,
187 nullptr /* begin_frame_source */, std::move(output_surface), 187 kFrameSinkId, nullptr /* begin_frame_source */, std::move(output_surface),
188 nullptr /* scheduler */, nullptr /* texture_mailbox_deleter */)); 188 nullptr /* scheduler */, nullptr /* texture_mailbox_deleter */));
189 display_->Initialize(&display_client_, surface_manager_.get(), kFrameSinkId); 189 display_->Initialize(&display_client_, surface_manager_.get());
190 display_->SetVisible(true); 190 display_->SetVisible(true);
191 return true; 191 return true;
192 } 192 }
193 193
194 void SynchronousCompositorFrameSink::DetachFromClient() { 194 void SynchronousCompositorFrameSink::DetachFromClient() {
195 DCHECK(CalledOnValidThread()); 195 DCHECK(CalledOnValidThread());
196 client_->SetBeginFrameSource(nullptr); 196 client_->SetBeginFrameSource(nullptr);
197 // Destroy the begin frame source on the same thread it was bound on. 197 // Destroy the begin frame source on the same thread it was bound on.
198 begin_frame_source_ = nullptr; 198 begin_frame_source_ = nullptr;
199 registry_->UnregisterCompositorFrameSink(routing_id_, this); 199 registry_->UnregisterCompositorFrameSink(routing_id_, this);
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 client_->ReclaimResources(resources); 462 client_->ReclaimResources(resources);
463 } 463 }
464 464
465 void SynchronousCompositorFrameSink::SetBeginFrameSource( 465 void SynchronousCompositorFrameSink::SetBeginFrameSource(
466 cc::BeginFrameSource* begin_frame_source) { 466 cc::BeginFrameSource* begin_frame_source) {
467 // Software output is synchronous and doesn't use a BeginFrameSource. 467 // Software output is synchronous and doesn't use a BeginFrameSource.
468 NOTREACHED(); 468 NOTREACHED();
469 } 469 }
470 470
471 } // namespace content 471 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698