mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
Previously, both mask and clip-path were rendered to separate mutable Gfx::Bitmap objects which forced CPU rasterization. They were then combined using a CPU pixel-by-pixel operation before being returned as an ImmutableBitmap. Instead of including mask in the final bitmap as already rasterized images, we now use display lists which opens opportunity to utilize GPU if available. Bitmap::apply_mask() and ApplyMaskBitmap display list command are no longer used and have been removed.
70 lines
1002 B
C++
70 lines
1002 B
C++
/*
|
|
* Copyright (c) 2020, Andreas Kling <andreas@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
namespace Gfx {
|
|
|
|
class Bitmap;
|
|
class CMYKBitmap;
|
|
class ImmutableBitmap;
|
|
class Color;
|
|
|
|
class Emoji;
|
|
class Font;
|
|
class GlyphRun;
|
|
class ImageDecoder;
|
|
struct FontPixelMetrics;
|
|
|
|
class Painter;
|
|
class PaintingSurface;
|
|
class Palette;
|
|
class YUVData;
|
|
class PaletteImpl;
|
|
class Path;
|
|
class ShareableBitmap;
|
|
class SkiaBackendContext;
|
|
struct SystemTheme;
|
|
|
|
template<typename T>
|
|
class Triangle;
|
|
|
|
template<typename T>
|
|
class Point;
|
|
|
|
template<typename T>
|
|
class Size;
|
|
|
|
template<typename T>
|
|
class Rect;
|
|
|
|
template<typename T>
|
|
class Quad;
|
|
|
|
using IntRect = Rect<int>;
|
|
using FloatRect = Rect<float>;
|
|
|
|
using IntPoint = Point<int>;
|
|
using FloatPoint = Point<float>;
|
|
|
|
using IntSize = Size<int>;
|
|
using FloatSize = Size<float>;
|
|
|
|
using FloatQuad = Quad<float>;
|
|
|
|
enum class BitmapFormat;
|
|
enum class ColorRole;
|
|
enum class TextAlignment;
|
|
|
|
enum class MaskKind {
|
|
Alpha,
|
|
Luminance
|
|
};
|
|
|
|
}
|
|
|
|
using Gfx::Color;
|