Flutter Engine
 
Loading...
Searching...
No Matches
solid_rrect_blur_contents.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6#include <optional>
7
14
15namespace impeller {
16
18 const ContentContext& renderer,
19 PassContext& pass_context) const {
20 using FS = RRectBlurPipeline::FragmentShader;
21
22 FS::FragInfo frag_info;
23 frag_info.color = GetColor();
24 frag_info.center_adjust = Concat(pass_context.center, pass_context.adjust);
25 frag_info.r1_exponent_exponentInv =
26 Vector3(pass_context.r1, pass_context.exponent, pass_context.exponentInv);
27 frag_info.sInv_minEdge_scale =
28 Vector3(pass_context.sInv, pass_context.minEdge, pass_context.scale);
29
30 auto& data_host_buffer = renderer.GetTransientsDataBuffer();
31 pass.SetCommandLabel("RRect Shadow");
32 pass.SetPipeline(renderer.GetRRectBlurPipeline(pass_context.opts));
33
34 FS::BindFragInfo(pass, data_host_buffer.EmplaceUniform(frag_info));
35 return true;
36}
37
39
41
42} // namespace impeller
HostBuffer & GetTransientsDataBuffer() const
Retrieve the current host buffer for transient storage of other non-index data.
PipelineRef GetRRectBlurPipeline(ContentContextOptions opts) const
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition render_pass.h:30
virtual void SetPipeline(PipelineRef pipeline)
The pipeline to use for this command.
virtual void SetCommandLabel(std::string_view label)
The debugging label to use for the command.
bool SetPassInfo(RenderPass &pass, const ContentContext &renderer, PassContext &pass_context) const override
static Vector4 Concat(Vector2 &a, Vector2 &b)
LinePipeline::FragmentShader FS