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

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

Issue 2430653002: Mus+Ash: Towards Unifying CompositorFrameSink terminology (Closed)
Patch Set: Fix bitmap_uploader Created 4 years, 2 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 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_surface_manager.h" 5 #include "services/ui/ws/server_window_surface_manager.h"
6 6
7 #include "services/ui/surfaces/display_compositor.h" 7 #include "services/ui/surfaces/display_compositor.h"
8 #include "services/ui/ws/ids.h" 8 #include "services/ui/ws/ids.h"
9 #include "services/ui/ws/server_window.h" 9 #include "services/ui/ws/server_window.h"
10 #include "services/ui/ws/server_window_delegate.h" 10 #include "services/ui/ws/server_window_delegate.h"
(...skipping 20 matching lines...) Expand all
31 return true; 31 return true;
32 32
33 waiting_for_initial_frames_ = 33 waiting_for_initial_frames_ =
34 !IsSurfaceReadyAndNonEmpty(mojom::SurfaceType::DEFAULT) || 34 !IsSurfaceReadyAndNonEmpty(mojom::SurfaceType::DEFAULT) ||
35 !IsSurfaceReadyAndNonEmpty(mojom::SurfaceType::UNDERLAY); 35 !IsSurfaceReadyAndNonEmpty(mojom::SurfaceType::UNDERLAY);
36 return !waiting_for_initial_frames_; 36 return !waiting_for_initial_frames_;
37 } 37 }
38 38
39 void ServerWindowSurfaceManager::CreateSurface( 39 void ServerWindowSurfaceManager::CreateSurface(
40 mojom::SurfaceType surface_type, 40 mojom::SurfaceType surface_type,
41 mojo::InterfaceRequest<mojom::Surface> request, 41 mojo::InterfaceRequest<cc::mojom::MojoCompositorFrameSink> request,
42 mojom::SurfaceClientPtr client) { 42 cc::mojom::MojoCompositorFrameSinkClientPtr client) {
43 cc::FrameSinkId frame_sink_id(WindowIdToTransportId(window_->id()), 43 cc::FrameSinkId frame_sink_id(WindowIdToTransportId(window_->id()),
44 static_cast<uint32_t>(surface_type)); 44 static_cast<uint32_t>(surface_type));
45 std::unique_ptr<ServerWindowSurface> surface(new ServerWindowSurface( 45 std::unique_ptr<ServerWindowSurface> surface(new ServerWindowSurface(
46 this, frame_sink_id, std::move(request), std::move(client))); 46 this, frame_sink_id, std::move(request), std::move(client)));
47 type_to_surface_map_[surface_type] = std::move(surface); 47 type_to_surface_map_[surface_type] = std::move(surface);
48 } 48 }
49 49
50 ServerWindowSurface* ServerWindowSurfaceManager::GetDefaultSurface() const { 50 ServerWindowSurface* ServerWindowSurfaceManager::GetDefaultSurface() const {
51 return GetSurfaceByType(mojom::SurfaceType::DEFAULT); 51 return GetSurfaceByType(mojom::SurfaceType::DEFAULT);
52 } 52 }
(...skipping 29 matching lines...) Expand all
82 if (iter->second->last_submitted_frame_size().IsEmpty()) 82 if (iter->second->last_submitted_frame_size().IsEmpty())
83 return false; 83 return false;
84 const gfx::Size& last_submitted_frame_size = 84 const gfx::Size& last_submitted_frame_size =
85 iter->second->last_submitted_frame_size(); 85 iter->second->last_submitted_frame_size();
86 return last_submitted_frame_size.width() >= window_->bounds().width() && 86 return last_submitted_frame_size.width() >= window_->bounds().width() &&
87 last_submitted_frame_size.height() >= window_->bounds().height(); 87 last_submitted_frame_size.height() >= window_->bounds().height();
88 } 88 }
89 89
90 } // namespace ws 90 } // namespace ws
91 } // namespace ui 91 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698