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
1
vote
1 answer

Skia buggy color blending

I'm using Skia m62 with Open GL backend and getting the glitch while rendering png file. To create SkBitmap I'm using the following code: const auto codec = SkCodec::MakeFromStream(SkStream::MakeFromFile("test.png")); const SkImageInfo imageInfo =…
Vsevolod Ganin
  • 623
  • 8
  • 22
1
vote
0 answers

Picasso get jpeg decoding error on mobile network

I'm making the wallpaper and have an error while loading image using Picasso on mobile network, important thing that the same image is loading perfectly via wi-fi! I have added the bigger timeout but problem is still percist: …
Alisa
  • 23
  • 4
1
vote
1 answer

Error A/libc: Fatal signal 11 (SIGSEGV) at 0x00000018 (code=1) in SkPath

I am getting the following error when I tap on a button in my application: A/libc: Fatal signal 11 (SIGSEGV) at 0x00000018 (code=1), thread 11024 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000018 eax 00000000 ebx b7d117e8 ecx 00000001…
Henry
  • 17,490
  • 7
  • 63
  • 98
1
vote
1 answer

Sometimes Bitmap decoding return SkImageDecoder::Factory returned null and it displays corrupted image

I developed the below class to receive image sent with header (22 bytes) first I decode the header to check the image correctness then I decode the image but not all images are decoded sometimes it returns with SkImageDecoder::Factory returned null.…
zelf
  • 93
  • 1
  • 1
  • 7
1
vote
1 answer

BitmapFactory.decodeByteArray() always returns null (manually-created byte array)

So i'm trying to port some C++ code from a colleague that grabs image data over a Bluetoth serial port (I'm using an Android phone). From the data I will need to generate a bitmap. Before testing the ported code, I wrote this quick function to…
Max Fuller
  • 53
  • 1
  • 5
1
vote
1 answer

Skia view element in xamarin.forms

I'm trying to draw new elements/images via the new skiasharp library for xamarin forms. I got the samples working but they only change the full content page with the new canvas. So my question would be how to implement a single view which can be…
Chris
  • 105
  • 1
  • 10
1
vote
0 answers

BitmapFactory image decoding in Android, how it is different from iOS?

The image is given as Base64 encoded string, I had decode and pass to BitmapFactory class, then I got a log saying skia returned false. I did the fix by using FilterInputStream still its failing. So to identify the issue with image decoding part, I…
sreekumar
  • 2,439
  • 1
  • 21
  • 27
1
vote
0 answers

Android M Bitmap crash

I am trying to create a Android Bitmap object(Java) in JNI(C++) through reflection. Below code was working fine until Android L version but not on Android M. In Android M, name of mNativeBitmap is modified to mNativePtr which is taken into…
1
vote
0 answers

How can I emulate the perspective used by android view's `setRotationY` etc on another platform?

I would like to emulate the behaviour of transformed Android views in a different context (CSS 3d transforms, iOS CALayers, and OpenGL), so that given particular viewport dimensions and the same rotations/translations/scaling, elements will be…
mseddon
  • 1,815
  • 17
  • 28
1
vote
1 answer

SKIA Rendering on Windows(SkCanvas from HDC)

I'm trying to use SKIA for drawing on Windows. Is there anyway to initiate SkCanvas from HDC ?
user2179256
  • 659
  • 2
  • 9
  • 21
1
vote
1 answer

Skia hit-test with SkBounder

As used in DebugHitTestBounder in SampleApp; I have subclassed SkBounder and installed in my canvas (created in each draw) in order to find what is drawn under mouse clicks but the onIRect method is never called by the drawing routines. The commit…
user3648895
  • 395
  • 10
  • 20
1
vote
1 answer

Xamarin Android. Transform Byte array to Bitmap. Skia Decoder returns false

I am getting the following error when trying to transform some images stored in a SQLite database as blob into bitmap. [skia] --- decoder->decode returned false I am trying the following code: // Loads a Bitmap from a byte array public static…
PPCC
  • 95
  • 1
  • 9
1
vote
1 answer

Embedding skia control in Qt window

I have a complicated custom control written using skia. Is it possible to embedd this control inside a Qt application? How do I integrate with the window events? Is there an example that shows how to do this? Thanks.
codefx
  • 9,872
  • 16
  • 53
  • 81
1
vote
1 answer

How to draw text on an EGL texture using Skia SkBitmap?

I am looking for a way to draw text on EGLTexture using Skia library in C/C++. I am planning to run a program that does it on Android platform during bootup before SurfaceFlinger comes up. Please don't point me to Android Java examples as that is…
videoguy
  • 1,732
  • 2
  • 24
  • 49
1
vote
1 answer

Why will my android native activity sometimes display a bad image when rendering a bitmap?

I'm trying to use NDK to display a bitmap on a full screen. The requirement force me to develop with completely native code. I use Skia to draw a SkBitmap, then display it by Opengl APIs. When my application first time run on a real android device,…
Vito Li
  • 23
  • 1
  • 6