LibreOffice Module vcl (master) 1
|
#include <salbmp.hxx>
Public Types | |
using | DirectImage = SkiaHelper::DirectImage |
Public Member Functions | |
SkiaSalBitmap () | |
SkiaSalBitmap (const sk_sp< SkImage > &image) | |
virtual | ~SkiaSalBitmap () override |
virtual bool | Create (const Size &rSize, vcl::PixelFormat ePixelFormat, const BitmapPalette &rPal) override |
virtual bool | Create (const SalBitmap &rSalBmp) override |
virtual bool | Create (const SalBitmap &rSalBmp, SalGraphics *pGraphics) override |
virtual bool | Create (const SalBitmap &rSalBmp, vcl::PixelFormat eNewPixelFormat) override |
virtual bool | Create (const css::uno::Reference< css::rendering::XBitmapCanvas > &rBitmapCanvas, Size &rSize, bool bMask=false) override |
virtual void | Destroy () final override |
virtual Size | GetSize () const override |
virtual sal_uInt16 | GetBitCount () const override |
virtual BitmapBuffer * | AcquireBuffer (BitmapAccessMode nMode) override |
virtual void | ReleaseBuffer (BitmapBuffer *pBuffer, BitmapAccessMode nMode) override |
virtual bool | GetSystemData (BitmapSystemData &rData) override |
virtual bool | ScalingSupported () const override |
virtual bool | Scale (const double &rScaleX, const double &rScaleY, BmpScaleFlag nScaleFlag) override |
virtual bool | Replace (const Color &rSearchColor, const Color &rReplaceColor, sal_uInt8 nTol) override |
virtual bool | InterpretAs8Bit () override |
virtual bool | ConvertToGreyscale () override |
virtual bool | Erase (const Color &color) override |
virtual bool | AlphaBlendWith (const SalBitmap &rSalBmp) override |
virtual bool | Invert () override |
const BitmapPalette & | Palette () const |
bool | PreferSkShader () const |
const sk_sp< SkImage > & | GetSkImage (DirectImage direct=DirectImage::No) const |
sk_sp< SkShader > | GetSkShader (const SkSamplingOptions &samplingOptions, DirectImage direct=DirectImage::No) const |
const sk_sp< SkImage > & | GetAlphaSkImage (DirectImage direct=DirectImage::No) const |
sk_sp< SkShader > | GetAlphaSkShader (const SkSamplingOptions &samplingOptions, DirectImage direct=DirectImage::No) const |
OString | GetImageKey (DirectImage direct=DirectImage::No) const |
OString | GetAlphaImageKey (DirectImage direct=DirectImage::No) const |
bool | IsFullyOpaqueAsAlpha () const |
SkAlphaType | alphaType () const |
void | TryDirectConvertToAlphaNoScaling () |
void | dump (const char *file) const |
bool | unittestHasBuffer () const |
bool | unittestHasImage () const |
bool | unittestHasAlphaImage () const |
bool | unittestHasEraseColor () const |
bool | unittestHasPendingScale () const |
const sal_uInt8 * | unittestGetBuffer () const |
const SkImage * | unittestGetImage () const |
const SkImage * | unittestGetAlphaImage () const |
void | unittestResetToImage () |
Public Member Functions inherited from SalBitmap | |
SalBitmap () | |
virtual | ~SalBitmap () |
virtual bool | Create (const Size &rSize, vcl::PixelFormat ePixelFormat, const BitmapPalette &rPal)=0 |
virtual bool | Create (const SalBitmap &rSalBmp)=0 |
virtual bool | Create (const SalBitmap &rSalBmp, SalGraphics *pGraphics)=0 |
virtual bool | Create (const SalBitmap &rSalBmp, vcl::PixelFormat eNewPixelFormat)=0 |
virtual bool | Create (const css::uno::Reference< css::rendering::XBitmapCanvas > &rBitmapCanvas, Size &rSize, bool bMask=false)=0 |
virtual void | Destroy ()=0 |
virtual Size | GetSize () const =0 |
virtual sal_uInt16 | GetBitCount () const =0 |
virtual BitmapBuffer * | AcquireBuffer (BitmapAccessMode nMode)=0 |
virtual void | ReleaseBuffer (BitmapBuffer *pBuffer, BitmapAccessMode nMode)=0 |
virtual bool | GetSystemData (BitmapSystemData &rData)=0 |
virtual bool | ScalingSupported () const =0 |
virtual bool | Scale (const double &rScaleX, const double &rScaleY, BmpScaleFlag nScaleFlag)=0 |
void | DropScaledCache () |
virtual bool | Replace (const Color &rSearchColor, const Color &rReplaceColor, sal_uInt8 nTol)=0 |
virtual bool | ConvertToGreyscale () |
virtual bool | InterpretAs8Bit () |
virtual bool | Erase (const Color &) |
virtual bool | AlphaBlendWith (const SalBitmap &) |
virtual bool | Invert () |
BitmapChecksum | GetChecksum () const |
void | InvalidateChecksum () |
virtual const basegfx::SystemDependentDataHolder * | accessSystemDependentDataHolder () const |
template<class T > | |
std::shared_ptr< T > | getSystemDependentData () const |
template<class T , class... Args> | |
std::shared_ptr< T > | addOrReplaceSystemDependentData (Args &&... args) const |
Private Member Functions | |
void | DataChanged () |
void | ResetToBuffer () |
void | ResetToSkImage (sk_sp< SkImage > image) |
void | ResetAllData () |
void | EnsureBitmapData () |
void | EnsureBitmapData () const |
void | EnsureBitmapUniqueData () |
void | CreateBitmapData () |
bool | ComputeScanlineSize () |
void | ResetPendingScaling () |
void | EraseInternal (const Color &color) |
void | PerformErase () |
bool | IsAllBlack () const |
void | ReleaseBuffer (BitmapBuffer *pBuffer, BitmapAccessMode nMode, bool dontChangeToErase) |
SkBitmap | GetAsSkBitmap () const |
bool | ConserveMemory () const |
void | verify () const |
Private Attributes | |
BitmapPalette | mPalette |
int | mBitCount = 0 |
Size | mSize |
boost::shared_ptr< sal_uInt8[]> | mBuffer |
int | mScanlineSize |
sk_sp< SkImage > | mImage |
sk_sp< SkImage > | mAlphaImage |
Size | mPixelsSize |
BmpScaleFlag | mScaleQuality = BmpScaleFlag::BestQuality |
bool | mEraseColorSet = false |
Color | mEraseColor |
int | mReadAccessCount = 0 |
int | mWriteAccessCount = 0 |
Friends | |
template<typename charT , typename traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &stream, const SkiaSalBitmap *bitmap) |
Additional Inherited Members | |
Protected Types inherited from SalBitmap | |
enum class | BitConvert { A8 , RGBA , BGRA , LAST = BGRA } |
Protected Member Functions inherited from SalBitmap | |
void | updateChecksum () const |
Static Protected Member Functions inherited from SalBitmap | |
static std::unique_ptr< sal_uInt8[] > | convertDataBitCount (const sal_uInt8 *src, int width, int height, int bitCount, int bytesPerRow, const BitmapPalette &palette, BitConvert type) |
Definition at line 32 of file skia/salbmp.hxx.
Definition at line 83 of file skia/salbmp.hxx.
SkiaSalBitmap::SkiaSalBitmap | ( | ) |
SkiaSalBitmap::SkiaSalBitmap | ( | const sk_sp< SkImage > & | image | ) |
|
overridevirtual |
|
overridevirtual |
Implements SalBitmap.
|
overridevirtual |
Reimplemented from SalBitmap.
SkAlphaType SkiaSalBitmap::alphaType | ( | ) | const |
|
private |
|
private |
|
overridevirtual |
Reimplemented from SalBitmap.
|
overridevirtual |
Implements SalBitmap.
|
overridevirtual |
Implements SalBitmap.
|
overridevirtual |
Implements SalBitmap.
|
overridevirtual |
Implements SalBitmap.
|
overridevirtual |
Implements SalBitmap.
|
private |
|
private |
|
finaloverridevirtual |
Implements SalBitmap.
void SkiaSalBitmap::dump | ( | const char * | file | ) | const |
|
private |
|
inlineprivate |
Definition at line 132 of file skia/salbmp.hxx.
References EnsureBitmapData().
Referenced by EnsureBitmapData().
|
private |
|
overridevirtual |
Reimplemented from SalBitmap.
|
private |
OString SkiaSalBitmap::GetAlphaImageKey | ( | DirectImage | direct = DirectImage::No | ) | const |
const sk_sp< SkImage > & SkiaSalBitmap::GetAlphaSkImage | ( | DirectImage | direct = DirectImage::No | ) | const |
sk_sp< SkShader > SkiaSalBitmap::GetAlphaSkShader | ( | const SkSamplingOptions & | samplingOptions, |
DirectImage | direct = DirectImage::No |
||
) | const |
|
private |
|
overridevirtual |
Implements SalBitmap.
OString SkiaSalBitmap::GetImageKey | ( | DirectImage | direct = DirectImage::No | ) | const |
const sk_sp< SkImage > & SkiaSalBitmap::GetSkImage | ( | DirectImage | direct = DirectImage::No | ) | const |
sk_sp< SkShader > SkiaSalBitmap::GetSkShader | ( | const SkSamplingOptions & | samplingOptions, |
DirectImage | direct = DirectImage::No |
||
) | const |
|
overridevirtual |
Implements SalBitmap.
|
overridevirtual |
Reimplemented from SalBitmap.
|
overridevirtual |
Reimplemented from SalBitmap.
|
private |
bool SkiaSalBitmap::IsFullyOpaqueAsAlpha | ( | ) | const |
|
inline |
Definition at line 76 of file skia/salbmp.hxx.
|
private |
bool SkiaSalBitmap::PreferSkShader | ( | ) | const |
|
overridevirtual |
Implements SalBitmap.
|
private |
|
overridevirtual |
Implements SalBitmap.
|
private |
|
private |
|
private |
|
private |
|
overridevirtual |
Implements SalBitmap.
|
overridevirtual |
Implements SalBitmap.
void SkiaSalBitmap::TryDirectConvertToAlphaNoScaling | ( | ) |
|
inline |
Definition at line 117 of file skia/salbmp.hxx.
|
inline |
Definition at line 115 of file skia/salbmp.hxx.
|
inline |
Definition at line 116 of file skia/salbmp.hxx.
|
inline |
Definition at line 112 of file skia/salbmp.hxx.
|
inline |
Definition at line 110 of file skia/salbmp.hxx.
|
inline |
Definition at line 113 of file skia/salbmp.hxx.
|
inline |
Definition at line 111 of file skia/salbmp.hxx.
|
inline |
Definition at line 114 of file skia/salbmp.hxx.
|
inline |
Definition at line 118 of file skia/salbmp.hxx.
|
private |
|
friend |
Definition at line 161 of file skia/salbmp.hxx.
|
private |
Definition at line 214 of file skia/salbmp.hxx.
|
private |
Definition at line 201 of file skia/salbmp.hxx.
|
private |
Definition at line 211 of file skia/salbmp.hxx.
|
private |
Definition at line 221 of file skia/salbmp.hxx.
|
private |
Definition at line 220 of file skia/salbmp.hxx.
|
private |
Definition at line 213 of file skia/salbmp.hxx.
|
private |
Definition at line 200 of file skia/salbmp.hxx.
|
private |
Definition at line 217 of file skia/salbmp.hxx.
|
private |
Definition at line 222 of file skia/salbmp.hxx.
|
private |
Definition at line 218 of file skia/salbmp.hxx.
|
private |
Definition at line 212 of file skia/salbmp.hxx.
|
private |
Definition at line 202 of file skia/salbmp.hxx.
|
private |
Definition at line 224 of file skia/salbmp.hxx.