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

Commit d0fab002 authored by Derek Sollenberger's avatar Derek Sollenberger Committed by Android (Google) Code Review
Browse files

Merge "Enable RenderEngine blur testing on more devices." into sc-dev

parents 974907d4 b399837d
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