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:
@@ -108,6 +108,7 @@ PixelFormat::PixelFormat(agg::rendering_buffer& rb,
|
|||||||
const PatternHandler* handler)
|
const PatternHandler* handler)
|
||||||
: fBuffer(&rb),
|
: fBuffer(&rb),
|
||||||
fPatternHandler(handler),
|
fPatternHandler(handler),
|
||||||
|
fUsesOpCopyForText(false),
|
||||||
|
|
||||||
fBlendPixel(blend_pixel_empty),
|
fBlendPixel(blend_pixel_empty),
|
||||||
fBlendHLine(blend_hline_empty),
|
fBlendHLine(blend_hline_empty),
|
||||||
@@ -129,6 +130,7 @@ void
|
|||||||
PixelFormat::SetDrawingMode(drawing_mode mode, source_alpha alphaSrcMode,
|
PixelFormat::SetDrawingMode(drawing_mode mode, source_alpha alphaSrcMode,
|
||||||
alpha_function alphaFncMode, bool text)
|
alpha_function alphaFncMode, bool text)
|
||||||
{
|
{
|
||||||
|
fUsesOpCopyForText = false;
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
// these drawing modes discard source pixels
|
// these drawing modes discard source pixels
|
||||||
// which have the current low color
|
// which have the current low color
|
||||||
@@ -178,6 +180,10 @@ PixelFormat::SetDrawingMode(drawing_mode mode, source_alpha alphaSrcMode,
|
|||||||
fBlendSolidHSpan = blend_solid_hspan_copy_text;
|
fBlendSolidHSpan = blend_solid_hspan_copy_text;
|
||||||
fBlendSolidVSpan = blend_solid_vspan_copy_text;
|
fBlendSolidVSpan = blend_solid_vspan_copy_text;
|
||||||
fBlendColorHSpan = blend_color_hspan_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()) {
|
} else if (fPatternHandler->IsSolid()) {
|
||||||
fBlendPixel = blend_pixel_copy_solid;
|
fBlendPixel = blend_pixel_copy_solid;
|
||||||
fBlendHLine = blend_hline_copy_solid;
|
fBlendHLine = blend_hline_copy_solid;
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ class PixelFormat {
|
|||||||
alpha_function alphaFncMode,
|
alpha_function alphaFncMode,
|
||||||
bool text);
|
bool text);
|
||||||
|
|
||||||
|
inline bool UsesOpCopyForText() const
|
||||||
|
{ return fUsesOpCopyForText; }
|
||||||
|
|
||||||
// AGG "pixel format" interface
|
// AGG "pixel format" interface
|
||||||
unsigned width() const { return fBuffer->width(); }
|
unsigned width() const { return fBuffer->width(); }
|
||||||
unsigned height() const { return fBuffer->height(); }
|
unsigned height() const { return fBuffer->height(); }
|
||||||
@@ -105,6 +108,7 @@ class PixelFormat {
|
|||||||
private:
|
private:
|
||||||
agg::rendering_buffer* fBuffer;
|
agg::rendering_buffer* fBuffer;
|
||||||
const PatternHandler* fPatternHandler;
|
const PatternHandler* fPatternHandler;
|
||||||
|
bool fUsesOpCopyForText;
|
||||||
|
|
||||||
blend_pixel_f fBlendPixel;
|
blend_pixel_f fBlendPixel;
|
||||||
blend_line fBlendHLine;
|
blend_line fBlendHLine;
|
||||||
|
|||||||
Reference in New Issue
Block a user