From 690b70d39c308d8d04bb78f7528a10c86f759f01 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Sat, 21 Sep 2024 12:33:36 -0700 Subject: [PATCH 1/3] [Impeller] fix OES texture usage. --- impeller/aiks/canvas.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/impeller/aiks/canvas.cc b/impeller/aiks/canvas.cc index 570b82d897e6d..b919b9f8fcc0e 100644 --- a/impeller/aiks/canvas.cc +++ b/impeller/aiks/canvas.cc @@ -21,6 +21,7 @@ #include "impeller/entity/contents/solid_rrect_blur_contents.h" #include "impeller/entity/contents/text_contents.h" #include "impeller/entity/contents/texture_contents.h" +#include "impeller/entity/contents/tiled_texture_contents.h" #include "impeller/entity/contents/vertices_contents.h" #include "impeller/entity/geometry/geometry.h" #include "impeller/entity/geometry/superellipse_geometry.h" @@ -743,6 +744,24 @@ void Canvas::DrawImageRect(const std::shared_ptr& image, return; } + if (image->GetTextureDescriptor().type == TextureType::kTextureExternalOES) { + auto texture_contents = std::make_shared(); + texture_contents->SetTexture(image); + texture_contents->SetGeometry(Geometry::MakeRect(dest)); + texture_contents->SetSamplerDescriptor(std::move(sampler)); + texture_contents->SetInheritedOpacity(paint.color.alpha); + + std::shared_ptr contents = texture_contents; + + Entity entity; + entity.SetBlendMode(paint.blend_mode); + entity.SetContents(paint.WithFilters(contents)); + entity.SetTransform(GetCurrentTransform()); + + AddRenderEntityToCurrentPass(std::move(entity)); + return; + } + auto texture_contents = TextureContents::MakeRect(dest); texture_contents->SetTexture(image); texture_contents->SetSourceRect(source); From ed06d3663564f527b1c1f7f52854e44d71874f3d Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Tue, 24 Sep 2024 11:09:43 -0700 Subject: [PATCH 2/3] ++ --- ci/builders/linux_android_emulator_34.json | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ci/builders/linux_android_emulator_34.json b/ci/builders/linux_android_emulator_34.json index a9f7fb3fcb8d5..b03851631ed87 100644 --- a/ci/builders/linux_android_emulator_34.json +++ b/ci/builders/linux_android_emulator_34.json @@ -90,6 +90,31 @@ "--enable-impeller", "--impeller-backend=vulkan" ] + }, + { + "language": "dart", + "name": "Android Scenario App Integration Tests (Impeller/GLES)", + "test_timeout_secs": 900, + "max_attempts": 2, + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_34_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", + "parameters": [ + "--out-dir=../out/ci/android_emulator_debug_x64", + "--enable-impeller", + "--impeller-backend=opengles" + ] } ] }, From aa814b90574cf7179087de6b3b95bd8cdf6f8c24 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Tue, 24 Sep 2024 11:12:54 -0700 Subject: [PATCH 3/3] ++ --- .ci.yaml | 21 ++++ ci/builders/linux_android_emulator_34.json | 25 ----- .../linux_android_emulator_opengles_34.json | 97 +++++++++++++++++++ 3 files changed, 118 insertions(+), 25 deletions(-) create mode 100644 ci/builders/linux_android_emulator_opengles_34.json diff --git a/.ci.yaml b/.ci.yaml index bc79a74b34e57..3cb3518fa8970 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -94,6 +94,27 @@ targets: - testing/scenario_app/** - testing/skia_gold_client/** + - name: Linux linux_android_emulator_opengles_tests_34 + bringup: true + enabled_branches: + - main + recipe: engine_v2/engine_v2 + properties: + config_name: linux_android_emulator_opengles_34 + dependencies: >- + [ + {"dependency": "goldctl", "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd"} + ] + timeout: 90 + runIf: + - .ci.yaml + - ci/builders/linux_android_emulator_opengles_34.json + - DEPS + - lib/ui/** + - shell/platform/android/** + - testing/scenario_app/** + - testing/skia_gold_client/** + - name: Linux linux_android_emulator_skia_tests bringup: true enabled_branches: diff --git a/ci/builders/linux_android_emulator_34.json b/ci/builders/linux_android_emulator_34.json index b03851631ed87..a9f7fb3fcb8d5 100644 --- a/ci/builders/linux_android_emulator_34.json +++ b/ci/builders/linux_android_emulator_34.json @@ -90,31 +90,6 @@ "--enable-impeller", "--impeller-backend=vulkan" ] - }, - { - "language": "dart", - "name": "Android Scenario App Integration Tests (Impeller/GLES)", - "test_timeout_secs": 900, - "max_attempts": 2, - "test_dependencies": [ - { - "dependency": "android_virtual_device", - "version": "android_34_google_apis_x64.textpb" - }, - { - "dependency": "avd_cipd_version", - "version": "build_id:8740267484269553649" - } - ], - "contexts": [ - "android_virtual_device" - ], - "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", - "parameters": [ - "--out-dir=../out/ci/android_emulator_debug_x64", - "--enable-impeller", - "--impeller-backend=opengles" - ] } ] }, diff --git a/ci/builders/linux_android_emulator_opengles_34.json b/ci/builders/linux_android_emulator_opengles_34.json new file mode 100644 index 0000000000000..8d3bfb423a105 --- /dev/null +++ b/ci/builders/linux_android_emulator_opengles_34.json @@ -0,0 +1,97 @@ +{ + "builds": [ + { + "drone_dimensions": [ + "device_type=none", + "os=Linux", + "kvm=1", + "cores=8" + ], + "gclient_variables": { + "use_rbe": true + }, + "gn": [ + "--android", + "--android-cpu=x64", + "--no-lto", + "--rbe", + "--no-goma", + "--target-dir", + "ci/android_emulator_debug_x64" + ], + "dependencies": [ + { + "dependency": "goldctl", + "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd" + } + ], + "name": "ci/android_emulator_debug_x64", + "description": "Build for debug mode x64 Android emulator tests, and Impeller scenario app tests.", + "ninja": { + "config": "ci/android_emulator_debug_x64", + "targets": [ + "flutter/impeller/toolkit/android:unittests", + "flutter/shell/platform/android:flutter_shell_native_unittests", + "flutter/testing/scenario_app" + ] + }, + "tests": [ + { + "language": "python3", + "name": "Android Unit Tests", + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_34_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/run_tests.py", + "parameters": [ + "--android-variant", + "ci/android_emulator_debug_x64", + "--type", + "android" + ] + }, + { + "language": "dart", + "name": "skia_gold_client/e2e_test", + "script": "flutter/testing/skia_gold_client/tool/e2e_test.dart", + "max_attempts": 1 + }, + { + "language": "dart", + "name": "Android Scenario App Integration Tests (Impeller/GLES)", + "test_timeout_secs": 900, + "max_attempts": 2, + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_34_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", + "parameters": [ + "--out-dir=../out/ci/android_emulator_debug_x64", + "--enable-impeller", + "--impeller-backend=opengles" + ] + } + ] + } + ] +} \ No newline at end of file