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

Unified Diff: android_webview/browser/aw_render_thread_context_provider.cc

Issue 1317743002: cc: Implement shared worker contexts. (v1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tear down Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/aw_render_thread_context_provider.cc
diff --git a/android_webview/browser/aw_render_thread_context_provider.cc b/android_webview/browser/aw_render_thread_context_provider.cc
index e92897590ed05a603685cc5d2213e62af5b049ee..a8576ad11b5edb40af8d6bea40baed933dc9a7fd 100644
--- a/android_webview/browser/aw_render_thread_context_provider.cc
+++ b/android_webview/browser/aw_render_thread_context_provider.cc
@@ -48,7 +48,7 @@ AwRenderThreadContextProvider::Create(
AwRenderThreadContextProvider::AwRenderThreadContextProvider(
scoped_refptr<gfx::GLSurface> surface,
scoped_refptr<gpu::InProcessCommandBuffer::Service> service)
- : destroyed_(false) {
+ : lost_(false) {
DCHECK(main_thread_checker_.CalledOnValidThread());
blink::WebGraphicsContext3D::Attributes attributes;
@@ -170,10 +170,10 @@ void AwRenderThreadContextProvider::DeleteCachedResources() {
}
}
-bool AwRenderThreadContextProvider::DestroyedOnMainThread() {
+bool AwRenderThreadContextProvider::HasBeenLostOnMainThread() {
DCHECK(main_thread_checker_.CalledOnValidThread());
- return destroyed_;
+ return lost_;
}
void AwRenderThreadContextProvider::SetLostContextCallback(
@@ -189,9 +189,9 @@ void AwRenderThreadContextProvider::SetMemoryPolicyChangedCallback(
void AwRenderThreadContextProvider::OnLostContext() {
DCHECK(main_thread_checker_.CalledOnValidThread());
- if (destroyed_)
+ if (lost_)
return;
- destroyed_ = true;
+ lost_ = true;
if (!lost_context_callback_.is_null())
base::ResetAndReturn(&lost_context_callback_).Run();
@@ -199,4 +199,9 @@ void AwRenderThreadContextProvider::OnLostContext() {
gr_context_->abandonContext();
}
+bool AwRenderThreadContextProvider::HasBeenDestroyed() {
+ DCHECK(main_thread_checker_.CalledOnValidThread());
+ return false;
+}
+
} // namespace android_webview
« 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