OLD | NEW |
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 surface_manager_(new cc::SurfaceManager), | 111 surface_manager_(new cc::SurfaceManager), |
112 surface_id_allocator_(new cc::SurfaceIdAllocator(kCompositorClientId)), | 112 surface_id_allocator_(new cc::SurfaceIdAllocator(kCompositorClientId)), |
113 surface_factory_(new cc::SurfaceFactory(surface_manager_.get(), this)), | 113 surface_factory_(new cc::SurfaceFactory(surface_manager_.get(), this)), |
114 begin_frame_source_(std::move(begin_frame_source)) { | 114 begin_frame_source_(std::move(begin_frame_source)) { |
115 DCHECK(registry_); | 115 DCHECK(registry_); |
116 DCHECK(sender_); | 116 DCHECK(sender_); |
117 DCHECK(begin_frame_source_); | 117 DCHECK(begin_frame_source_); |
118 thread_checker_.DetachFromThread(); | 118 thread_checker_.DetachFromThread(); |
119 memory_policy_.priority_cutoff_when_visible = | 119 memory_policy_.priority_cutoff_when_visible = |
120 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; | 120 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; |
121 capabilities_.adjust_deadline_for_parent = false; | |
122 } | 121 } |
123 | 122 |
124 SynchronousCompositorFrameSink::~SynchronousCompositorFrameSink() = default; | 123 SynchronousCompositorFrameSink::~SynchronousCompositorFrameSink() = default; |
125 | 124 |
126 void SynchronousCompositorFrameSink::SetSyncClient( | 125 void SynchronousCompositorFrameSink::SetSyncClient( |
127 SynchronousCompositorFrameSinkClient* compositor) { | 126 SynchronousCompositorFrameSinkClient* compositor) { |
128 DCHECK(CalledOnValidThread()); | 127 DCHECK(CalledOnValidThread()); |
129 sync_client_ = compositor; | 128 sync_client_ = compositor; |
130 if (sync_client_) | 129 if (sync_client_) |
131 Send(new SyncCompositorHostMsg_CompositorFrameSinkCreated(routing_id_)); | 130 Send(new SyncCompositorHostMsg_CompositorFrameSinkCreated(routing_id_)); |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 client_->ReclaimResources(resources); | 402 client_->ReclaimResources(resources); |
404 } | 403 } |
405 | 404 |
406 void SynchronousCompositorFrameSink::SetBeginFrameSource( | 405 void SynchronousCompositorFrameSink::SetBeginFrameSource( |
407 cc::BeginFrameSource* begin_frame_source) { | 406 cc::BeginFrameSource* begin_frame_source) { |
408 // Software output is synchronous and doesn't use a BeginFrameSource. | 407 // Software output is synchronous and doesn't use a BeginFrameSource. |
409 NOTREACHED(); | 408 NOTREACHED(); |
410 } | 409 } |
411 | 410 |
412 } // namespace content | 411 } // namespace content |
OLD | NEW |