Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / webkit / common / gpu / context_provider_in_process.cc
index e9d2558..3785d38 100644 (file)
@@ -164,6 +164,13 @@ void ContextProviderInProcess::VerifyContexts() {
     OnLostContext();
 }
 
+void ContextProviderInProcess::DeleteCachedResources() {
+  DCHECK(context_thread_checker_.CalledOnValidThread());
+
+  if (gr_context_)
+    gr_context_->FreeGpuResources();
+}
+
 void ContextProviderInProcess::OnLostContext() {
   DCHECK(context_thread_checker_.CalledOnValidThread());
   {
@@ -174,6 +181,8 @@ void ContextProviderInProcess::OnLostContext() {
   }
   if (!lost_context_callback_.is_null())
     base::ResetAndReturn(&lost_context_callback_).Run();
+  if (gr_context_)
+    gr_context_->OnLostContext();
 }
 
 bool ContextProviderInProcess::DestroyedOnMainThread() {