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

Side by Side Diff: cc/surfaces/direct_compositor_frame_sink.cc

Issue 2452483002: Move GpuMemoryBufferManager and SharedBitmapManager to CompositorFrameSink (Closed)
Patch Set: rebase Created 4 years, 1 month 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 "cc/surfaces/direct_compositor_frame_sink.h" 5 #include "cc/surfaces/direct_compositor_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/compositor_frame_sink_client.h" 9 #include "cc/output/compositor_frame_sink_client.h"
10 #include "cc/surfaces/display.h" 10 #include "cc/surfaces/display.h"
11 #include "cc/surfaces/frame_sink_id.h" 11 #include "cc/surfaces/frame_sink_id.h"
12 #include "cc/surfaces/surface.h" 12 #include "cc/surfaces/surface.h"
13 #include "cc/surfaces/surface_id_allocator.h" 13 #include "cc/surfaces/surface_id_allocator.h"
14 #include "cc/surfaces/surface_manager.h" 14 #include "cc/surfaces/surface_manager.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 DirectCompositorFrameSink::DirectCompositorFrameSink( 18 DirectCompositorFrameSink::DirectCompositorFrameSink(
19 const FrameSinkId& frame_sink_id, 19 const FrameSinkId& frame_sink_id,
20 SurfaceManager* surface_manager, 20 SurfaceManager* surface_manager,
21 Display* display, 21 Display* display,
22 scoped_refptr<ContextProvider> context_provider, 22 scoped_refptr<ContextProvider> context_provider,
23 scoped_refptr<ContextProvider> worker_context_provider) 23 scoped_refptr<ContextProvider> worker_context_provider,
24 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
25 SharedBitmapManager* shared_bitmap_manager)
24 : CompositorFrameSink(std::move(context_provider), 26 : CompositorFrameSink(std::move(context_provider),
25 std::move(worker_context_provider)), 27 std::move(worker_context_provider),
28 gpu_memory_buffer_manager,
29 shared_bitmap_manager),
26 frame_sink_id_(frame_sink_id), 30 frame_sink_id_(frame_sink_id),
27 surface_manager_(surface_manager), 31 surface_manager_(surface_manager),
28 display_(display), 32 display_(display),
29 factory_(frame_sink_id, surface_manager, this) { 33 factory_(frame_sink_id, surface_manager, this) {
30 DCHECK(thread_checker_.CalledOnValidThread()); 34 DCHECK(thread_checker_.CalledOnValidThread());
31 capabilities_.can_force_reclaim_resources = true; 35 capabilities_.can_force_reclaim_resources = true;
32 // Display and DirectCompositorFrameSink share a GL context, so sync 36 // Display and DirectCompositorFrameSink share a GL context, so sync
33 // points aren't needed when passing resources between them. 37 // points aren't needed when passing resources between them.
34 capabilities_.delegated_sync_points_required = false; 38 capabilities_.delegated_sync_points_required = false;
35 factory_.set_needs_sync_points(false); 39 factory_.set_needs_sync_points(false);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // This notification is not relevant to our client outside of tests. We 142 // This notification is not relevant to our client outside of tests. We
139 // unblock the client from DidDrawCallback() when the surface is going to 143 // unblock the client from DidDrawCallback() when the surface is going to
140 // be drawn. 144 // be drawn.
141 } 145 }
142 146
143 void DirectCompositorFrameSink::DidDrawCallback() { 147 void DirectCompositorFrameSink::DidDrawCallback() {
144 client_->DidReceiveCompositorFrameAck(); 148 client_->DidReceiveCompositorFrameAck();
145 } 149 }
146 150
147 } // namespace cc 151 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink.h ('k') | cc/surfaces/direct_compositor_frame_sink_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698