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

Commit e78be6d

Browse files
committed
rebase
1 parent fc7c77e commit e78be6d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

impeller/entity/contents/texture_contents.cc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,21 @@ bool TextureContents::Render(const ContentContext& renderer,
159159
}
160160
pipeline_options.primitive_type = PrimitiveType::kTriangleStrip;
161161

162+
std::shared_ptr<Pipeline<PipelineDescriptor>> pipeline;
162163
#ifdef IMPELLER_ENABLE_OPENGLES
163164
if (is_external_texture) {
164-
pass.SetPipeline(renderer.GetTextureExternalPipeline(pipeline_options));
165+
pipeline = renderer.GetTextureExternalPipeline(pipeline_options);
165166
}
166167
#endif // IMPELLER_ENABLE_OPENGLES
167168

168-
if (!cmd.pipeline) {
169+
if (!pipeline) {
169170
if (strict_source_rect_enabled_) {
170-
pass.SetPipeline(renderer.GetTextureStrictSrcPipeline(pipeline_options));
171+
pipeline = renderer.GetTextureStrictSrcPipeline(pipeline_options);
171172
} else {
172-
pass.SetPipeline(renderer.GetTexturePipeline(pipeline_options));
173+
pipeline = renderer.GetTexturePipeline(pipeline_options);
173174
}
174175
}
176+
pass.SetPipeline(pipeline);
175177

176178
pass.SetStencilReference(entity.GetClipDepth());
177179
pass.SetVertexBuffer(vertex_builder.CreateVertexBuffer(host_buffer));
@@ -190,9 +192,9 @@ bool TextureContents::Render(const ContentContext& renderer,
190192

191193
FSStrictSrc::FragInfo frag_info;
192194
frag_info.source_rect = Vector4(strict_texture_coords.GetLTRB());
193-
FSStrictSrc::BindFragInfo(cmd, host_buffer.EmplaceUniform(frag_info));
195+
FSStrictSrc::BindFragInfo(pass, host_buffer.EmplaceUniform(frag_info));
194196
FSStrictSrc::BindTextureSampler(
195-
cmd, texture_,
197+
pass, texture_,
196198
renderer.GetContext()->GetSamplerLibrary()->GetSampler(
197199
sampler_descriptor_));
198200
} else {

0 commit comments

Comments
 (0)