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_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 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);