Use CPU rendering for host builds
This bypasses the computation of PipelineRenderType on host to force
using the CPU rendering pipeline.
Bug: 322360037
Test: build libhwui on host
Change-Id: Icb5178ba04e5348868c6c7f637e0c7a341fc84cd
diff --git a/libs/hwui/apex/LayoutlibLoader.cpp b/libs/hwui/apex/LayoutlibLoader.cpp
index 770822a..fd9915a 100644
--- a/libs/hwui/apex/LayoutlibLoader.cpp
+++ b/libs/hwui/apex/LayoutlibLoader.cpp
@@ -164,8 +164,10 @@
} // namespace android
using namespace android;
+using namespace android::uirenderer;
void init_android_graphics() {
+ Properties::overrideRenderPipelineType(RenderPipelineType::SkiaCpu);
SkGraphics::Init();
}