Questions tagged [skia]

Skia is a complete C++ 2D graphics library for drawing text, geometries, and images.

Skia is a key part of several shipping products, including chromium, and as such will continue to track those projects' needs and priorities. However, Skia is also a general purpose graphics engine.

Features include:

  • 3x3 matrices w/ perspective
  • antialiasing, transparency, filters
  • shaders, xfermodes, maskfilters, patheffects
  • subpixel text

Device backends for Skia currently include:

  • Raster
  • OpenGL
  • PDF
  • XPS
  • Picture (for recording and then playing back into another Canvas)

Ports include:

  • Android
  • Windows
  • Macintosh
  • Linux

More information available at

  1. http://code.google.com/p/skia/
  2. http://en.wikipedia.org/wiki/Skia_Graphics_Engine
319 questions
2
votes
1 answer

How to use GPU accelerated SkCanvas in usual iOS application (based on UIWindow)?

Is it possible to add OpenGL view to UIWindow and use Skia to draw on it? I found an example, where we initialize such view: - (void)initialize { CAEAGLLayer* layer = (CAEAGLLayer*)self.layer; layer.opaque = NO; …
2
votes
2 answers

Blurry text with SkiaSharp in WPF

I`m using the SkiaSharp to draw text in WPF. http://lostindetails.com/blog/post/SkiaSharp-with-Wpf https://github.com/8/SkiaSharp-Wpf-Example As you can see the text is not sharp. You can easily notice that by comparing the text with the…
Vahid
  • 5,144
  • 13
  • 70
  • 146
2
votes
1 answer

why skia on windows has bad efficiency

I compared skia with gdi painting on windows. both drawing 98000 random lines. to my suprise that skia is far low efficiency than gdi(the skia painting cost 1600ms, while gdi cost 0ms). my testing code was paste below. any suggestions? bool…
qianyi
  • 71
  • 6
2
votes
1 answer

Using SkiaSharp in Visual Studio

I'm researching the use of SkiaSharp for a future project, following the documentation currently available on GitHub: https://developer.xamarin.com/guides/cross-platform/drawing/introduction/ I'm developing on Visual Studio 2013 on Windows 7. I…
Simon Bosley
  • 1,114
  • 3
  • 18
  • 41
2
votes
0 answers

Why does the "No Target rule error" keeps on occurring even after providing target rule in Android.mk file?

Iam trying to configure CPP files from SKIA library in NDK project. The error make: ***No rule to make target keeps on occurring even after i have provided target rule in Android.mk file. Here is my code LOCAL_PATH:=$(call…
Chitra
  • 21
  • 1
2
votes
0 answers

Blend mode to replace highest alpha?

Is there a blend mode that does the following? Essentially take the highest alpha closest to opaque. A = (Da > Sa) ? Da : Sa C = Sc I'm more interested in the alpha behavior than the color behavior.
Jona
  • 13,325
  • 15
  • 86
  • 129
2
votes
0 answers

How to build skia library for ios with 64 bit support

I'm trying to build skia library for ios. The xcode project generate command GYP_DEFINES="skia_os='ios' skia_arch_type='arm' armv7=1 arm_neon=0" ./gyp_skia always return GYP_GENERATORS environment variable not set, using default, does this mean the…
Zhiqiang Li
  • 401
  • 7
  • 16
2
votes
3 answers

Android, Skia, and hardware accelerated graphics

This page http://source.android.com/devices/graphics.html says: Prior to Android 3.0, Canvas used the Skia 2D drawing library to draw, which could not take advantage of hardware acceleration. Introduced in Android 3.0, hardware acceleration for…
mlepage
  • 2,372
  • 2
  • 19
  • 15
2
votes
0 answers

How to speed up text measurement on Android?

I'm writing an application that has a custom text layout engine, and for this to work I must measure lots (thousands) of Strings using the .getTextBounds() method on the Paint class. It does work. But on some devices, this measurement is extremely…
Zsombor Erdődy-Nagy
  • 16,864
  • 16
  • 76
  • 101
2
votes
2 answers

SKIA - Inaccurate value returned by measureText()

I have a problem measuring text using skia measureText() function. The value returned is inaccurate. SkPaint *skPaint = new SkPaint(); SkTypeface* myFont = SkTypeface::CreateFromName("Impact",…
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
2
votes
1 answer

Android Canvas hardware acceleration

Upon the link Hardware accleration I found that Canvas now supports hardware acceleration(mostly). I downloaded the 4.2.2 AOSP(API Level 17) source and checked the code in external/skia/src/core/sKCanvas.cpp I reached sKCanvas.cpp because this will…
Sam
  • 4,521
  • 13
  • 46
  • 81
1
vote
4 answers

Is there documentation for Android Skia logcat output?

I'm sometimes getting this message in logcat: 11-09 14:24:04.680: D/skia(2111): --- gOptions_mCancelID and I don't know what it means. Googling it found a C++ file which, presumably, represents an instantiation of the bitmap…
Andrew Wyld
  • 7,133
  • 7
  • 54
  • 96
1
vote
1 answer

Flutter - Text foreground is not showing up on iOS

I'm trying to create a text with a border. I've written this code LayoutBuilder( builder: (_, constraints) => Container( width: constraints.maxHeight, decoration: BoxDecoration( border: Border.all(width: 1), …
Ale TheFe
  • 1,540
  • 15
  • 43
1
vote
0 answers

React native Skia is not compatible with babylon

I am trying to use react-native-skia with @babylonjs/react-native(1.6.1) and RN 0.71 but can not use both of them together. Only of them is visible on the screen. I had the same problem earlier with RN 0.70 where skia drawings were not available in…
Narendra
  • 4,514
  • 2
  • 21
  • 38
1
vote
0 answers

Logcat flooded by Minwook devBounds

today i updated my Samsung A53 to Android 13 and after this when i debug my app the logcat gets flooded by the following message 2023-05-11 16:00:08.936 3766-3892 skia package.name D Minwook devBounds(70.2) Offset.fX(-6.4) Does anyone know…
Lars
  • 794
  • 7
  • 21