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

Side by Side Diff: services/ui/ws/server_window_compositor_frame_sink_manager.cc

Issue 2580063002: Mustash: Ensure surfaces submitted to Mus by WM and embedders contain Surfaces with embeded content. (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
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/ws/server_window_compositor_frame_sink_manager.h" 5 #include "services/ui/ws/server_window_compositor_frame_sink_manager.h"
6 6
7 #include "cc/ipc/display_compositor.mojom.h" 7 #include "cc/ipc/display_compositor.mojom.h"
8 #include "mojo/public/cpp/bindings/strong_binding.h" 8 #include "mojo/public/cpp/bindings/strong_binding.h"
9 #include "services/ui/ws/ids.h" 9 #include "services/ui/ws/ids.h"
10 #include "services/ui/ws/server_window.h" 10 #include "services/ui/ws/server_window.h"
(...skipping 10 matching lines...) Expand all
21 0) {} 21 0) {}
22 22
23 ServerWindowCompositorFrameSinkManager:: 23 ServerWindowCompositorFrameSinkManager::
24 ~ServerWindowCompositorFrameSinkManager() { 24 ~ServerWindowCompositorFrameSinkManager() {
25 } 25 }
26 26
27 bool ServerWindowCompositorFrameSinkManager::ShouldDraw() { 27 bool ServerWindowCompositorFrameSinkManager::ShouldDraw() {
28 if (!waiting_for_initial_frames_) 28 if (!waiting_for_initial_frames_)
29 return true; 29 return true;
30 30
31 waiting_for_initial_frames_ = !IsCompositorFrameSinkReadyAndNonEmpty( 31 waiting_for_initial_frames_ = !IsCompositorFrameSinkReadyAndNonEmpty(
sky 2016/12/16 21:50:29 Can we replace waiting_for_initial_frames_ with Is
mfomitchev 2016/12/23 00:03:49 Actually, it seems like currently this is always f
32 mojom::CompositorFrameSinkType::DEFAULT) || 32 mojom::CompositorFrameSinkType::DEFAULT);
33 !IsCompositorFrameSinkReadyAndNonEmpty(
34 mojom::CompositorFrameSinkType::UNDERLAY);
35 return !waiting_for_initial_frames_; 33 return !waiting_for_initial_frames_;
36 } 34 }
37 35
38 void ServerWindowCompositorFrameSinkManager::CreateDisplayCompositorFrameSink( 36 void ServerWindowCompositorFrameSinkManager::CreateDisplayCompositorFrameSink(
39 gfx::AcceleratedWidget widget, 37 gfx::AcceleratedWidget widget,
40 cc::mojom::MojoCompositorFrameSinkRequest request, 38 cc::mojom::MojoCompositorFrameSinkRequest request,
41 cc::mojom::MojoCompositorFrameSinkClientPtr client) { 39 cc::mojom::MojoCompositorFrameSinkClientPtr client) {
42 CreateCompositorFrameSinkInternal(mojom::CompositorFrameSinkType::DEFAULT, 40 CreateCompositorFrameSinkInternal(mojom::CompositorFrameSinkType::DEFAULT,
43 widget, std::move(request), 41 widget, std::move(request),
44 std::move(client)); 42 std::move(client));
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 196
199 CompositorFrameSinkData& CompositorFrameSinkData::operator=( 197 CompositorFrameSinkData& CompositorFrameSinkData::operator=(
200 CompositorFrameSinkData&& other) { 198 CompositorFrameSinkData&& other) {
201 latest_submitted_surface_id = other.latest_submitted_surface_id; 199 latest_submitted_surface_id = other.latest_submitted_surface_id;
202 compositor_frame_sink = std::move(other.compositor_frame_sink); 200 compositor_frame_sink = std::move(other.compositor_frame_sink);
203 return *this; 201 return *this;
204 } 202 }
205 203
206 } // namespace ws 204 } // namespace ws
207 } // namespace ui 205 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698