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

Unified Diff: components/viz/client/client_compositor_frame_sink.cc

Issue 2875753002: Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: Update Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/viz/client/client_compositor_frame_sink.cc
diff --git a/components/viz/client/client_compositor_frame_sink.cc b/components/viz/client/client_compositor_frame_sink.cc
index df0ad3f928eb32b6699386d8c3f8eb223a4fb50b..43874b0a5ae34bc579eb754687ec323d26aee0aa 100644
--- a/components/viz/client/client_compositor_frame_sink.cc
+++ b/components/viz/client/client_compositor_frame_sink.cc
@@ -24,12 +24,18 @@ ClientCompositorFrameSink::ClientCompositorFrameSink(
nullptr),
compositor_frame_sink_info_(std::move(compositor_frame_sink_info)),
client_request_(std::move(client_request)),
- enable_surface_synchronization_(enable_surface_synchronization) {
+ enable_surface_synchronization_(enable_surface_synchronization),
+ weak_factory_(this) {
DETACH_FROM_THREAD(thread_checker_);
}
ClientCompositorFrameSink::~ClientCompositorFrameSink() {}
+base::WeakPtr<ClientCompositorFrameSink>
+ClientCompositorFrameSink::GetWeakPtr() {
Fady Samuel 2017/06/07 17:36:26 DCHECK_CALLED_ON_VALID_THREAD too?
Peng 2017/06/07 19:30:29 Done.
+ return weak_factory_.GetWeakPtr();
+}
+
bool ClientCompositorFrameSink::BindToClient(
cc::CompositorFrameSinkClient* client) {
if (!cc::CompositorFrameSink::BindToClient(client))
@@ -57,6 +63,7 @@ void ClientCompositorFrameSink::DetachFromClient() {
void ClientCompositorFrameSink::SetLocalSurfaceId(
const cc::LocalSurfaceId& local_surface_id) {
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK(local_surface_id.is_valid());
DCHECK(enable_surface_synchronization_);
local_surface_id_ = local_surface_id;

Powered by Google App Engine
This is Rietveld 408576698