Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare API for the first release #11

Open
13 of 18 tasks
dacap opened this issue Jul 20, 2019 · 1 comment
Open
13 of 18 tasks

Prepare API for the first release #11

dacap opened this issue Jul 20, 2019 · 1 comment
Assignees
Milestone

Comments

@dacap
Copy link
Member

dacap commented Jul 20, 2019

Some changes that must be done for a probable first release of the library (some of these items are implemented in an internal beta version that will be published in the near future):

  • update to Skia m81
  • add Surface::drawText() expand the current os::draw_text() function (Drawing text as functions instead of Surface members #12) and remove freetype usage if possible, use Skia directly to draw text, SkShaper module uses harfbuzz+icu
  • rename os::Display::setTitleBar() -> setTitle()
  • os::Surface::bounds() -> Rect(0, 0, width, height)
  • os::Display::invalidate() = os::Display->invalidateRegion(display->surface->bounds)
  • what to do with os::ScopedHandle? add os::DisplayHandle and os::SurfaceHandle aliases? or use move semantic and pimpl idiom?
  • rename os::Display -> os::Window?
  • add API to get main monitor/screen, list of monitors/screen, bounds of each monitor, etc.
  • create an example that can create 4 windows in a 2x2 grid of windows on each monitor
  • add a new kind of coordinate/position for os::Display that is bounds + monitor/screen
  • getEvent() -> replace bool arg with an enum { WaitForEvents, DontWait } we've replaced the parameter with a timeout
  • enable GPU support again and create a simple OpenGL example
  • create an example about complex text layout / new text API
  • merge all os::Surface::drawSurface()/blitTo() in one member function with a os::Paint argument
  • decide if constants should have k prefix (e.g. os::Event::ResizeDisplay vs os::kArrowCursor; or os::Key::Esc instead of os::kKeyEsc) / Check web KeyboardEvent codes as a reference / Review keyboard events #50
  • create test about color spaces
  • prepare API documentation / tutorial
  • ...
@dacap dacap self-assigned this Jul 20, 2019
@dacap dacap added this to the laf v0.1 milestone Jun 16, 2021
@dacap dacap pinned this issue May 13, 2022
dacap added a commit that referenced this issue May 13, 2022
* We've added a new "shader" example to show the capabilities of SkSL
shading language (it works on CPU without acceleration, and with GPU
shaders). More info: https://skia.org/docs/user/sksl/

* The macOS port still need some work as live resizing is not
working/refreshing the window properly.

* The API needs some refactor to support different GPU
backends (Raster, OpenGL, Direct3D, Metal, etc.)

* We still need a way to specify the GPU acceleration by
window (instead of system-wide) and when we change the option the
window/OpenGL context should be updated/created/destroyed
immediately (right now a resize events must be generated to update the
backend).

Related to:
aseprite/aseprite#960
#11
@dacap
Copy link
Member Author

dacap commented Mar 20, 2024

I'm not 100% sure if we should use uppercase or lowercase in the initial letter of static member functions, e.g.

  • class System { ... static System* instance(); ... } or
  • class System { ... static System* Instance(); ... }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant