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

Commit 3a4b3bf1 authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

Remove usage of GlEngine (cherry-pick in master)

The new Engine of ImageWallpaper, a CanvasEngine, was enabled in droidFood under a flag. It has been tested for several weeks and is ready to be enabled by default, wihtout any flag.

The ImageWallpaperTest has been slightly refactored to fix all warnings and reintroduce two GL tests that were ignored.

A very small fix was added in ImageWallpaper.java: if the bitmap fails to load (which should not happen) for another user than USER_SYSTEM, it will be reset to default for this user and not for USER_SYSTEM.

Test: atest ImageWallpaperTest
Test: atest WallpaperLocalColorExtractorTest
Fixes: 243768810
Bug: 243402530
Bug: 254512923
Change-Id: I0bfbe9b6aee7a4da349b412399196504511b69f0
parent 3de88db3
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -23,11 +23,6 @@
        xmlns:tools="http://schemas.android.com/tools"
        coreApp="true">

    <!-- Using OpenGL ES 2.0 -->
    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <!-- Used to read wallpaper -->
+0 −11
Original line number Diff line number Diff line
precision mediump float;

// The actual wallpaper texture.
uniform sampler2D uTexture;

varying vec2 vTextureCoordinates;

void main() {
    // gets the pixel value of the wallpaper for this uv coordinates on screen.
    gl_FragColor = texture2D(uTexture, vTextureCoordinates);
}
 No newline at end of file
+0 −8
Original line number Diff line number Diff line
attribute vec4 aPosition;
attribute vec2 aTextureCoordinates;
varying vec2 vTextureCoordinates;

void main() {
    vTextureCoordinates = aTextureCoordinates;
    gl_Position = aPosition;
}
 No newline at end of file
+1 −6
Original line number Diff line number Diff line
@@ -94,8 +94,7 @@ object Flags {
        unreleasedFlag(259217907, "notification_group_dismissal_animation", teamfood = true)

    // TODO(b/257506350): Tracking Bug
    @JvmField
    val FSI_CHROME = unreleasedFlag(117, "fsi_chrome")
    @JvmField val FSI_CHROME = unreleasedFlag(117, "fsi_chrome")

    @JvmField
    val SIMPLIFIED_APPEAR_FRACTION =
@@ -253,10 +252,6 @@ object Flags {
    // TODO(b/254512848): Tracking Bug
    val REGION_SAMPLING = unreleasedFlag(801, "region_sampling")

    // 802 - wallpaper rendering
    // TODO(b/254512923): Tracking Bug
    @JvmField val USE_CANVAS_RENDERER = unreleasedFlag(802, "use_canvas_renderer")

    // 803 - screen contents translation
    // TODO(b/254513187): Tracking Bug
    val SCREEN_CONTENTS_TRANSLATION = unreleasedFlag(803, "screen_contents_translation")
+12 −443

File changed.

Preview size limit exceeded, changes collapsed.

Loading