| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // bytes. This will happen when the memory manager thinks that the renderer | 286 // bytes. This will happen when the memory manager thinks that the renderer |
| 287 // is not visible (which the renderer knows better). | 287 // is not visible (which the renderer knows better). |
| 288 if (policy.bytes_limit_when_visible) | 288 if (policy.bytes_limit_when_visible) |
| 289 client_->SetMemoryPolicy(policy); | 289 client_->SetMemoryPolicy(policy); |
| 290 } | 290 } |
| 291 | 291 |
| 292 OverlayCandidateValidator* OutputSurface::GetOverlayCandidateValidator() const { | 292 OverlayCandidateValidator* OutputSurface::GetOverlayCandidateValidator() const { |
| 293 return nullptr; | 293 return nullptr; |
| 294 } | 294 } |
| 295 | 295 |
| 296 bool OutputSurface::IsDisplayedAsOverlayPlane() const { |
| 297 return false; |
| 298 } |
| 299 |
| 296 unsigned OutputSurface::GetOverlayTextureId() const { | 300 unsigned OutputSurface::GetOverlayTextureId() const { |
| 297 return 0; | 301 return 0; |
| 298 } | 302 } |
| 299 | 303 |
| 300 void OutputSurface::SetWorkerContextShouldAggressivelyFreeResources( | 304 void OutputSurface::SetWorkerContextShouldAggressivelyFreeResources( |
| 301 bool aggressively_free_resources) { | 305 bool aggressively_free_resources) { |
| 302 TRACE_EVENT1("cc", | 306 TRACE_EVENT1("cc", |
| 303 "OutputSurface::SetWorkerContextShouldAggressivelyFreeResources", | 307 "OutputSurface::SetWorkerContextShouldAggressivelyFreeResources", |
| 304 "aggressively_free_resources", aggressively_free_resources); | 308 "aggressively_free_resources", aggressively_free_resources); |
| 305 if (auto* context_provider = worker_context_provider()) { | 309 if (auto* context_provider = worker_context_provider()) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 ContextProvider::LostContextCallback()); | 361 ContextProvider::LostContextCallback()); |
| 358 context_provider_->SetMemoryPolicyChangedCallback( | 362 context_provider_->SetMemoryPolicyChangedCallback( |
| 359 ContextProvider::MemoryPolicyChangedCallback()); | 363 ContextProvider::MemoryPolicyChangedCallback()); |
| 360 } | 364 } |
| 361 context_provider_ = nullptr; | 365 context_provider_ = nullptr; |
| 362 client_ = nullptr; | 366 client_ = nullptr; |
| 363 weak_ptr_factory_.InvalidateWeakPtrs(); | 367 weak_ptr_factory_.InvalidateWeakPtrs(); |
| 364 } | 368 } |
| 365 | 369 |
| 366 } // namespace cc | 370 } // namespace cc |
| OLD | NEW |