LibreOffice Module vcl (master)  1
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SkiaSalBitmap Class Referencefinal

#include <salbmp.hxx>

Inheritance diagram for SkiaSalBitmap:
[legend]
Collaboration diagram for SkiaSalBitmap:
[legend]

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 BitmapBufferAcquireBuffer (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
 
const BitmapPalettePalette () const
 
bool PreferSkShader () const
 
const sk_sp< SkImage > & GetSkImage () const
 
sk_sp< SkShader > GetSkShader (const SkSamplingOptions &samplingOptions) const
 
const sk_sp< SkImage > & GetAlphaSkImage () const
 
sk_sp< SkShader > GetAlphaSkShader (const SkSamplingOptions &samplingOptions) const
 
OString GetImageKey () const
 
OString GetAlphaImageKey () const
 
bool IsFullyOpaqueAsAlpha () const
 
SkAlphaType alphaType () const
 
void dump (const char *file) const
 
bool unittestHasBuffer () const
 
bool unittestHasImage () const
 
bool unittestHasAlphaImage () const
 
bool unittestHasEraseColor () const
 
const sal_uInt8unittestGetBuffer () const
 
const SkImage * unittestGetImage () const
 
const SkImage * unittestGetAlphaImage () const
 
- Public Member Functions inherited from SalBitmap
 SalBitmap ()
 
virtual ~SalBitmap ()
 
void DropScaledCache ()
 
void GetChecksum (BitmapChecksum &rChecksum) const
 
void InvalidateChecksum ()
 

Private Member Functions

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 mAnyAccessCount = 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  BitConvert {
  BitConvert::A8,
  BitConvert::RGBA,
  BitConvert::BGRA,
  BitConvert::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)
 
- Protected Attributes inherited from SalBitmap
BitmapChecksum mnChecksum
 
bool mbChecksumValid
 

Detailed Description

Definition at line 31 of file skia/salbmp.hxx.

Constructor & Destructor Documentation

SkiaSalBitmap::SkiaSalBitmap ( )
SkiaSalBitmap::SkiaSalBitmap ( const sk_sp< SkImage > &  image)
virtual SkiaSalBitmap::~SkiaSalBitmap ( )
overridevirtual

Member Function Documentation

virtual BitmapBuffer* SkiaSalBitmap::AcquireBuffer ( BitmapAccessMode  nMode)
overridevirtual

Implements SalBitmap.

virtual bool SkiaSalBitmap::AlphaBlendWith ( const SalBitmap rSalBmp)
overridevirtual

Reimplemented from SalBitmap.

SkAlphaType SkiaSalBitmap::alphaType ( ) const
bool SkiaSalBitmap::ComputeScanlineSize ( )
private
bool SkiaSalBitmap::ConserveMemory ( ) const
private
virtual bool SkiaSalBitmap::ConvertToGreyscale ( )
overridevirtual

Reimplemented from SalBitmap.

virtual bool SkiaSalBitmap::Create ( const Size rSize,
vcl::PixelFormat  ePixelFormat,
const BitmapPalette rPal 
)
overridevirtual

Implements SalBitmap.

virtual bool SkiaSalBitmap::Create ( const SalBitmap rSalBmp)
overridevirtual

Implements SalBitmap.

virtual bool SkiaSalBitmap::Create ( const SalBitmap rSalBmp,
SalGraphics pGraphics 
)
overridevirtual

Implements SalBitmap.

virtual bool SkiaSalBitmap::Create ( const SalBitmap rSalBmp,
vcl::PixelFormat  eNewPixelFormat 
)
overridevirtual

Implements SalBitmap.

virtual bool SkiaSalBitmap::Create ( const css::uno::Reference< css::rendering::XBitmapCanvas > &  rBitmapCanvas,
Size rSize,
bool  bMask = false 
)
overridevirtual

Implements SalBitmap.

void SkiaSalBitmap::CreateBitmapData ( )
private
virtual void SkiaSalBitmap::Destroy ( )
finaloverridevirtual

Implements SalBitmap.

void SkiaSalBitmap::dump ( const char *  file) const
void SkiaSalBitmap::EnsureBitmapData ( )
private
void SkiaSalBitmap::EnsureBitmapData ( ) const
inlineprivate

Definition at line 112 of file skia/salbmp.hxx.

References EnsureBitmapData().

Referenced by EnsureBitmapData().

void SkiaSalBitmap::EnsureBitmapUniqueData ( )
private
virtual bool SkiaSalBitmap::Erase ( const Color color)
overridevirtual

Reimplemented from SalBitmap.

void SkiaSalBitmap::EraseInternal ( const Color color)
private
OString SkiaSalBitmap::GetAlphaImageKey ( ) const
const sk_sp<SkImage>& SkiaSalBitmap::GetAlphaSkImage ( ) const
sk_sp<SkShader> SkiaSalBitmap::GetAlphaSkShader ( const SkSamplingOptions &  samplingOptions) const
SkBitmap SkiaSalBitmap::GetAsSkBitmap ( ) const
private
virtual sal_uInt16 SkiaSalBitmap::GetBitCount ( ) const
overridevirtual

Implements SalBitmap.

OString SkiaSalBitmap::GetImageKey ( ) const
virtual Size SkiaSalBitmap::GetSize ( ) const
overridevirtual

Implements SalBitmap.

const sk_sp<SkImage>& SkiaSalBitmap::GetSkImage ( ) const
sk_sp<SkShader> SkiaSalBitmap::GetSkShader ( const SkSamplingOptions &  samplingOptions) const
virtual bool SkiaSalBitmap::GetSystemData ( BitmapSystemData rData)
overridevirtual

Implements SalBitmap.

virtual bool SkiaSalBitmap::InterpretAs8Bit ( )
overridevirtual

Reimplemented from SalBitmap.

bool SkiaSalBitmap::IsAllBlack ( ) const
private
bool SkiaSalBitmap::IsFullyOpaqueAsAlpha ( ) const
const BitmapPalette& SkiaSalBitmap::Palette ( ) const
inline

Definition at line 67 of file skia/salbmp.hxx.

void SkiaSalBitmap::PerformErase ( )
private
bool SkiaSalBitmap::PreferSkShader ( ) const
virtual void SkiaSalBitmap::ReleaseBuffer ( BitmapBuffer pBuffer,
BitmapAccessMode  nMode 
)
overridevirtual

Implements SalBitmap.

void SkiaSalBitmap::ReleaseBuffer ( BitmapBuffer pBuffer,
BitmapAccessMode  nMode,
bool  dontChangeToErase 
)
private
virtual bool SkiaSalBitmap::Replace ( const Color rSearchColor,
const Color rReplaceColor,
sal_uInt8  nTol 
)
overridevirtual

Implements SalBitmap.

void SkiaSalBitmap::ResetAllData ( )
private
void SkiaSalBitmap::ResetPendingScaling ( )
private
void SkiaSalBitmap::ResetToBuffer ( )
private
void SkiaSalBitmap::ResetToSkImage ( sk_sp< SkImage >  image)
private
virtual bool SkiaSalBitmap::Scale ( const double &  rScaleX,
const double &  rScaleY,
BmpScaleFlag  nScaleFlag 
)
overridevirtual

Implements SalBitmap.

virtual bool SkiaSalBitmap::ScalingSupported ( ) const
overridevirtual

Implements SalBitmap.

const SkImage* SkiaSalBitmap::unittestGetAlphaImage ( ) const
inline

Definition at line 101 of file skia/salbmp.hxx.

const sal_uInt8* SkiaSalBitmap::unittestGetBuffer ( ) const
inline

Definition at line 99 of file skia/salbmp.hxx.

const SkImage* SkiaSalBitmap::unittestGetImage ( ) const
inline

Definition at line 100 of file skia/salbmp.hxx.

bool SkiaSalBitmap::unittestHasAlphaImage ( ) const
inline

Definition at line 97 of file skia/salbmp.hxx.

bool SkiaSalBitmap::unittestHasBuffer ( ) const
inline

Definition at line 95 of file skia/salbmp.hxx.

bool SkiaSalBitmap::unittestHasEraseColor ( ) const
inline

Definition at line 98 of file skia/salbmp.hxx.

bool SkiaSalBitmap::unittestHasImage ( ) const
inline

Definition at line 96 of file skia/salbmp.hxx.

void SkiaSalBitmap::verify ( ) const
private

Friends And Related Function Documentation

template<typename charT , typename traits >
std::basic_ostream<charT, traits>& operator<< ( std::basic_ostream< charT, traits > &  stream,
const SkiaSalBitmap bitmap 
)
friend

Definition at line 142 of file skia/salbmp.hxx.

Member Data Documentation

sk_sp<SkImage> SkiaSalBitmap::mAlphaImage
private

Definition at line 178 of file skia/salbmp.hxx.

int SkiaSalBitmap::mAnyAccessCount = 0
private

Definition at line 186 of file skia/salbmp.hxx.

int SkiaSalBitmap::mBitCount = 0
private

Definition at line 165 of file skia/salbmp.hxx.

boost::shared_ptr<sal_uInt8[]> SkiaSalBitmap::mBuffer
private

Definition at line 175 of file skia/salbmp.hxx.

Color SkiaSalBitmap::mEraseColor
private

Definition at line 185 of file skia/salbmp.hxx.

bool SkiaSalBitmap::mEraseColorSet = false
private

Definition at line 184 of file skia/salbmp.hxx.

sk_sp<SkImage> SkiaSalBitmap::mImage
private

Definition at line 177 of file skia/salbmp.hxx.

BitmapPalette SkiaSalBitmap::mPalette
private

Definition at line 164 of file skia/salbmp.hxx.

Size SkiaSalBitmap::mPixelsSize
private

Definition at line 181 of file skia/salbmp.hxx.

BmpScaleFlag SkiaSalBitmap::mScaleQuality = BmpScaleFlag::BestQuality
private

Definition at line 182 of file skia/salbmp.hxx.

int SkiaSalBitmap::mScanlineSize
private

Definition at line 176 of file skia/salbmp.hxx.

Size SkiaSalBitmap::mSize
private

Definition at line 166 of file skia/salbmp.hxx.

int SkiaSalBitmap::mWriteAccessCount = 0
private

Definition at line 188 of file skia/salbmp.hxx.


The documentation for this class was generated from the following file: