Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 0428bbf

Browse files
author
Jonah Williams
authored
Merge branch 'main' into text_color_source_2
2 parents 30afa8b + 00f532d commit 0428bbf

File tree

8 files changed

+331
-53
lines changed

8 files changed

+331
-53
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Contributing to the Flutter engine
22
==================================
33

4-
[![Build Status](https://api.cirrus-ci.com/github/flutter/engine.svg)][build_status]
5-
64
_See also: [Flutter's code of conduct][code_of_conduct]_
75

86
Welcome

DEPS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ vars = {
1818
'llvm_git': 'https://llvm.googlesource.com',
1919
# OCMock is for testing only so there is no google clone
2020
'ocmock_git': 'https://github.com/erikdoe/ocmock.git',
21-
'skia_revision': '1428f16fc0de2bf7336cc9d0560a8eda4610c17d',
21+
'skia_revision': '4b30261160a2d7a9db67a0672120f34b19b1cd11',
2222

2323
# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
2424
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
@@ -884,7 +884,7 @@ deps = {
884884
'packages': [
885885
{
886886
'package': 'fuchsia/sdk/core/mac-amd64',
887-
'version': 'jkVyhV_xfb8Mv43xjXG7mCqcFhF4nOLIt-09DcU4YP4C'
887+
'version': '4LHUJjNlDT21v_pdTCXu00_kXfo-jPVXux859BpEX-YC'
888888
}
889889
],
890890
'condition': 'host_os == "mac" and not download_fuchsia_sdk',
@@ -894,7 +894,7 @@ deps = {
894894
'packages': [
895895
{
896896
'package': 'fuchsia/sdk/core/linux-amd64',
897-
'version': '0kEa4JczTMD0Xus08aFASyutpbphg0hMC0EqbOwjcRUC'
897+
'version': 'R_deCnScH70FbSeiihSu6SbWh9b-3dhoFwF2veJPIG8C'
898898
}
899899
],
900900
'condition': 'host_os == "linux" and not download_fuchsia_sdk',

ci/builders/mac_unopt.json

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
},
4040
"drone_dimensions": [
4141
"device_type=none",
42-
"os=Mac-12"
42+
"os=Mac-12",
43+
"cpu=x86"
4344
],
4445
"gclient_variables": {
4546
"download_android_deps": false
@@ -196,15 +197,28 @@
196197
"recipe": "engine_v2/tester_engine",
197198
"drone_dimensions": [
198199
"device_type=none",
199-
"os=Mac-12"
200+
"os=Mac-12",
201+
"cpu=x86"
200202
],
201203
"gclient_variables": {
202204
"download_android_deps": false
203205
},
204206
"dependencies": [
205207
"ios_debug_sim"
206208
],
207-
"tests": [
209+
"contexts": [
210+
"osx_sdk"
211+
],
212+
"properties": {
213+
"$flutter/osx_sdk": {
214+
"runtime_versions": [
215+
"ios-16-4_14e300c",
216+
"ios-16-2_14c18"
217+
],
218+
"sdk_version": "14e300c"
219+
}
220+
},
221+
"tasks": [
208222
{
209223
"language": "python3",
210224
"name": "Tests for ios_debug_sim",
@@ -234,7 +248,7 @@
234248
"drone_dimensions": [
235249
"device_type=none",
236250
"os=Mac-12",
237-
"cpu=arm64"
251+
"cpu=arm64"
238252
],
239253
"gclient_variables": {
240254
"download_android_deps": false
@@ -291,7 +305,19 @@
291305
"dependencies": [
292306
"ios_debug_sim_arm64_extension_safe"
293307
],
294-
"tests": [
308+
"contexts": [
309+
"osx_sdk"
310+
],
311+
"properties": {
312+
"$flutter/osx_sdk": {
313+
"runtime_versions": [
314+
"ios-16-4_14e300c",
315+
"ios-16-2_14c18"
316+
],
317+
"sdk_version": "14e300c"
318+
}
319+
},
320+
"tasks": [
295321
{
296322
"language": "python3",
297323
"name": "Tests for ios_debug_sim_arm64_extension_safe",

ci/licenses_golden/licenses_skia

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: 037575f99ed1b1b783807e1f7dc5ac89
1+
Signature: 4d24c4b80ad3418de33cea6b444a0bc3
22

33
====================================================================================================
44
LIBRARY: etc1

impeller/renderer/backend/vulkan/render_pass_vk.cc

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ namespace impeller {
3131

3232
static vk::AttachmentDescription CreateAttachmentDescription(
3333
const Attachment& attachment,
34-
const std::shared_ptr<CommandBufferVK>& command_buffer,
35-
bool resolve_texture = false) {
36-
const auto& texture =
37-
resolve_texture ? attachment.resolve_texture : attachment.texture;
34+
const std::shared_ptr<Texture> Attachment::*texture_ptr) {
35+
const auto& texture = attachment.*texture_ptr;
3836
if (!texture) {
3937
return {};
4038
}
@@ -51,12 +49,36 @@ static vk::AttachmentDescription CreateAttachmentDescription(
5149

5250
if (desc.storage_mode == StorageMode::kDeviceTransient) {
5351
store_action = StoreAction::kDontCare;
54-
} else if (resolve_texture) {
52+
} else if (texture_ptr == &Attachment::resolve_texture) {
5553
store_action = StoreAction::kStore;
5654
}
5755

5856
if (current_layout != vk::ImageLayout::ePresentSrcKHR &&
5957
current_layout != vk::ImageLayout::eUndefined) {
58+
// Note: This should incur a barrier.
59+
current_layout = vk::ImageLayout::eGeneral;
60+
}
61+
62+
return CreateAttachmentDescription(desc.format, //
63+
desc.sample_count, //
64+
load_action, //
65+
store_action, //
66+
current_layout //
67+
);
68+
}
69+
70+
static void SetTextureLayout(
71+
const Attachment& attachment,
72+
const vk::AttachmentDescription& attachment_desc,
73+
const std::shared_ptr<CommandBufferVK>& command_buffer,
74+
const std::shared_ptr<Texture> Attachment::*texture_ptr) {
75+
const auto& texture = attachment.*texture_ptr;
76+
if (!texture) {
77+
return;
78+
}
79+
const auto& texture_vk = TextureVK::Cast(*texture);
80+
81+
if (attachment_desc.initialLayout == vk::ImageLayout::eGeneral) {
6082
BarrierVK barrier;
6183
barrier.new_layout = vk::ImageLayout::eGeneral;
6284
barrier.cmd_buffer = command_buffer->GetEncoder()->GetCommandBuffer();
@@ -68,22 +90,11 @@ static vk::AttachmentDescription CreateAttachmentDescription(
6890
vk::PipelineStageFlagBits::eTransfer;
6991

7092
texture_vk.SetLayout(barrier);
71-
current_layout = vk::ImageLayout::eGeneral;
7293
}
7394

74-
const auto attachment_desc =
75-
CreateAttachmentDescription(desc.format, //
76-
desc.sample_count, //
77-
load_action, //
78-
store_action, //
79-
current_layout //
80-
);
81-
8295
// Instead of transitioning layouts manually using barriers, we are going to
8396
// make the subpass perform our transitions.
8497
texture_vk.SetLayoutWithoutEncoding(attachment_desc.finalLayout);
85-
86-
return attachment_desc;
8798
}
8899

89100
SharedHandleVK<vk::RenderPass> RenderPassVK::CreateVKRenderPass(
@@ -113,12 +124,16 @@ SharedHandleVK<vk::RenderPass> RenderPassVK::CreateVKRenderPass(
113124
vk::AttachmentReference{static_cast<uint32_t>(attachments.size()),
114125
vk::ImageLayout::eColorAttachmentOptimal};
115126
attachments.emplace_back(
116-
CreateAttachmentDescription(color, command_buffer));
127+
CreateAttachmentDescription(color, &Attachment::texture));
128+
SetTextureLayout(color, attachments.back(), command_buffer,
129+
&Attachment::texture);
117130
if (color.resolve_texture) {
118131
resolve_refs[bind_point] = vk::AttachmentReference{
119132
static_cast<uint32_t>(attachments.size()), vk::ImageLayout::eGeneral};
120133
attachments.emplace_back(
121-
CreateAttachmentDescription(color, command_buffer, true));
134+
CreateAttachmentDescription(color, &Attachment::resolve_texture));
135+
SetTextureLayout(color, attachments.back(), command_buffer,
136+
&Attachment::resolve_texture);
122137
}
123138
}
124139

@@ -127,7 +142,9 @@ SharedHandleVK<vk::RenderPass> RenderPassVK::CreateVKRenderPass(
127142
static_cast<uint32_t>(attachments.size()),
128143
vk::ImageLayout::eDepthStencilAttachmentOptimal};
129144
attachments.emplace_back(
130-
CreateAttachmentDescription(depth.value(), command_buffer));
145+
CreateAttachmentDescription(depth.value(), &Attachment::texture));
146+
SetTextureLayout(depth.value(), attachments.back(), command_buffer,
147+
&Attachment::texture);
131148
}
132149

133150
if (auto stencil = render_target_.GetStencilAttachment();
@@ -136,7 +153,9 @@ SharedHandleVK<vk::RenderPass> RenderPassVK::CreateVKRenderPass(
136153
static_cast<uint32_t>(attachments.size()),
137154
vk::ImageLayout::eDepthStencilAttachmentOptimal};
138155
attachments.emplace_back(
139-
CreateAttachmentDescription(stencil.value(), command_buffer));
156+
CreateAttachmentDescription(stencil.value(), &Attachment::texture));
157+
SetTextureLayout(stencil.value(), attachments.back(), command_buffer,
158+
&Attachment::texture);
140159
}
141160

142161
vk::SubpassDescription subpass_desc;

0 commit comments

Comments
 (0)