Chromium Code Reviews| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 success = context_provider_->BindToCurrentThread(); | 122 success = context_provider_->BindToCurrentThread(); |
| 123 if (success) { | 123 if (success) { |
| 124 context_provider_->SetLostContextCallback(base::Bind( | 124 context_provider_->SetLostContextCallback(base::Bind( |
| 125 &OutputSurface::DidLoseOutputSurface, base::Unretained(this))); | 125 &OutputSurface::DidLoseOutputSurface, base::Unretained(this))); |
| 126 context_provider_->SetMemoryPolicyChangedCallback( | 126 context_provider_->SetMemoryPolicyChangedCallback( |
| 127 base::Bind(&OutputSurface::SetMemoryPolicy, base::Unretained(this))); | 127 base::Bind(&OutputSurface::SetMemoryPolicy, base::Unretained(this))); |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 if (success && worker_context_provider_.get()) { | 131 if (success && worker_context_provider_.get()) { |
| 132 ContextProvider::ScopedContextLock scoped_context( | |
|
ericrk
2015/08/24 21:00:10
I think this may just be a naming issue and actual
reveman
2015/08/25 22:59:59
Yes, the name of this function is a bit confusing.
| |
| 133 worker_context_provider_.get()); | |
| 134 | |
| 132 success = worker_context_provider_->BindToCurrentThread(); | 135 success = worker_context_provider_->BindToCurrentThread(); |
| 133 if (success) | 136 if (success) |
| 134 worker_context_provider_->SetupLock(); | 137 worker_context_provider_->SetupLock(); |
| 135 } | 138 } |
| 136 | 139 |
| 137 if (!success) | 140 if (!success) |
| 138 client_ = NULL; | 141 client_ = NULL; |
| 139 | 142 |
| 140 return success; | 143 return success; |
| 141 } | 144 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 aggressively_free_resources); | 221 aggressively_free_resources); |
| 219 } | 222 } |
| 220 } | 223 } |
| 221 } | 224 } |
| 222 | 225 |
| 223 bool OutputSurface::SurfaceIsSuspendForRecycle() const { | 226 bool OutputSurface::SurfaceIsSuspendForRecycle() const { |
| 224 return false; | 227 return false; |
| 225 } | 228 } |
| 226 | 229 |
| 227 } // namespace cc | 230 } // namespace cc |
| OLD | NEW |