common taskscheduler: revise functionalities.
[platform/core/graphics/tizenvg.git] / inc / thorvg.h
index d22acbb..0de9bc0 100644 (file)
@@ -1,19 +1,3 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *               http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
 #ifndef _THORVG_H_
 #define _THORVG_H_
 
@@ -283,6 +267,7 @@ public:
     ~Picture();
 
     Result load(const std::string& path) noexcept;
+    Result load(const char* data, uint32_t size) noexcept;
     Result viewbox(float* x, float* y, float* w, float* h) const noexcept;
 
     static std::unique_ptr<Picture> gen() noexcept;
@@ -326,7 +311,9 @@ class TVG_EXPORT SwCanvas final : public Canvas
 public:
     ~SwCanvas();
 
-    Result target(uint32_t* buffer, uint32_t stride, uint32_t w, uint32_t h) noexcept;
+    enum Colorspace { ABGR8888 = 0, ARGB8888 };
+
+    Result target(uint32_t* buffer, uint32_t stride, uint32_t w, uint32_t h, Colorspace cs) noexcept;
 
     static std::unique_ptr<SwCanvas> gen() noexcept;
 
@@ -379,7 +366,7 @@ public:
      *
      * @see ...
      */
-    static Result init(CanvasEngine engine) noexcept;
+    static Result init(CanvasEngine engine, uint32_t threads) noexcept;
     static Result term(CanvasEngine engine) noexcept;
 
     _TVG_DISABLE_CTOR(Initializer);