Move isSkiaEnabled to the Properties class
Move CanvasContext::isSkiaEnabled to Properties:isSkiaEnabled.
Change-Id: I0a62f43825cf59ba338a24a056e8c2a56d1c5315
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index d0ae1d4..93b2e15 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -214,8 +214,8 @@
property_get(PROPERTY_DEFAULT_RENDERER, prop, "opengl");
if (!strcmp(prop, "skiagl") ) {
sRenderPipelineType = RenderPipelineType::SkiaGL;
- } else if (!strcmp(prop, "vulkan") ) {
- sRenderPipelineType = RenderPipelineType::Vulkan;
+ } else if (!strcmp(prop, "skiavulkan") ) {
+ sRenderPipelineType = RenderPipelineType::SkiaVulkan;
} else { //"opengl"
sRenderPipelineType = RenderPipelineType::OpenGL;
}
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index 5d892fd..133ae80 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -253,7 +253,7 @@
enum class RenderPipelineType {
OpenGL = 0,
SkiaGL,
- Vulkan,
+ SkiaVulkan,
NotInitialized = 128
};
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index d36ebc7..f8434a4 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -72,7 +72,7 @@
//TODO: implement SKIA GL
LOG_ALWAYS_FATAL("skiaGL canvas type not implemented.");
break;
- case RenderPipelineType::Vulkan:
+ case RenderPipelineType::SkiaVulkan:
//TODO: implement Vulkan
LOG_ALWAYS_FATAL("Vulkan canvas type not implemented.");
break;
@@ -693,11 +693,6 @@
return mFrameNumber;
}
-bool CanvasContext::isSkiaEnabled() {
- auto renderType = Properties::getRenderPipelineType();
- return RenderPipelineType::SkiaGL == renderType || RenderPipelineType::Vulkan == renderType;
-}
-
} /* namespace renderthread */
} /* namespace uirenderer */
} /* namespace android */
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index 72f1268..25f872f 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -102,7 +102,6 @@
static void trimMemory(RenderThread& thread, int level);
static void invokeFunctor(RenderThread& thread, Functor* functor);
- static bool isSkiaEnabled();
Layer* createTextureLayer();