OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "cc/output/output_surface.h" | 5 #include "cc/output/output_surface.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // bytes. This will happen when the memory manager thinks that the renderer | 194 // bytes. This will happen when the memory manager thinks that the renderer |
195 // is not visible (which the renderer knows better). | 195 // is not visible (which the renderer knows better). |
196 if (policy.bytes_limit_when_visible) | 196 if (policy.bytes_limit_when_visible) |
197 client_->SetMemoryPolicy(policy); | 197 client_->SetMemoryPolicy(policy); |
198 } | 198 } |
199 | 199 |
200 OverlayCandidateValidator* OutputSurface::GetOverlayCandidateValidator() const { | 200 OverlayCandidateValidator* OutputSurface::GetOverlayCandidateValidator() const { |
201 return nullptr; | 201 return nullptr; |
202 } | 202 } |
203 | 203 |
| 204 unsigned OutputSurface::GetOverlayTextureId() const { |
| 205 return 0; |
| 206 } |
| 207 |
204 void OutputSurface::SetWorkerContextShouldAggressivelyFreeResources( | 208 void OutputSurface::SetWorkerContextShouldAggressivelyFreeResources( |
205 bool aggressively_free_resources) { | 209 bool aggressively_free_resources) { |
206 TRACE_EVENT1("cc", | 210 TRACE_EVENT1("cc", |
207 "OutputSurface::SetWorkerContextShouldAggressivelyFreeResources", | 211 "OutputSurface::SetWorkerContextShouldAggressivelyFreeResources", |
208 "aggressively_free_resources", aggressively_free_resources); | 212 "aggressively_free_resources", aggressively_free_resources); |
209 if (auto* context_provider = worker_context_provider()) { | 213 if (auto* context_provider = worker_context_provider()) { |
210 ContextProvider::ScopedContextLock scoped_context(context_provider); | 214 ContextProvider::ScopedContextLock scoped_context(context_provider); |
211 | 215 |
212 if (aggressively_free_resources) { | 216 if (aggressively_free_resources) { |
213 context_provider->DeleteCachedResources(); | 217 context_provider->DeleteCachedResources(); |
214 } | 218 } |
215 | 219 |
216 if (auto* context_support = context_provider->ContextSupport()) { | 220 if (auto* context_support = context_provider->ContextSupport()) { |
217 context_support->SetAggressivelyFreeResources( | 221 context_support->SetAggressivelyFreeResources( |
218 aggressively_free_resources); | 222 aggressively_free_resources); |
219 } | 223 } |
220 } | 224 } |
221 } | 225 } |
222 | 226 |
223 bool OutputSurface::SurfaceIsSuspendForRecycle() const { | 227 bool OutputSurface::SurfaceIsSuspendForRecycle() const { |
224 return false; | 228 return false; |
225 } | 229 } |
226 | 230 |
227 } // namespace cc | 231 } // namespace cc |
OLD | NEW |