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

Side by Side Diff: services/ui/surfaces/gpu_compositor_frame_sink.cc

Issue 2549393003: Check client_ isn't null in GpuCompositorframeSink. (Closed)
Patch Set: Created 4 years 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 | « no previous file | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/surfaces/gpu_compositor_frame_sink.h" 5 #include "services/ui/surfaces/gpu_compositor_frame_sink.h"
6 6
7 #include "services/ui/surfaces/display_compositor.h" 7 #include "services/ui/surfaces/display_compositor.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
(...skipping 30 matching lines...) Expand all
41 support_.SetNeedsBeginFrame(needs_begin_frame); 41 support_.SetNeedsBeginFrame(needs_begin_frame);
42 } 42 }
43 43
44 void GpuCompositorFrameSink::SubmitCompositorFrame( 44 void GpuCompositorFrameSink::SubmitCompositorFrame(
45 const cc::LocalFrameId& local_frame_id, 45 const cc::LocalFrameId& local_frame_id,
46 cc::CompositorFrame frame) { 46 cc::CompositorFrame frame) {
47 support_.SubmitCompositorFrame(local_frame_id, std::move(frame)); 47 support_.SubmitCompositorFrame(local_frame_id, std::move(frame));
48 } 48 }
49 49
50 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() { 50 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() {
51 client_->DidReceiveCompositorFrameAck(); 51 if (client_)
52 client_->DidReceiveCompositorFrameAck();
52 } 53 }
53 54
54 void GpuCompositorFrameSink::AddChildFrameSink( 55 void GpuCompositorFrameSink::AddChildFrameSink(
55 const cc::FrameSinkId& child_frame_sink_id) { 56 const cc::FrameSinkId& child_frame_sink_id) {
56 support_.AddChildFrameSink(child_frame_sink_id); 57 support_.AddChildFrameSink(child_frame_sink_id);
57 } 58 }
58 59
59 void GpuCompositorFrameSink::RemoveChildFrameSink( 60 void GpuCompositorFrameSink::RemoveChildFrameSink(
60 const cc::FrameSinkId& child_frame_sink_id) { 61 const cc::FrameSinkId& child_frame_sink_id) {
61 support_.RemoveChildFrameSink(child_frame_sink_id); 62 support_.RemoveChildFrameSink(child_frame_sink_id);
(...skipping 23 matching lines...) Expand all
85 } 86 }
86 87
87 void GpuCompositorFrameSink::OnPrivateConnectionLost() { 88 void GpuCompositorFrameSink::OnPrivateConnectionLost() {
88 private_connection_lost_ = true; 89 private_connection_lost_ = true;
89 // Request destruction of |this| only if both connections are lost. 90 // Request destruction of |this| only if both connections are lost.
90 display_compositor_->OnCompositorFrameSinkPrivateConnectionLost( 91 display_compositor_->OnCompositorFrameSinkPrivateConnectionLost(
91 support_.frame_sink_id(), client_connection_lost_); 92 support_.frame_sink_id(), client_connection_lost_);
92 } 93 }
93 94
94 } // namespace ui 95 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698