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

Commit b399837d authored by Derek Sollenberger's avatar Derek Sollenberger
Browse files

Enable RenderEngine blur testing on more devices.

Test: atest renderengine_test
Bug: 176903027
Change-Id: I85e3a561548506bd9cab1a6c8f7e15c47fbff960
parent 3c18744b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ public:
                        base::unique_fd&& bufferFence, base::unique_fd* drawFence) override;
    bool cleanupPostRender(CleanupMode mode) override;
    int getContextPriority() override;
    bool supportsBackgroundBlur() override { return mBlurFilter != nullptr; }

    EGLDisplay getEGLDisplay() const { return mEGLDisplay; }
    // Creates an output image for rendering to
+3 −3
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ status_t BlurFilter::render(bool multiPass) {
}

string BlurFilter::getVertexShader() const {
    return R"SHADER(#version 310 es
    return R"SHADER(#version 300 es
        precision mediump float;

        in vec2 aPosition;
@@ -222,7 +222,7 @@ string BlurFilter::getVertexShader() const {
}

string BlurFilter::getFragmentShader() const {
    return R"SHADER(#version 310 es
    return R"SHADER(#version 300 es
        precision mediump float;

        uniform sampler2D uTexture;
@@ -244,7 +244,7 @@ string BlurFilter::getFragmentShader() const {
}

string BlurFilter::getMixFragShader() const {
    string shader = R"SHADER(#version 310 es
    string shader = R"SHADER(#version 300 es
        precision mediump float;

        in highp vec2 vUV;
+4 −0
Original line number Diff line number Diff line
@@ -188,6 +188,10 @@ public:
    // number of contexts that can be created at a specific priority level in the system.
    virtual int getContextPriority() = 0;

    // Returns true if blur was requested in the RenderEngineCreationArgs and the implementation
    // also supports background blur.  If false, no blur will be applied when drawing layers.
    virtual bool supportsBackgroundBlur() = 0;

protected:
    friend class threaded::RenderEngineThreaded;
};
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ public:
                          base::unique_fd*));
    MOCK_METHOD0(cleanFramebufferCache, void());
    MOCK_METHOD0(getContextPriority, int());
    MOCK_METHOD0(supportsBackgroundBlur, bool());
};

} // namespace mock
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ public:
    bool isProtected() const override { return mInProtectedContext; }
    bool supportsProtectedContent() const override;
    bool useProtectedContext(bool useProtectedContext) override;
    bool supportsBackgroundBlur() override { return mBlurFilter != nullptr; }

protected:
    void dump(std::string& result) override;
Loading