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

Side by Side Diff: content/renderer/android/synchronous_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/android/synchronous_compositor_frame_sink.h" 5 #include "content/renderer/android/synchronous_compositor_frame_sink.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 bool IsDisplayedAsOverlayPlane() const override { return false; } 97 bool IsDisplayedAsOverlayPlane() const override { return false; }
98 unsigned GetOverlayTextureId() const override { return 0; } 98 unsigned GetOverlayTextureId() const override { return 0; }
99 bool SurfaceIsSuspendForRecycle() const override { return false; } 99 bool SurfaceIsSuspendForRecycle() const override { return false; }
100 bool HasExternalStencilTest() const override { return false; } 100 bool HasExternalStencilTest() const override { return false; }
101 void ApplyExternalStencil() override {} 101 void ApplyExternalStencil() override {}
102 }; 102 };
103 103
104 SynchronousCompositorFrameSink::SynchronousCompositorFrameSink( 104 SynchronousCompositorFrameSink::SynchronousCompositorFrameSink(
105 scoped_refptr<cc::ContextProvider> context_provider, 105 scoped_refptr<cc::ContextProvider> context_provider,
106 scoped_refptr<cc::ContextProvider> worker_context_provider, 106 scoped_refptr<cc::ContextProvider> worker_context_provider,
107 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
107 int routing_id, 108 int routing_id,
108 uint32_t compositor_frame_sink_id, 109 uint32_t compositor_frame_sink_id,
109 std::unique_ptr<cc::BeginFrameSource> begin_frame_source, 110 std::unique_ptr<cc::BeginFrameSource> begin_frame_source,
110 SynchronousCompositorRegistry* registry, 111 SynchronousCompositorRegistry* registry,
111 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue) 112 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue)
112 : cc::CompositorFrameSink(std::move(context_provider), 113 : cc::CompositorFrameSink(std::move(context_provider),
113 std::move(worker_context_provider)), 114 std::move(worker_context_provider),
115 gpu_memory_buffer_manager,
116 nullptr),
114 routing_id_(routing_id), 117 routing_id_(routing_id),
115 compositor_frame_sink_id_(compositor_frame_sink_id), 118 compositor_frame_sink_id_(compositor_frame_sink_id),
116 registry_(registry), 119 registry_(registry),
117 sender_(RenderThreadImpl::current()->sync_compositor_message_filter()), 120 sender_(RenderThreadImpl::current()->sync_compositor_message_filter()),
118 memory_policy_(0u), 121 memory_policy_(0u),
119 frame_swap_message_queue_(frame_swap_message_queue), 122 frame_swap_message_queue_(frame_swap_message_queue),
120 surface_manager_(new cc::SurfaceManager), 123 surface_manager_(new cc::SurfaceManager),
121 surface_id_allocator_(new cc::SurfaceIdAllocator()), 124 surface_id_allocator_(new cc::SurfaceIdAllocator()),
122 surface_factory_( 125 surface_factory_(
123 new cc::SurfaceFactory(kFrameSinkId, surface_manager_.get(), this)), 126 new cc::SurfaceFactory(kFrameSinkId, surface_manager_.get(), this)),
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 client_->ReclaimResources(resources); 467 client_->ReclaimResources(resources);
465 } 468 }
466 469
467 void SynchronousCompositorFrameSink::SetBeginFrameSource( 470 void SynchronousCompositorFrameSink::SetBeginFrameSource(
468 cc::BeginFrameSource* begin_frame_source) { 471 cc::BeginFrameSource* begin_frame_source) {
469 // Software output is synchronous and doesn't use a BeginFrameSource. 472 // Software output is synchronous and doesn't use a BeginFrameSource.
470 NOTREACHED(); 473 NOTREACHED();
471 } 474 }
472 475
473 } // namespace content 476 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/android/synchronous_compositor_frame_sink.h ('k') | content/renderer/gpu/compositor_dependencies.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698