Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
97 changes: 97 additions & 0 deletions ci/builders/linux_android_emulator_opengles_34.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
]
}
]
}
19 changes: 19 additions & 0 deletions impeller/aiks/canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -743,6 +744,24 @@ void Canvas::DrawImageRect(const std::shared_ptr<Texture>& image,
return;
}

if (image->GetTextureDescriptor().type == TextureType::kTextureExternalOES) {
auto texture_contents = std::make_shared<TiledTextureContents>();
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> 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);
Expand Down