summaryrefslogtreecommitdiff
path: root/libs/hwui/Properties.cpp
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2018-12-17 22:26:25 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-12-17 22:26:25 +0000
commit73d3d815cd5e7613735d429be7f1398a9053b9f1 (patch)
tree5660ea4714f2d84992e4e8df1b8f2c4e9f2d7c7f /libs/hwui/Properties.cpp
parent009bd1bfe357418d993a93f3b28adb56d8ea01e5 (diff)
parentb8811aa52ff81a3de253320e2005d0690bb9ba64 (diff)
Merge "Read product property to set Vulkan as default render pipeline"
Diffstat (limited to 'libs/hwui/Properties.cpp')
-rw-r--r--libs/hwui/Properties.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index 8067313b2cb2..046ffc4da5ea 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -18,6 +18,7 @@
#include "Debug.h"
#include "DeviceInfo.h"
#include "SkTraceEventCommon.h"
+#include "HWUIProperties.sysprop.h"
#include <algorithm>
#include <cstdlib>
@@ -174,8 +175,13 @@ RenderPipelineType Properties::getRenderPipelineType() {
if (sRenderPipelineType != RenderPipelineType::NotInitialized) {
return sRenderPipelineType;
}
+ bool useVulkan = use_vulkan().value_or(false);
char prop[PROPERTY_VALUE_MAX];
- property_get(PROPERTY_RENDERER, prop, "skiagl");
+ if (useVulkan) {
+ property_get(PROPERTY_RENDERER, prop, "skiavk");
+ } else {
+ property_get(PROPERTY_RENDERER, prop, "skiagl");
+ }
if (!strcmp(prop, "skiavk")) {
ALOGD("Skia Vulkan Pipeline");
sRenderPipelineType = RenderPipelineType::SkiaVulkan;