Git Product home page Git Product logo

plinth's People

Contributors

david7a68 avatar

Watchers

 avatar

plinth's Issues

Set a compile time target

Something like < 500ms for an incremental build?

Probably also need something for a fresh build, though that's made much more difficult with the windows crate.

Add startup logging

  • any decisions that are made on startup (allocation sizes, configuration, etc).
  • key milestones
    • GPU initialization
    • loading of static resources
    • etc.

Expose system power state and events

  • Event: battery alert (low, normal)
    • Add callback in event handler
    • Pick up and forward events from Windows
  • Event: power source change (internal, backup, external)
    • Add callback in event handler
    • Pick up and forward events from Windows
  • Event: monitor state change (on, dimmed, off)
    • Add callback in event handler
    • Pick up and forward events from Windows
  • Event: power preference change (performance, balanced, power)
    • Add callback in event handler
    • Pick up and forward events from Windows

Draw text

  • sketch out API
  • add operation to canvas
  • implement DirectWrite backend
  • profit?

VSync clock

Windows should be able to register to be repainted in a way that synchronizes with the compositor.

Define coordinate resolution and modify `RRect` to use packed values.

  • xywh: i16Q4x4 (-16383 to 16384 with 2 fractional bits (0.0, 0.25, 0.75, 1.0))
    • 2 * 4 = 8 bytes
  • uvwh: u12x4
    • 6 bytes
  • rgba: f16x4
    • 2 * 4 = 8 bytes
  • itex: u8 (max 256 textures)
    • 1 byte
  • flag: u8
    • 1 byte

Total: 24 bytes

With Rounding:

  • bevl: i16Q4x4
    • 2 * 4 = 8 bytes

Total: 24 + 8 = 32 bytes

With gradients and rounding:

  • rgba: `[f16x4; 2]' (2-point gradient, add a second color)
    • 2 * 4 * 2 = 16 bytes
  • grad: `[i16Q4x2; 2]'
    • 2 * 2 * 2 = 8 bytes

Total: 32 + 16 = 48 bytes

With gradients, rounding, and rotation:

  • rotp: i16Q4x2 (center of rotation)
    • 2 * 2 = 4 bytes
  • rotr: f16 (radians of rotation)
    • 2 bytes

Total: 48 + 6 = 54 bytes

This size must be aligned to the size of float4 which leaves us with 64 bytes per primitive and 10 bytes to play with.

Other extra features

  • 7 bytes for a second texture to support masking/clipping to another texture.
  • 2 bytes to describe hollowness (to render only a border)
  • reduce bevel from 4 corners to 2 and use a flag to choose between horizontal and vertical to save 4 bytes
  • horizontal shear with 2 bytes
  • edge softness with 2 bytes

Implementing all of those features would take up 63 bytes (still 1 byte free!).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.