~inkeliz


#191 clip.Path.Quad doesn't work on android 4 days ago

Comment by ~inkeliz on ~eliasnaur/gio

I don't know, but anyway...

Using:

c.Cube(f32.Pt(widthAll/2, heightQuad), f32.Pt(widthAll/2, heightQuad), f32.Pt(widthAll, 0))

Fixes the problem on all plataforms now. I not sure why it doesn't work at first on Windows. 🤦‍♂️

#191 clip.Path.Quad doesn't work on android 4 days ago

Comment by ~inkeliz on ~eliasnaur/gio

I don't know if it helps to find the issue, but...

On Android, using:

c.Cube(f32.Pt(widthAll/2, heightQuad), f32.Pt(widthAll/2, heightQuad), f32.Pt(widthAll, 0))

Creates the same correct curve (i.e: https://imgur.com/fdGx6Hi ).

However... On Windows it's wrong.


On Windows I need to use:

c.Cube(f32.Pt(0, 0), f32.Pt(widthAll/2, heightQuad), f32.Pt(widthAll, 0))

In order to have the same effect (https://imgur.com/tyEo7Kr ). But, it breaks on Android, again.


In general, on Android I need to use the first point to f32.Pt(widthAll/2, heightQuad) and on Windows I need to set it to f32.Pt(0,0). However, on JS it's big problem, because the GOOS is always JS and I can't switch the behavior from Windows/Android. Maybe using some browser detection, but it doesn't seems good.

#191 clip.Path.Quad doesn't work on android 4 days ago

Comment by ~inkeliz on ~eliasnaur/gio

That is odd that only on Android it happens, even on JS. I thought that it's related to the PxPerDp, but I think it's not.


I hope that the new render gets better, currently it doesn't work well on 3 out of 4 devices that I have. I send one video about that: https://slack-files.com/T029RQSE6-F01J2G0MKDJ-5a75f6dc25. I need to create some small code to reproduce that issue, but on my app that issue (shown on the video) occurr everytime. It's minimize if I cache the CallOp, but it doesn't fix 100%.

In general:

  • Morotola Droid Maxx: Significantly slower + Image artifacts. (doesn't test too much).
  • Xiaomi 7A: Significantly slower (90ms+ vs 8ms) + Image artifacts + Black Page on rotate (need to touch to display the image again).
  • Morotola E6S: Significantly slower (60ms+ vs 5ms) + Currupted fonts/characters + Long white-screen on startup.
  • Xiaomi Note 9: Significantly slower (25ms+ vs 2ms). (no other issues).

I'm trying to make some small code that causes all the issues above, but I don't figure out what is causing that. However, on my app that is the results.

#191 clip.Path.Quad doesn't work on android 5 days ago

Ticket created by ~inkeliz on ~eliasnaur/gio

Seems that there's a problem with path.quad():

	gtx.Constraints.Max.Y = gtx.Px(unit.Dp(200))
	heightQuad := float32(gtx.Px(unit.Dp(40)))
	heightRect := float32(gtx.Constraints.Max.Y) - (heightQuad)
	widthAll := float32(gtx.Constraints.Max.X)

	c := clip.Path{}
	c.Begin(new(op.Ops))
	c.Move(f32.Pt(0, 0))
	c.Line(f32.Pt(widthAll, 0))
	c.Line(f32.Pt(0, heightRect))
	fmt.Println("pos", c.Pos())
	c.Line(f32.Pt(-widthAll, 0))
	c.Line(f32.Pt(0, -heightRect))
	c.Move(f32.Pt(0, heightRect))
	c.Quad(f32.Pt(widthAll/2, heightQuad), f32.Pt(widthAll, 0))
	c.Close()
	outline := clip.Outline{Path: c.End()}
	outline.Op().Add(gtx.Ops)
	paint.Fill(gtx.Ops, color.NRGBA{R: 230, G: 24, B: 93, A: 255})

On Windows (and JS on Windows) it works correctly: https://imgur.com/tyEo7Kr

On Android (and JS on Android) it not work: https://imgur.com/mhxK0z4

On Android (with New-Rendering) it works: https://imgur.com/fdGx6Hi

#190 Option to change/reduce framerate 13 days ago

Ticket created by ~inkeliz on ~eliasnaur/gio

Seems that Gio generates a new frame each 16ms (except on JS/WASM), while animating. I'm considering that each frame is calling w.Invalidate(), which happens on animations.

However, I think should be nice to have a option to change the framerate.


Personally, I would like to change the framerate in the following situations:

  1. When the app is uncapable to delivery 60FPS, due to slow CPU/GPU.
  2. When the device is running with "prefer low-motion" enabled (similar of "prefers-reduced-motion" from CSS).
  3. When the device is running on "battery-saver mode" or "low-power mode".

#180 Support for "Editor.Unfocus" 18 days ago

on ~eliasnaur/gio

REPORTED RESOLVED FIXED

#179 wasm: removing getError improves performance a month ago

on ~eliasnaur/gio

REPORTED RESOLVED FIXED

#186 wasm: WebGL 2 crashes on iOS/Safari a month ago

Ticket created by ~inkeliz on ~eliasnaur/gio

It's possible to use WebGL 2 on Safari, enabling in the "experimental features". However, Gio doesn't work when it's enabled.

I don't know why. It's an experimental feature, so may lack something that Gio needs, but I'm not sure. I don't have proper tools to debug that, the console doesn't give anything. The "WebGL 2 tests" runs when that feature is enabled, just Gio which doesn't.


To enable WebGL 2 on iOS:

  1. Open the "Settings" (from the device itself).
  2. Find Safari and click on it.
  3. Click in "Advance Options", which is the last one.
  4. Click in "Experimental Features".
  5. Enable the "WebGL 2".

Open any Gio example, it will not load anymore. :\

#184 Prevent invalid/unsupported characters to appear on Editor a month ago

Ticket created by ~inkeliz on ~eliasnaur/gio

Some characters aren't supported by some text-fonts/ttf: such as emojis and other symbols. Currently, it leads the Editor to display an "empty space" (" "), "square" ("□") or nothing ("") instead of the symbol.

However, the Editor.Text() will return such character too, since it's not removed.


I think the Editor should (optionally) verify if the text is valid for the current font. Then, stripping invalid characters. So, if the user inserts some "emoji" it will be removed (if the font doesn't handle it), the user will not see some , and the Editor.Text() will not include the emoji too.


I'm not sure if it's possible and if will have some considerable performance impact for each new entry.

#180 Support for "Editor.Unfocus" a month ago

Comment by ~inkeliz on ~eliasnaur/gio

I'm testing with the cheap Android now, using:

key.InputOp{Tag: &pseudo, Focus: true}.Add(gtx.Ops)
key.HideInputOp{}.Add(gtx.Ops)

That opens the keyboard and then close, which may take sometime (you notice the screen moving and white bar below). I think it could be fixed until we have some FocusOp.


provided there was no other FocusOps with Focus set to true

But how we force some FocusOps to be false? It's not the same problem of the current one?

The focus will open the keyboard or it's an combination of FocusOps and InputOp? I also think that the InputOp could have some field like InputOp.SoftKeyboard, because some widgets (like buttons or float/slider) can work based on keys (slider can use arrows keys, buttons can use "enter-key"...), but it doesn't should open the software-keyboard/on-screen-keyboard.