added tracking the usage of the special B_OP_COPY version for text
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17326 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
85fc6ab403
commit
7e07723e68
@ -108,6 +108,7 @@ PixelFormat::PixelFormat(agg::rendering_buffer& rb,
|
||||
const PatternHandler* handler)
|
||||
: fBuffer(&rb),
|
||||
fPatternHandler(handler),
|
||||
fUsesOpCopyForText(false),
|
||||
|
||||
fBlendPixel(blend_pixel_empty),
|
||||
fBlendHLine(blend_hline_empty),
|
||||
@ -129,6 +130,7 @@ void
|
||||
PixelFormat::SetDrawingMode(drawing_mode mode, source_alpha alphaSrcMode,
|
||||
alpha_function alphaFncMode, bool text)
|
||||
{
|
||||
fUsesOpCopyForText = false;
|
||||
switch (mode) {
|
||||
// these drawing modes discard source pixels
|
||||
// which have the current low color
|
||||
@ -178,6 +180,10 @@ PixelFormat::SetDrawingMode(drawing_mode mode, source_alpha alphaSrcMode,
|
||||
fBlendSolidHSpan = blend_solid_hspan_copy_text;
|
||||
fBlendSolidVSpan = blend_solid_vspan_copy_text;
|
||||
fBlendColorHSpan = blend_color_hspan_copy_text;
|
||||
// set the special flag so that Painter
|
||||
// knows if an update is needed even though
|
||||
// "nothing changed"
|
||||
fUsesOpCopyForText = true;
|
||||
} else if (fPatternHandler->IsSolid()) {
|
||||
fBlendPixel = blend_pixel_copy_solid;
|
||||
fBlendHLine = blend_hline_copy_solid;
|
||||
|
@ -61,6 +61,9 @@ class PixelFormat {
|
||||
alpha_function alphaFncMode,
|
||||
bool text);
|
||||
|
||||
inline bool UsesOpCopyForText() const
|
||||
{ return fUsesOpCopyForText; }
|
||||
|
||||
// AGG "pixel format" interface
|
||||
unsigned width() const { return fBuffer->width(); }
|
||||
unsigned height() const { return fBuffer->height(); }
|
||||
@ -105,6 +108,7 @@ class PixelFormat {
|
||||
private:
|
||||
agg::rendering_buffer* fBuffer;
|
||||
const PatternHandler* fPatternHandler;
|
||||
bool fUsesOpCopyForText;
|
||||
|
||||
blend_pixel_f fBlendPixel;
|
||||
blend_line fBlendHLine;
|
||||
|
Loading…
Reference in New Issue
Block a user