Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ed6da6a
[Impeller] adds wide gamut golden tests
gaaclarke Mar 15, 2024
b51b9a2
updated golden
gaaclarke Mar 18, 2024
55135b8
moved to a magic name
gaaclarke Mar 26, 2024
509f20b
[Impeller] fixes alpha blend for plus blend mode
gaaclarke Mar 15, 2024
47498e1
[Impeller] made plus an advanced blend
gaaclarke Mar 21, 2024
c2a9d68
fixed the blending math (jasons test passes now)
gaaclarke Mar 22, 2024
d3e714e
fixed ColorBlendReturnsExpectedResults test
gaaclarke Mar 25, 2024
85e93d7
refactored the geometry tests to not be dependent on order
gaaclarke Mar 25, 2024
dacb1e4
removed single plus test, renamed the overlapping one
gaaclarke Mar 25, 2024
418c811
fixed Play/AiksTest.PaintBlendModeIsRespected/OpenGLES
gaaclarke Mar 25, 2024
c3aa8cc
moved the test to the new magic name, removed the blending test
gaaclarke Mar 26, 2024
5b5e6ca
gave golden image tests the magic name feature
gaaclarke Mar 26, 2024
7953bd7
resurrected the old blend
gaaclarke Mar 26, 2024
eb03810
added switch for the advancedblend
gaaclarke Mar 26, 2024
9a8ee6f
added tests for the magic test name
gaaclarke Mar 27, 2024
7ca79f6
renamed some variables
gaaclarke Mar 27, 2024
337876d
moved things to match how they were
gaaclarke Mar 27, 2024
669a096
factored out the shared blend function
gaaclarke Mar 27, 2024
cc8ab6a
factored out shared function
gaaclarke Mar 27, 2024
90330f4
added skip for non metal tests
gaaclarke Mar 27, 2024
2650ee0
fixed opengl run
gaaclarke Mar 27, 2024
afa7908
updated goldens
gaaclarke Mar 27, 2024
7081ef7
updated goldens
gaaclarke Mar 27, 2024
5025ec1
added support for colorfilters
gaaclarke Mar 27, 2024
202f56d
format
gaaclarke Mar 27, 2024
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
Prev Previous commit
Next Next commit
added switch for the advancedblend
  • Loading branch information
gaaclarke committed Mar 27, 2024
commit eb038108da644b73fc8993c0e7143c027a7ba90a
14 changes: 14 additions & 0 deletions impeller/entity/entity_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,13 @@ bool EntityPass::RenderElement(Entity& element_entity,
return true;
}

namespace {
bool IsAlphaClampedToOne(PixelFormat pixel_format) {
Comment thread
gaaclarke marked this conversation as resolved.
Outdated
return !(pixel_format == PixelFormat::kR32G32B32A32Float ||
pixel_format == PixelFormat::kR16G16B16A16Float);
}
} // namespace

bool EntityPass::OnRender(
ContentContext& renderer,
Capture& capture,
Expand Down Expand Up @@ -941,6 +948,13 @@ bool EntityPass::OnRender(
/// Setup advanced blends.
///

if (result.entity.GetBlendMode() == BlendMode::kPlus &&
!IsAlphaClampedToOne(pass_context.GetPassTarget()
.GetRenderTarget()
.GetRenderTargetPixelFormat())) {
result.entity.SetBlendMode(BlendMode::kPlusAdvanced);
}

if (result.entity.GetBlendMode() > Entity::kLastPipelineBlendMode) {
if (renderer.GetDeviceCapabilities().SupportsFramebufferFetch()) {
auto src_contents = result.entity.GetContents();
Expand Down