~whereswaldon/gio-x

087d853e23978346cc14d9055f0760b450413a13 — Chris Waldon 1 year, 7 months ago 59c1ef3
notify,profiling,stroke: gofmt

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
3 files changed, 34 insertions(+), 34 deletions(-)

M notify/notification_manager.go
M profiling/profiling.go
M stroke/util_test.go
M notify/notification_manager.go => notify/notification_manager.go +4 -4
@@ 1,12 1,12 @@
// Package notify provides cross-platform notifications for Gio applications.
//
// 	   https://gioui.org
//	https://gioui.org
//
// Sending a notification is easy:
//
//     notifier, _ := NewNotifier()
//     notification, _ := notifier.CreateNotification("hello!", "I was sent from Gio!")
//     notification.Cancel()
//	notifier, _ := NewNotifier()
//	notification, _ := notifier.CreateNotification("hello!", "I was sent from Gio!")
//	notification.Cancel()
package notify

import "sync"

M profiling/profiling.go => profiling/profiling.go +27 -27
@@ 4,33 4,33 @@ Package profiling provides tools for recording frame timings for later analysis.
The simplest usage is to construct a profilier at the start of your event loop
function and to defer stopping it until the window is closed. Something like:

    func loop(w *app.Window) error {
        // log to a CSV file with a randomly-chosen name. The file's path will be
        // logged to stderr.
        recorder, err := NewRecorder(nil)
        if err != nil {
            // handle
        }
        defer recorder.Stop()

        var ops op.Ops

        for event := range window.Events() {
            switch event := event.(type) {
                case system.DestroyEvent:
                    // returning will execute the deferred call to Stop(), which
                    // flushes the CSV file.
                    return event.Err
                case system.FrameEvent:
                    gtx := layout.NewContext(&ops, event)

                    // record the last frame's timing info and prepare the next one
                    recorder.profile(gtx)

                    // lay out your UI here
            }
        }
    }
	func loop(w *app.Window) error {
	    // log to a CSV file with a randomly-chosen name. The file's path will be
	    // logged to stderr.
	    recorder, err := NewRecorder(nil)
	    if err != nil {
	        // handle
	    }
	    defer recorder.Stop()

	    var ops op.Ops

	    for event := range window.Events() {
	        switch event := event.(type) {
	            case system.DestroyEvent:
	                // returning will execute the deferred call to Stop(), which
	                // flushes the CSV file.
	                return event.Err
	            case system.FrameEvent:
	                gtx := layout.NewContext(&ops, event)

	                // record the last frame's timing info and prepare the next one
	                recorder.profile(gtx)

	                // lay out your UI here
	        }
	    }
	}

The actual disk I/O is performed by a different goroutine and will not block the UI unless it gets more than 60 frames behind.
*/

M stroke/util_test.go => stroke/util_test.go +3 -3
@@ 128,9 128,9 @@ func alphaClose(c1, c2 color.RGBA) bool {
// yiqEqApprox compares the colors of 2 pixels, in the NTSC YIQ color space,
// as described in:
//
//   Measuring perceived color difference using YIQ NTSC
//   transmission color space in mobile applications.
//   Yuriy Kotsarenko, Fernando Ramos.
//	Measuring perceived color difference using YIQ NTSC
//	transmission color space in mobile applications.
//	Yuriy Kotsarenko, Fernando Ramos.
//
// An electronic version is available at:
//