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

Side by Side Diff: content/browser/android/in_process/context_provider_in_process.cc

Issue 1168943002: Remove ContextProvider::IsContextLost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: contextprovider: . Created 5 years, 6 months 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 (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 "content/browser/android/in_process/context_provider_in_process.h" 5 #include "content/browser/android/in_process/context_provider_in_process.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "cc/output/managed_memory_policy.h" 10 #include "cc/output/managed_memory_policy.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 170
171 void ContextProviderInProcess::SetupLock() { 171 void ContextProviderInProcess::SetupLock() {
172 context3d_->SetLock(&context_lock_); 172 context3d_->SetLock(&context_lock_);
173 } 173 }
174 174
175 base::Lock* ContextProviderInProcess::GetLock() { 175 base::Lock* ContextProviderInProcess::GetLock() {
176 return &context_lock_; 176 return &context_lock_;
177 } 177 }
178 178
179 bool ContextProviderInProcess::IsContextLost() {
180 DCHECK(lost_context_callback_proxy_); // Is bound to thread.
181 DCHECK(context_thread_checker_.CalledOnValidThread());
182
183 return context3d_->isContextLost();
184 }
185
186 void ContextProviderInProcess::VerifyContexts() { 179 void ContextProviderInProcess::VerifyContexts() {
187 DCHECK(lost_context_callback_proxy_); // Is bound to thread. 180 DCHECK(lost_context_callback_proxy_); // Is bound to thread.
188 DCHECK(context_thread_checker_.CalledOnValidThread()); 181 DCHECK(context_thread_checker_.CalledOnValidThread());
189 182
190 if (context3d_->isContextLost()) 183 if (ContextGL()->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
191 OnLostContext(); 184 OnLostContext();
192 } 185 }
193 186
194 void ContextProviderInProcess::DeleteCachedResources() { 187 void ContextProviderInProcess::DeleteCachedResources() {
195 DCHECK(context_thread_checker_.CalledOnValidThread()); 188 DCHECK(context_thread_checker_.CalledOnValidThread());
196 189
197 if (gr_context_) 190 if (gr_context_)
198 gr_context_->FreeGpuResources(); 191 gr_context_->FreeGpuResources();
199 } 192 }
200 193
(...skipping 25 matching lines...) Expand all
226 lost_context_callback.is_null()); 219 lost_context_callback.is_null());
227 lost_context_callback_ = lost_context_callback; 220 lost_context_callback_ = lost_context_callback;
228 } 221 }
229 222
230 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( 223 void ContextProviderInProcess::SetMemoryPolicyChangedCallback(
231 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { 224 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
232 // There's no memory manager for the in-process implementation. 225 // There's no memory manager for the in-process implementation.
233 } 226 }
234 227
235 } // namespace content 228 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698