openacg-group / cocoa Goto Github PK
View Code? Open in Web Editor NEWA general-purposed 2D rendering framework & visual novel engine.
Home Page: https://openacg-group.github.io
License: GNU General Public License v3.0
A general-purposed 2D rendering framework & visual novel engine.
Home Page: https://openacg-group.github.io
License: GNU General Public License v3.0
Trace improvements and additions of documentations
Plan to implement RasterPipeline
, which is an image processing API based on native Skia API, and optionally integrate OpenCV WASM. This API allows users to generate and process images by creating a DAG (Directed Acyclic Graph) pipeline. Each node in the DAG could process or generate images, and they are connected together so that a node can take another node's output as its input. This is very similar to AVFilterDAG
class in utau
module, which process video or audio frames by a DAG constructed by ffmpeg's DSL (AVFilterDAG.MakeFromDSL()
). But RasterPipeline
is for static images, which means it is simplified and does not consider some complex things in multimedia processing, like frame timing. And RasterPipeline
is designed for glamor
module, supporting Skia APIs instead of VideoFrame
or AudioFrame
API in utau
module.
Development of RasterPipeline
is in progress.
Cocoa has planned to use RasterCache machanism in the painting stage of layer tree to speed up rendering.
Track the process of CanvasKit integration.
WebAssembly-based JavaScript module CanvasKit is removed from the project. Instead, Skia native APIs are now available for less overhead while painting.
CanvasKit has been the painting interface for JavaScript in Cocoa for a long time. However, for many reasons, we have to remove it from the repository. Users can still compile a canvaskit.wasm
by themselves and import it as a common WebAssembly module to use it. Here are the most important reasons why we deprecate it:
CkImage
, CkPicture
, CkBitmap
and so on, while CanvasKit also has its corresponding classes SkImage
, SkPicture
, and SkBitmap
. Users must do many things to convert between those data types. For example, when you try to write a simple music player by Cocoa, you need to use Utau module to extract and decode the cover image from mp3 file. Utau decoder gives you a VideoBuffer
object, which can be converted to Glamor's CkImage
object. Supposing that you want to preprocess it using CanvasKit (e.g. apply a Gaussian blur filter), then you must firstly convert the CkImage
object to CanvasKit's SkImage
object before preprocessing it. The preprocessed image should be rendered on the window, which means you need to convert the preprocessed image back to Glamor's CkImage
object. That is quite painful and complex.SkPicture
objects generated by SkPictureRecorder
also must be converted to Glamor's CkPicture
before adding it to the Glamor's layer tree. Converting between them is implemented by serializing and deserializing the picture object. If the picture object contains typefaces or large images, the conversion is an expensive operation. We have implmented a complicated mechanism to reduce the overhead for typefaces (#3), but for large images, it is a quite difficult problem.CkPicture
from deserializing breaks the cache mechanism.Now with the native Skia APIs, object conversions are not needed anymore, and pixels copying can be reduced to the minimal value. For the music player example shown above, pixels will be copyed N time(s) before it is submitted to Blender or landed on a certain surface:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.