diff options
author | Bo Liu <boliu@google.com> | 2019-01-03 16:36:24 -0800 |
---|---|---|
committer | Bo Liu <boliu@google.com> | 2019-01-04 07:28:55 -0800 |
commit | 1b0278c19e004dac80196f1eda257fd08af954a5 (patch) | |
tree | 0839281c50f2458f63f3ca4ef81fa25f8a5000e8 /libs/hwui/WebViewFunctorManager.cpp | |
parent | 25edac0f179870f71947ff96d98f736f6e7f0027 (diff) |
Mark GrContext dirty after onContextDestroyed
Bug: 120997728
Test: hwui_unit_test passes
Change-Id: I8b60c45ebf7904b7026b480541dac78b70a59e0d
Diffstat (limited to 'libs/hwui/WebViewFunctorManager.cpp')
-rw-r--r-- | libs/hwui/WebViewFunctorManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/WebViewFunctorManager.cpp b/libs/hwui/WebViewFunctorManager.cpp index 5b7ae70e821c..9170d6d1dc50 100644 --- a/libs/hwui/WebViewFunctorManager.cpp +++ b/libs/hwui/WebViewFunctorManager.cpp @@ -18,6 +18,7 @@ #include <private/hwui/WebViewFunctor.h> #include "Properties.h" +#include "renderthread/RenderThread.h" #include <log/log.h> #include <utils/Trace.h> @@ -90,6 +91,10 @@ void WebViewFunctor::destroyContext() { mHasContext = false; ATRACE_NAME("WebViewFunctor::onContextDestroyed"); mCallbacks.onContextDestroyed(mFunctor, mData); + + // grContext may be null in unit tests. + auto* grContext = renderthread::RenderThread::getInstance().getGrContext(); + if (grContext) grContext->resetContext(); } } |