This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://cs.opensource.google/go/x/tools/+/refs/tags/v0.27.0:go/types/typeutil/callee.go might be better | |
func checkGlobalFunctionCall(call *ast.CallExpr, pkg *packages.Package) (pkgPath, funcName string, ok bool) { | |
switch caller := call.Fun.(type) { | |
case *ast.SelectorExpr: | |
// Skip if the selector is a method call. | |
if sel := pkg.TypesInfo.Selections[caller]; sel != nil { | |
return | |
} | |
ident, ok := caller.X.(*ast.Ident) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<style> | |
body { | |
background-color: black; | |
margin: 0; | |
padding: 0; | |
overflow: hidden; | |
font-family: sans-serif; | |
color: white; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: 0BSD | |
package font | |
import ( | |
"image" | |
"image/color" | |
"golang.org/x/image/font" | |
"golang.org/x/image/math/fixed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2022/08/23 11:56:34 SO: /usr/lib/wine/../x86_64-linux-gnu/wine/ntdll.dll.so | |
2022/08/23 11:56:34 SO: /usr/lib/wine/../x86_64-linux-gnu/wine/kernel32.dll.so | |
2022/08/23 11:56:34 SO: /usr/lib/wine/../x86_64-linux-gnu/wine/kernelbase.dll.so | |
2022/08/23 11:56:34 SO: /usr/lib/wine/../x86_64-linux-gnu/wine/advapi32.dll.so | |
2022/08/23 11:56:34 SO: /usr/lib/wine/../x86_64-linux-gnu/wine/winmm.dll.so | |
2022/08/23 11:56:34 SO: /usr/lib/wine/../x86_64-linux-gnu/wine/user32.dll.so | |
2022/08/23 11:56:34 SO: /usr/lib/wine/../x86_64-linux-gnu/wine/gdi32.dll.so | |
2022/08/23 11:56:34 SO: /usr/lib/wine/../x86_64-linux-gnu/wine/version.dll.so | |
2022/08/23 11:56:34 SO: /usr/lib/wine/../x86_64-linux-gnu/wine/msvcrt.dll.so | |
2022/08/23 11:56:34 SO: /usr/lib/wine/../x86_64-linux-gnu/wine/ole32.dll.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---- | |
Update count per frame: 1 | |
Internal image sizes: | |
2: (16, 16) | |
3: (16, 16) | |
4: (4096, 4096) | |
5: (1024, 1024) | |
6: (1600, 1200) | |
Graphics commands: | |
new-image: result: 1, width: 1024, height: 1024, screen: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name old time/op new time/op delta | |
SprintfPadding 221ns ± 2% 748ns ± 1% +238.78% (p=0.008 n=5+5) | |
SprintfEmpty 18.8ns ± 1% 111.3ns ± 3% +490.87% (p=0.008 n=5+5) | |
SprintfString 51.4ns ± 0% 246.9ns ± 3% +379.98% (p=0.016 n=4+5) | |
SprintfTruncateString 94.0ns ± 1% 359.7ns ± 1% +282.49% (p=0.008 n=5+5) | |
SprintfTruncateBytes 92.0ns ± 2% 362.8ns ± 1% +294.35% (p=0.008 n=5+5) | |
SprintfSlowParsingPath 62.4ns ± 3% 281.0ns ± 1% +350.13% (p=0.008 n=5+5) | |
SprintfQuoteString 357ns ± 1% 1304ns ± 2% +264.88% (p=0.008 n=5+5) | |
SprintfInt 42.3ns ± 1% 228.4ns ± 8% +439.50% (p=0.008 n=5+5) | |
SprintfIntInt 83.2ns ± 1% 391.2ns ± 0% +370.36% (p=0.008 n=5+5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/renderer/replacepixels.go b/renderer/replacepixels.go | |
index 2de8786..72c9dd6 100644 | |
--- a/renderer/replacepixels.go | |
+++ b/renderer/replacepixels.go | |
@@ -8,11 +8,17 @@ import ( | |
"github.com/hajimehoshi/ebiten/v2" | |
) | |
-var screenBuffer *image.RGBA | |
+var ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:latest | |
RUN apt-get update && apt-get install -y \ | |
gcc-10-aarch64-linux-gnu \ | |
gcc-10-multilib \ | |
wget | |
# Install Go | |
RUN wget -O go.tar.gz https://dl.google.com/go/go1.15.7.linux-amd64.tar.gz && \ | |
tar -C /usr/local -xzf go.tar.gz && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"image" | |
"image/color" | |
"image/draw" | |
"image/png" | |
"os" | |
"strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copyright 2012 The Go Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style | |
# license that can be found in the LICENSE file. | |
# git gofmt pre-commit hook | |
# | |
# To use, store as .git/hooks/pre-commit inside your repository and make sure | |
# it has execute permissions. | |
# |
NewerOlder