openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::PolyLineScaler< Pixel > Class Template Referenceabstract

Polymorphic line scaler. More...

#include <LineScalers.hh>

Inheritance diagram for openmsx::PolyLineScaler< Pixel >:
Inheritance graph
[legend]

Public Member Functions

virtual void operator() (const Pixel *in, Pixel *out, size_t outWidth)=0
 Actually scale a line. More...
 
virtual bool isCopy () const =0
 Is this scale operation actually a copy? This info can be used to (in a multi-step scale operation) immediately produce the output of the previous step in this step's output buffer, so effectively skipping this step. More...
 

Protected Member Functions

 ~PolyLineScaler ()
 

Detailed Description

template<typename Pixel>
class openmsx::PolyLineScaler< Pixel >

Polymorphic line scaler.

Abstract base class for line scalers. Can be used when one basic algorithm should work in combination with multiple line scalers (e.g. several Scale_XonY variants). A line scaler takes one line of input pixels and outputs a different line of pixels. The input and output don't necessarily have the same number of pixels. An alternative (which we used in the past) is to templatize that algorithm on the LineScaler type. In theory this results in a faster routine, but in practice this performance benefit is often not measurable while it does result in bigger code size.

Definition at line 282 of file LineScalers.hh.

Constructor & Destructor Documentation

◆ ~PolyLineScaler()

template<typename Pixel>
openmsx::PolyLineScaler< Pixel >::~PolyLineScaler ( )
inlineprotected

Definition at line 303 of file LineScalers.hh.

Member Function Documentation

◆ isCopy()

template<typename Pixel>
virtual bool openmsx::PolyLineScaler< Pixel >::isCopy ( ) const
pure virtual

Is this scale operation actually a copy? This info can be used to (in a multi-step scale operation) immediately produce the output of the previous step in this step's output buffer, so effectively skipping this step.

Implemented in openmsx::PolyScaleRef< Pixel, Scaler >, and openmsx::PolyScale< Pixel, Scaler >.

Referenced by openmsx::calcEdgesGL(), and openmsx::RGBTriplet3xScaler< Pixel >::RGBTriplet3xScaler().

◆ operator()()

template<typename Pixel>
virtual void openmsx::PolyLineScaler< Pixel >::operator() ( const Pixel in,
Pixel out,
size_t  outWidth 
)
pure virtual

Actually scale a line.

Parameters
inPointer to buffer containing input line.
outPointer to buffer that should be filled with output.
outWidthThe number of pixels that should be output. Note: The number of input pixels is not explicitly specified. This depends on the actual scaler, for example Scale_2on1 requires twice as many pixels in the input than the output.

Implemented in openmsx::PolyScaleRef< Pixel, Scaler >, and openmsx::PolyScale< Pixel, Scaler >.


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