Conversely, Skia is a 2D graphics library. It abstracts away the underlying graphics API (which can be OpenGL, Vulkan, Metal, or a software rasterizer). The developer works with high-level objects: SkCanvas , SkPaint , SkPath , SkImage , and SkTextBlob . To draw a rounded rectangle with a gradient, one simply calls canvas->drawRRect() with a paint object. Skia then decomposes this high-level command into lower-level GPU primitives, manages batching, handles clipping and transformation, and efficiently flushes the commands to the GPU via a backend (e.g., OpenGL). Thus, OpenGL is a tool for building a renderer, while Skia is a renderer for 2D content.
OpenGL, in its default form (especially when referring to the core profile without immediate mode), is a procedural API designed to interact directly with the GPU. Its model is a state machine: you set the current color, texture, matrix, shader program, and blending mode, then issue vertices. The GPU then executes a fixed sequence of operations: vertex shading, primitive assembly, rasterization, fragment shading, and per-sample operations. This pipeline is exceptionally powerful and flexible, capable of rendering complex 3D scenes, but it demands that the developer manage every minute detail—from vertex buffer objects (VBOs) and shader compilation to texture atlases and depth testing. There is no inherent concept of a "rectangle," "circle," or "paragraph of text"; these must be built from triangles and textures. opengl default vs skia
Skia, by contrast, provides world-class text rendering out-of-the-box. It leverages FreeType on the backend, manages glyph caching, supports subpixel positioning, and even offers DirectWrite on Windows. For paths, Skia uses a high-quality tessellator or can fall back to a stencil-and-cover algorithm for extremely smooth, antialiased curves. The difference in development effort is staggering: a complete vector drawing app can be built in days with Skia, while the same from scratch in OpenGL would be a master’s thesis. Conversely, Skia is a 2D graphics library
Rendering high-quality text and smooth vector paths is notoriously difficult in raw OpenGL. One must load fonts, rasterize glyphs into textures, manage a glyph atlas, handle kerning and subpixel positioning, and write shaders for gamma correction and hinting. Similarly, drawing a Bezier path requires tessellating it into triangles (using libraries like libtess2) or implementing GPU-side path rendering (using NV_path_rendering, which is not standard OpenGL). This is weeks or months of engineering work. To draw a rounded rectangle with a gradient,
Conversely, Skia is a 2D graphics library. It abstracts away the underlying graphics API (which can be OpenGL, Vulkan, Metal, or a software rasterizer). The developer works with high-level objects: SkCanvas , SkPaint , SkPath , SkImage , and SkTextBlob . To draw a rounded rectangle with a gradient, one simply calls canvas->drawRRect() with a paint object. Skia then decomposes this high-level command into lower-level GPU primitives, manages batching, handles clipping and transformation, and efficiently flushes the commands to the GPU via a backend (e.g., OpenGL). Thus, OpenGL is a tool for building a renderer, while Skia is a renderer for 2D content.
OpenGL, in its default form (especially when referring to the core profile without immediate mode), is a procedural API designed to interact directly with the GPU. Its model is a state machine: you set the current color, texture, matrix, shader program, and blending mode, then issue vertices. The GPU then executes a fixed sequence of operations: vertex shading, primitive assembly, rasterization, fragment shading, and per-sample operations. This pipeline is exceptionally powerful and flexible, capable of rendering complex 3D scenes, but it demands that the developer manage every minute detail—from vertex buffer objects (VBOs) and shader compilation to texture atlases and depth testing. There is no inherent concept of a "rectangle," "circle," or "paragraph of text"; these must be built from triangles and textures.
Skia, by contrast, provides world-class text rendering out-of-the-box. It leverages FreeType on the backend, manages glyph caching, supports subpixel positioning, and even offers DirectWrite on Windows. For paths, Skia uses a high-quality tessellator or can fall back to a stencil-and-cover algorithm for extremely smooth, antialiased curves. The difference in development effort is staggering: a complete vector drawing app can be built in days with Skia, while the same from scratch in OpenGL would be a master’s thesis.
Rendering high-quality text and smooth vector paths is notoriously difficult in raw OpenGL. One must load fonts, rasterize glyphs into textures, manage a glyph atlas, handle kerning and subpixel positioning, and write shaders for gamma correction and hinting. Similarly, drawing a Bezier path requires tessellating it into triangles (using libraries like libtess2) or implementing GPU-side path rendering (using NV_path_rendering, which is not standard OpenGL). This is weeks or months of engineering work.