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

Side by Side Diff: components/viz/service/frame_sinks/direct_layer_tree_frame_sink.cc

Issue 2951053005: Add Mojo API for Blink hit testing (Closed)
Patch Set: Address Rob's comments Created 3 years, 4 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 "components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h" 5 #include "components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/output/layer_tree_frame_sink_client.h" 9 #include "cc/output/layer_tree_frame_sink_client.h"
10 #include "components/viz/common/surfaces/frame_sink_id.h" 10 #include "components/viz/common/surfaces/frame_sink_id.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // We want the Display's output surface to hear about lost context, and since 69 // We want the Display's output surface to hear about lost context, and since
70 // this shares a context with it, we should not be listening for lost context 70 // this shares a context with it, we should not be listening for lost context
71 // callbacks on the context here. 71 // callbacks on the context here.
72 if (auto* cp = context_provider()) 72 if (auto* cp = context_provider())
73 cp->SetLostContextCallback(base::Closure()); 73 cp->SetLostContextCallback(base::Closure());
74 74
75 constexpr bool is_root = true; 75 constexpr bool is_root = true;
76 constexpr bool handles_frame_sink_id_invalidation = false; 76 constexpr bool handles_frame_sink_id_invalidation = false;
77 support_ = support_manager_->CreateCompositorFrameSinkSupport( 77 support_ = support_manager_->CreateCompositorFrameSinkSupport(
78 this, frame_sink_id_, is_root, handles_frame_sink_id_invalidation, 78 this, nullptr, frame_sink_id_, is_root,
79 handles_frame_sink_id_invalidation,
79 capabilities_.delegated_sync_points_required); 80 capabilities_.delegated_sync_points_required);
80 begin_frame_source_ = base::MakeUnique<ExternalBeginFrameSource>(this); 81 begin_frame_source_ = base::MakeUnique<ExternalBeginFrameSource>(this);
81 client_->SetBeginFrameSource(begin_frame_source_.get()); 82 client_->SetBeginFrameSource(begin_frame_source_.get());
82 83
83 // Avoid initializing GL context here, as this should be sharing the 84 // Avoid initializing GL context here, as this should be sharing the
84 // Display's context. 85 // Display's context.
85 display_->Initialize(this, frame_sink_manager_->surface_manager()); 86 display_->Initialize(this, frame_sink_manager_->surface_manager());
86 return true; 87 return true;
87 } 88 }
88 89
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 164
164 void DirectLayerTreeFrameSink::OnBeginFramePausedChanged(bool paused) { 165 void DirectLayerTreeFrameSink::OnBeginFramePausedChanged(bool paused) {
165 begin_frame_source_->OnSetBeginFrameSourcePaused(paused); 166 begin_frame_source_->OnSetBeginFrameSourcePaused(paused);
166 } 167 }
167 168
168 void DirectLayerTreeFrameSink::OnNeedsBeginFrames(bool needs_begin_frame) { 169 void DirectLayerTreeFrameSink::OnNeedsBeginFrames(bool needs_begin_frame) {
169 support_->SetNeedsBeginFrame(needs_begin_frame); 170 support_->SetNeedsBeginFrame(needs_begin_frame);
170 } 171 }
171 172
172 } // namespace viz 173 } // namespace viz
OLDNEW
« no previous file with comments | « components/viz/service/frame_sinks/compositor_frame_sink_support_manager.h ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698