Commit graph

39 commits

Author SHA1 Message Date
JunsuChoi
c70d1b1e45
SwRender & tvgPaint: Implement ClipPath feature (#68)
common sw_engine: Implement ClipPath feature

Paint object can composite by using composite API.
ClipPath composite is clipping by path unit of paint.
The following cases are supported.

Shape->composite(Shape);
Scene->composite(Shape);
Picture->composite(Shape);

Add enum
  enum CompMethod { None = 0, ClipPath };

Add APIs
  Result composite(std::unique_ptr<Paint> comp, CompMethod method) const noexcept;

* Example: Added testClipPath
2020-10-07 11:21:23 +09:00
Hermet Park
ea028a479c gl_engine: fix compile error.
After refactoring header includsion, gl_engine has a break at file dependencies.
now this fixes it.
2020-09-25 14:00:16 +09:00
Hermet Park
e49c9eb459 changed file permission 2020-09-08 20:29:24 +09:00
Hermet Park
a61c8cc360 gl_engine: fix by coding convention.
A *a; (x)
A* a; (o)
A &a; (x)
A& a; (o)
2020-09-08 15:24:31 +09:00
Pranay Kumar Samanta
af190033bb gl_engine: gradient implementation
Change-Id: If2413328437847d52ba1badc3b5c510fdd47ccd3
2020-09-08 14:45:48 +09:00
Hermet Park
8685c7e0f0 common: fix context corruption among the multiple canvases.
previous implementation didn't consider multiple canvases,
multiple canvas shared one renderer engine that brought corrupted contexts.
Thus, each canvas instances should have designated renderer engine instances.

Now fixed.
2020-09-05 18:55:51 +09:00
Hermet Park
04c6295974 code refactoring
remove unnecessary condition.
implementation won't be included multiple times not like headers.

Thus this condition is unnecessary.

Change-Id: Id37e675c40ce7213a06c950da8e5ca17ff7245c9
2020-08-20 16:16:46 +09:00
Hermet Park
3b22a25798 gl_engine: engine should return shape data for resuing it.
Change-Id: I45f7ecbdb707b0751894e01d273b149402e089af
2020-08-13 20:01:03 +09:00
Hermet Park
0b95e55e2f gl_engine renderer: initialize member data in default.
static analizyer bothers us due to this.
we'd rather initialize members for free of them.

Change-Id: Ifa6ebffdfdcb31d2dd3a1d6b911226928f654e3f
2020-08-13 19:02:31 +09:00
Hermet Park
9893af979f replace license from Apache 2.0 to MIT
Change-Id: I61f7cb2b0e407bc035f3b2ec7da9b7f230057e24
2020-08-13 16:53:38 +09:00
Hermet Park
d92fc13d8b gl_engine: fix compile warnings
this statement may fall through [-Werror=implicit-fallthrough=]

Change-Id: I3cfc9b51697e229a524f6f75e10b83715b06ce13
2020-08-06 16:57:38 +09:00
Hermet Park
7214559ad9 common: fix compile warnings.
--Werror=unused-parameter

Change-Id: If4c04e3e20b67be62b50c3b1e2e909dbd848eccc
2020-08-06 16:48:26 +09:00
Hermet Park
d2d4a2a3e7 gl_engine: updated file permission.
please keep 664 for files.

Change-Id: Iaddd87b0d35a74bc8c6cbf330fecbd28e14ad57a
2020-07-28 20:57:34 +09:00
Pranay Kumar Samanta
3b385d1d54 gl_engine: Fix crash in animation callback. Refactor test samples draw function. Fix open shape drawing.
Change-Id: I9ca2cb3951f2229f36292b69221451e0eaf5b6a1
2020-07-17 07:54:58 +00:00
Hermet Park
99428ee80a build: support features toggling in meson option.
Change-Id: Id1ebda70fe8380aaa913f79af26e5c39893a6df5
2020-07-08 15:30:12 +09:00
Hermet Park
e2fc353846 build: refactoriong meson script.
move gl dependency to gl_engine part which is right position.

Change-Id: I9d4935f94eff96ca1527762c92d07f9b216f19cd
2020-07-08 10:47:04 +09:00
Hermet Park
4156de72f1 sw_engine: optimize rasterizey by threading it.
Also, newly introduced render interfaces: preRender(), postRender(), flush()

Change-Id: If506fa27e3c7dbd89f6734cad4774c1d151b88aa
2020-06-24 18:43:11 +09:00
Hermet Park
01e52c7c7a common loader: build up loader infrastructure.
Change-Id: I62aaed43015301ec39e414833f37d6c5485d8043
2020-06-19 15:46:02 +09:00
Hermet Park
0e25879d12 correct unmatched files permission.
Please keep file permission 664.

Change-Id: I90bdfa76b4f94a06d3b560df42509f30e59111a4
2020-06-18 18:44:52 +09:00
Pranay Kumar Samanta
968286df57 gl_engine: implement gl infrastructure interfaces & test Gl shape sample
Change-Id: Ie142616bf02f9bd50ac8e88e31ed9f782dd6324b
Signed-off-by: Pranay Kumar Samanta <pranay.ks@samsung.com>
2020-06-18 18:36:10 +09:00
Hermet Park
c36f23e80d common gradient: implement linear/radial gradient interfaces.
Change-Id: Ica9c54e662e73592d3fddcabed09b1605b3a5a4f
2020-06-10 17:03:25 +09:00
Hermet Park
498a024df8 common: ++optimization
replace dynamic_cast to static_cast,

This can be a controversial choice between optmization and clean code.

Obviously we know the converting types,
try avoiding a bit heavier casting some cases.

Change-Id: Id763e6d1db449a229a492ab5b1a901a195936152
2020-06-09 20:32:22 +09:00
Hermet Park
58de99aea3 common interface: replace arguements size_t to uint32_t
We prefer to build up a tiny compact engine at memory rather than compatibility,
this engine is not considerd for end-users but designed for middle-level framework
and some low-level users.

Thus, we won't consider 64bits data size,
use explicit 32 bits data until coming next upgrade...

Change-Id: I0704d5f1e0eb909cccc10922bc5972e115fbbcc0
2020-06-09 15:36:34 +09:00
Prudhvi Raj Vasireddi
48e47b272b gl_engine: gl infrastructure interfaces
Change-Id: Ie1a9d1b6632433413098282c1cfaf4cf8e1cf9b9
Signed-off-by: Prudhvi Raj Vasireddi <prudhvi.raj@samsung.com>
2020-05-26 13:56:35 -04:00
Hermet Park
40ef2f1575 fix wrong flag operation.
just correct mistakes.

Change-Id: I8de0fe68cd298cacf3bdc951f67657095c5fa5fe
2020-05-06 11:56:17 +09:00
Hermet Park
b08d144dc9 common shape: introduce transformation matrix
Paint supports translate, rotate, scale functions for transformation

The origin of these transformation is center of the paint,
thus you have to consider the center-aligned vertices if you'd like to use
these transformation functions.

This policy has been considered for scene transformation.

Change-Id: I78b63d7965faec0ec5b9a98a7776993744534b54
2020-05-06 02:05:09 +09:00
Hermet Park
682bc25298 common shape: revise scale/rotate approach.
Come to think of it, this optimized method is not so useful,
it could just bring the user misunderstanding and
not to efficient as I expected in the most cases.

So, changed policy for transformation behaviors.
it keeps the properties as others but leaves it to the backend implementation.

Plus, this change contains the correct RenderUpdateFlag.
You can refer the flag in the backend to figure out which kinds of properites has been updated

Change-Id: Ibe0494712598a8161950b9ae2e22ac45bed1c47b
2020-05-03 15:03:29 +09:00
Hermet Park
42c56757df common: redesigned interfaces
PaintNode -> Paint
ShapeNode -> Shape
SceneNode -> Scene

We can keep clean and neat shorter names.

Change-Id: Ic8521d456d947985e5fbe1ba2bde06faa1f52469
2020-05-02 18:20:50 +09:00
Hermet Park
0be7e0cf53 canvas: migrate render target clear call into draw();
Obivously, we need to clear target before drawing.

Thus canvas request to renderers to clear buffer.

the implementation is upto backend engines.

Change-Id: Ib80da7f2260b021bcfed9fa13fb91c20218f9da0
2020-05-02 17:33:41 +09:00
Hermet Park
a8864390e2 canvas: code refactoring
accept an extra argument in the clear() to clear paints node

and clear buffer selectively.

Change-Id: I83721e74358f546f325bb03fd1f36c7565174dd7
2020-05-02 11:25:07 +09:00
Hermet Park
37d34eeb19 sw_engine: concrete shape rendering sequence.
Succeed first sw backend screen up!

Change-Id: I882fb1726ed1f45e92e73fbc36170e93645dfbd2
2020-04-19 18:28:01 +09:00
Hermet Park
7097940c22 code refactoring.
revise internal class & variable names for better code readibility.

Change-Id: I7f1b4474f3129c3be04444350496485f000afd15
2020-04-18 23:07:15 +09:00
Hermet Park
9b7337622d rename class names.
RasterMethod -> RenderMethod
SwEngine -> SwRenderer
GlEngine -> GlRenderer

Change-Id: Ic2ded698e49c4373fe21fe31fa34baca01bf43a2
2020-04-18 23:00:44 +09:00
Hermet Park
c8d800f6c6 sw_engine: implement line and curve raster
Change-Id: I22a77892544cd510cfe646aee60093cebb848806
2020-04-18 19:56:10 +09:00
Hermet Park
de242b018b replace backend class names.
SwRaster to SwEngine
GlRaster to GlEngine

Change-Id: I3cf70e168b78c64754807a62c221e13c11b95c35
2020-04-18 12:44:40 +09:00
Hermet Park
70c9860d8f implement rle raster.
Change-Id: Ie21dfbf0ff1aed43bfa750eeef3b8c033a986416
2020-04-13 13:42:24 +09:00
Hermet Park
f9fcd58744 implement shape basics sw engine.
Change-Id: I93788f40f7c4f59bcc9ab4dff9127bcb4e6c1466
2020-04-04 13:47:20 +09:00
Hermet Park
701b482131 implement sw engine basic sequence.
Change-Id: Ide27c9b191088109f95e03fcd1c80ad3ecc058cd
2020-04-03 19:36:31 +09:00
Hermet Park
02b2d812e4 implement basic interfaces
major functions are added for Path specification.
added backend engine infra skeleton.

Change-Id: Ia923b02649cff545fa768ab8538ad7187195826f
2020-04-02 17:24:38 +09:00