summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderProxy.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2018-09-26 11:21:08 -0700
committerJohn Reck <jreck@google.com>2018-09-27 19:38:13 +0000
commitbb3a35831794477d980791b131c33dc7faa46f59 (patch)
treea3fa1de6744324cd3540c1027d39a67e6fad0f93 /libs/hwui/renderthread/RenderProxy.cpp
parent99ae10396189d79bd34c58120947ce3bfeb70281 (diff)
Wire-up default force-dark based off of isLightTheme
Bug: 102591313 Test: Compared settings in light & dark UI modes with force_dark set to true. Observed that force_dark fixes were not present when UI mode was set to dark, indicating force_dark was appropriately globally-disabled Change-Id: I5882829bb5871829fc8fc9911682f52a6ba5f445
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 6106e24c093b..54219b5a1489 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -298,6 +298,12 @@ void RenderProxy::removeFrameMetricsObserver(FrameMetricsObserver* observerPtr)
});
}
+void RenderProxy::setForceDark(bool enable) {
+ mRenderThread.queue().post([this, enable]() {
+ mContext->setForceDark(enable);
+ });
+}
+
int RenderProxy::copySurfaceInto(sp<Surface>& surface, int left, int top, int right, int bottom,
SkBitmap* bitmap) {
auto& thread = RenderThread::getInstance();