Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a33e401 authored by Stan Iliev's avatar Stan Iliev
Browse files

Move isSkiaEnabled to the Properties class

Move CanvasContext::isSkiaEnabled to Properties:isSkiaEnabled.

Change-Id: I0a62f43825cf59ba338a24a056e8c2a56d1c5315
parent d79f237d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -214,8 +214,8 @@ RenderPipelineType Properties::getRenderPipelineType() {
    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;
    }
+1 −1
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ enum class StencilClipDebug {
enum class RenderPipelineType {
    OpenGL = 0,
    SkiaGL,
    Vulkan,
    SkiaVulkan,
    NotInitialized = 128
};

+1 −6
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ CanvasContext* CanvasContext::create(RenderThread& thread,
            //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 @@ int64_t CanvasContext::getFrameNumber() {
    return mFrameNumber;
}

bool CanvasContext::isSkiaEnabled() {
    auto renderType = Properties::getRenderPipelineType();
    return RenderPipelineType::SkiaGL == renderType || RenderPipelineType::Vulkan == renderType;
}

} /* namespace renderthread */
} /* namespace uirenderer */
} /* namespace android */
+0 −1
Original line number Diff line number Diff line
@@ -102,7 +102,6 @@ public:
    static void trimMemory(RenderThread& thread, int level);

    static void invokeFunctor(RenderThread& thread, Functor* functor);
    static bool isSkiaEnabled();

    Layer* createTextureLayer();