issues

package
v1.17.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package issues holds the reproductions of reported issues that the tests of every platform share: what to draw or do, a report of what came of it that can be written as text on a device and read on the host, and the check of the report. A fix is tried on one machine, and its renderer or platform code runs on the others too (Vulkan, OpenGL ES, Metal, Direct3D 12, WebGPU; Linux, Android, Windows, macOS, iOS, the web), so each platform has a test that runs the same reproduction and the same check: in the test process where a device can be opened there, in an app on the emulator, the Simulator or a browser page where it cannot.

The package is plain Go with no OS tags, and it does not import testing: the apps of the device tests link it (examples/dev/android-parity, the page apps gpuwebtest and glwebtest).

Index

Constants

View Source
const (
	AtlasFullWidth  = 1920
	AtlasFullHeight = 1080
)

AtlasFullWidth and AtlasFullHeight are the size of the frames of the reproduction, in pixels.

View Source
const (
	// DoneLine follows the last line of the report: the run of the issue ended without an error.
	DoneLine = "GLUTTER_ISSUE done"
	// FailedLine is the line of a run that failed, followed by the error.
	FailedLine = "GLUTTER_ISSUE failed"
)

The lines that an app which prints its report into its output (internal/iostest/issueapp, in the Simulator) ends the report with, so that the test on the host knows when the report is whole. The lines of the report are those of the issue's Lines.

View Source
const (
	// GuardAllocsLayout lays out leaves whose PerformLayout sets their size.
	GuardAllocsLayout = "layout"
	// GuardAllocsResize lays out leaves sized by their parent: PerformResize and PerformLayout.
	GuardAllocsResize = "resize"
	// GuardAllocsPaint paints leaves that draw nothing.
	GuardAllocsPaint = "paint"
	// GuardAllocsDispatch dispatches a pointer event to targets that do nothing with it.
	GuardAllocsDispatch = "dispatch"
)

The cases of the reproduction, in the order of the report.

View Source
const (
	SoftMipmapsWidth  = 640
	SoftMipmapsHeight = 480
)

SoftMipmapsWidth and SoftMipmapsHeight are the size of the frames of the reproduction, in pixels.

View Source
const AtlasFullName = "atlas-full"

AtlasFullName is the name of the issue: what an app of a device test is asked for, and the prefix of the lines of its report.

View Source
const Env = "GLUTTER_ISSUE"

Env is the environment variable that names the issue an app of a device test reproduces (examples/dev/android-parity, internal/iostest/issueapp): the app and the test on the host agree on it here.

View Source
const GuardAllocsName = "guard-allocs"

GuardAllocsName is the name of the issue: what an app of a device test is asked for, and the prefix of the lines of its report.

View Source
const SoftMipmapsName = "soft-mipmaps"

SoftMipmapsName is the name of the issue: what an app of a device test is asked for, and the prefix of the lines of its report.

View Source
const TagIssueReportInvalid = "IssueReportInvalid"

TagIssueReportInvalid is the tag of the error of a report that does not read.

Variables

This section is empty.

Functions

func ShadowsScene

func ShadowsScene(n int) *ui.Scene

ShadowsScene draws n shadows of panels that fill a surface of AtlasFullWidth x AtlasFullHeight pixels, each of a size of its own, so that no two share their tiles of the coverage atlas.

func SoftMipmapsPicture

func SoftMipmapsPicture(seed uint8) *ui.Image

SoftMipmapsPicture returns a picture of the reproduction: 1024 x 768 pixels of blocks of 16 pixels in two colors that the seed changes.

Types

type AtlasFullDraw

type AtlasFullDraw func(scene *ui.Scene, width, height int) (*image.RGBA, AtlasFullStats, error)

AtlasFullDraw draws a scene of the given size on the renderer under test and returns the pixels of the frame and the renderer's numbers of it.

type AtlasFullFrame

type AtlasFullFrame struct {
	Name string
	AtlasFullStats
	// Pixels is the SHA-256 of the frame's pixels, in hexadecimal.
	Pixels string
	// Shadow is how much a pixel just under the largest panel differs from a pixel of the
	// background in a corner of the frame, summed over the four channels: nothing where no
	// shadow was drawn, whatever the background is (white in a window, nothing off screen).
	Shadow int
}

AtlasFullFrame is what came of one frame.

func AtlasFullFrameOf

func AtlasFullFrameOf(name string, img *image.RGBA, st AtlasFullStats) AtlasFullFrame

AtlasFullFrameOf makes the record of a frame from its pixels and the renderer's numbers.

type AtlasFullReport

type AtlasFullReport struct {
	Frames []AtlasFullFrame
}

AtlasFullReport is what came of the frames of the reproduction on one renderer.

func ParseAtlasFull

func ParseAtlasFull(lines []string) (AtlasFullReport, error)

ParseAtlasFull reads a report from the lines of an app's file or output; lines that are not of the report are passed over. It fails with IssueReportInvalid for a line of the report that does not read.

func RunAtlasFull

func RunAtlasFull(draw AtlasFullDraw) (AtlasFullReport, *image.RGBA, error)

RunAtlasFull draws the frames of the reproduction and returns the report and the pixels of the first frame. An error of a frame, which is the issue itself on the code before the fix (AtlasFull), ends the run: the report then has the frames before it.

func (AtlasFullReport) Lines

func (r AtlasFullReport) Lines() []string

Lines returns the report as text, one line for each frame, for an app on a device to write into a file or its output.

func (AtlasFullReport) Problems

func (r AtlasFullReport) Problems() []string

