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

Side by Side Diff: android_webview/browser/aw_render_thread_context_provider.cc

Issue 1412923004: Revert of Move gpu memory calculations to Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "android_webview/browser/aw_render_thread_context_provider.h" 5 #include "android_webview/browser/aw_render_thread_context_provider.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/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 TRACE_EVENT_SCOPE_THREAD); 164 TRACE_EVENT_SCOPE_THREAD);
165 gr_context_->freeGpuResources(); 165 gr_context_->freeGpuResources();
166 } 166 }
167 } 167 }
168 168
169 void AwRenderThreadContextProvider::SetLostContextCallback( 169 void AwRenderThreadContextProvider::SetLostContextCallback(
170 const LostContextCallback& lost_context_callback) { 170 const LostContextCallback& lost_context_callback) {
171 lost_context_callback_ = lost_context_callback; 171 lost_context_callback_ = lost_context_callback;
172 } 172 }
173 173
174 void AwRenderThreadContextProvider::SetMemoryPolicyChangedCallback(
175 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
176 // There's no memory manager for the in-process implementation.
177 }
178
174 void AwRenderThreadContextProvider::OnLostContext() { 179 void AwRenderThreadContextProvider::OnLostContext() {
175 DCHECK(main_thread_checker_.CalledOnValidThread()); 180 DCHECK(main_thread_checker_.CalledOnValidThread());
176 181
177 if (!lost_context_callback_.is_null()) 182 if (!lost_context_callback_.is_null())
178 base::ResetAndReturn(&lost_context_callback_).Run(); 183 base::ResetAndReturn(&lost_context_callback_).Run();
179 if (gr_context_) 184 if (gr_context_)
180 gr_context_->abandonContext(); 185 gr_context_->abandonContext();
181 } 186 }
182 187
183 } // namespace android_webview 188 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_render_thread_context_provider.h ('k') | blimp/client/compositor/blimp_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698