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

Commit b4c51cf0 authored by Stan Iliev's avatar Stan Iliev Committed by Android (Google) Code Review
Browse files

Merge "Move isSkiaEnabled to the Properties class"

parents 7e542cb6 8a33e401
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
@@ -75,7 +75,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;
@@ -607,11 +607,6 @@ int64_t CanvasContext::getFrameNumber() {
    return mFrameNumber;
}

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

SkRect CanvasContext::computeDirtyRect(const Frame& frame, SkRect* dirty) {
    if (frame.width() != mLastFrameWidth || frame.height() != mLastFrameHeight) {
        // can't rely on prior content of window if viewport size changes
+0 −1
Original line number Diff line number Diff line
@@ -99,7 +99,6 @@ public:
    static void trimMemory(RenderThread& thread, int level);

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

    Layer* createTextureLayer();