Problems checks the report and returns what is wrong, one line for each finding; none when the renderer drew the frame of the issue whole, kept its tiles for the same frame, freed the pages over what the atlas keeps after the small frame, and drew the first frame again with the pixels it had.

type AtlasFullScene

type AtlasFullScene struct {
	Name  string
	Scene *ui.Scene
}

AtlasFullScene is one frame of the reproduction.

func AtlasFullScenes

func AtlasFullScenes() []AtlasFullScene

AtlasFullScenes returns the frames of the reproduction, in the order a renderer draws them: the frame of the issue, the same again (its tiles are kept), a small frame (the pages over what the atlas keeps are freed), and the first again (on pages made again).

type AtlasFullStats

type AtlasFullStats struct {
	TilesRasterized int
	AtlasFull       int
	Skipped         int
	Unsupported     []string
}

AtlasFullStats is what a renderer says of a frame it drew (the fields of the same names of explicit.FrameStats and gles.FrameStats).

type GuardAllocsCase

type GuardAllocsCase struct {
	Name string
	// Allocs is the allocations of the frame for each child (each target for the dispatch): the
	// difference between a frame with the children and one without, the least of several runs.
	Allocs float64
	// Context is the context of the report of a panic in one child, or "" when the panic was not
	// reported.
	Context string
}

GuardAllocsCase is what came of one case.

type GuardAllocsReport

type GuardAllocsReport struct {
	// Debug says whether the build that made the report is a debug build (foundation.DebugMode),
	// whose checks allocate more.
	Debug bool
	Cases []GuardAllocsCase
}

GuardAllocsReport is what came of the reproduction.

func ParseGuardAllocs

func ParseGuardAllocs(lines []string) (GuardAllocsReport, error)

ParseGuardAllocs reads a report from the lines of an app's file or output; lines that are not of the report are passed over. It fails with IssueReportInvalid for a line of the report that does not read.

func RunGuardAllocs

func RunGuardAllocs() GuardAllocsReport

RunGuardAllocs runs the reproduction in the calling goroutine. It changes GOMAXPROCS to one while it counts, as testing.AllocsPerRun does, and puts it back.

func (GuardAllocsReport) Lines

func (r GuardAllocsReport) Lines() []string

Lines returns the report as text, a line of the build and one for each case, for an app on a device to write into a file or its output.

func (GuardAllocsReport) Problems

func (r GuardAllocsReport) Problems() []string

Problems returns what is wrong with the report: a case that allocates for each child or target, or a panic that is not reported with the context that names where it was. None means the issue is fixed on the platform that made the report.

type SoftMipmapsDraw

type SoftMipmapsDraw func(scene *ui.Scene, width, height int) (*image.RGBA, SoftMipmapsStats, error)

SoftMipmapsDraw draws a scene of the given size on the renderer under test, as one frame, and returns the pixels of the frame and what the renderer's cache of mipmap chains says after it.

type SoftMipmapsFrame

type SoftMipmapsFrame struct {
	Name string
	// Built is how many mipmap chains the frame made, and Chains how many the renderer holds
	// after it.
	Built, Chains int
	// Picture and Spinner are the SHA-256, in hexadecimal, of the pixels of a band of the picture
	// far from the spinner and of the box the spinner turns in.
	Picture, Spinner string
	// Block says whether the middle of the first block of the picture, at half its size, has the
	// color of the picture the frame shows, within 3 in each channel.
	Block bool
}

SoftMipmapsFrame is what came of one frame.

func SoftMipmapsFrameOf

func SoftMipmapsFrameOf(sc SoftMipmapsScene, img *image.RGBA, built, chains int) SoftMipmapsFrame

SoftMipmapsFrameOf makes the record of a frame from its pixels and the chains it made and the renderer holds.

type SoftMipmapsReport

type SoftMipmapsReport struct {
	Frames []SoftMipmapsFrame
}

SoftMipmapsReport is what came of the frames of the reproduction on one renderer.

func ParseSoftMipmaps

func ParseSoftMipmaps(lines []string) (SoftMipmapsReport, error)

ParseSoftMipmaps reads a report from the lines of an app's file or output; lines that are not of the report are passed over. It fails with IssueReportInvalid for a line of the report that does not read.

func RunSoftMipmaps

func RunSoftMipmaps(draw SoftMipmapsDraw) (SoftMipmapsReport, error)

RunSoftMipmaps draws the frames of the reproduction and returns the report. An error of a frame ends the run: the report then has the frames before it.

func (SoftMipmapsReport) Lines

func (r SoftMipmapsReport) Lines() []string

Lines returns the report as text, one line for each frame, for an app on a device to write into a file or its output.

func (SoftMipmapsReport) Problems

func (r SoftMipmapsReport) Problems() []string

Problems checks the report and returns what is wrong, one line for each finding; none when the renderer made the chain of each picture once, kept both, and drew every frame with the picture it shows and the spinner where it turned to.

type SoftMipmapsScene

type SoftMipmapsScene struct {
	Name  string
	Scene *ui.Scene
	// Seed is the seed of the picture the frame shows.
	Seed uint8
}

SoftMipmapsScene is one frame of the reproduction.

func SoftMipmapsScenes

func SoftMipmapsScenes() []SoftMipmapsScene

SoftMipmapsScenes returns the frames of the reproduction, in the order a renderer draws them. Each picture is recorded once, in a layer of its own, as a repaint boundary keeps it, and the spinner is a layer over it that changes in every frame.

type SoftMipmapsStats

type SoftMipmapsStats struct {
	Chains int
	Built  int
}

SoftMipmapsStats is what a renderer's cache of mipmap chains says after a frame (the fields of the same names of soft.CacheStats): the chains it holds, and how many it has made since it was made.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL