Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
render_pass_unittests.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
7#include "gtest/gtest.h"
8
10
11namespace flutter::gpu {
12namespace {
13
14// Regression test for https://github.com/flutter/flutter/issues/188712:
15// SetDepthWriteEnable must honor its argument. It previously ignored the
16// argument and always enabled depth writes, so disabling depth writes (for
17// example to keep overlapping translucent draws from self-occluding) had no
18// effect.
19TEST(FlutterGpuRenderPassTest, SetDepthWriteEnableHonorsArgument) {
20 auto render_pass = fml::MakeRefCounted<RenderPass>();
21
23 EXPECT_TRUE(render_pass->GetDepthAttachmentDescriptor().depth_write_enabled);
24
26 EXPECT_FALSE(render_pass->GetDepthAttachmentDescriptor().depth_write_enabled);
27}
28
29} // namespace
30} // namespace flutter::gpu
void InternalFlutterGpu_RenderPass_SetDepthWriteEnable(flutter::gpu::RenderPass *wrapper, bool enable)
TEST(FrameTimingsRecorderTest, RecordVsync)
std::shared_ptr< RenderPass > render_pass