summaryrefslogtreecommitdiffstats
path: root/common/rfb/PixelBuffer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/PixelBuffer.cxx')
-rw-r--r--common/rfb/PixelBuffer.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/common/rfb/PixelBuffer.cxx b/common/rfb/PixelBuffer.cxx
index b03af1af..89addabc 100644
--- a/common/rfb/PixelBuffer.cxx
+++ b/common/rfb/PixelBuffer.cxx
@@ -96,7 +96,7 @@ ModifiablePixelBuffer::~ModifiablePixelBuffer()
{
}
-void ModifiablePixelBuffer::fillRect(const Rect& r, Pixel pix)
+void ModifiablePixelBuffer::fillRect(const Rect& r, const void* pix)
{
int stride;
U8 *buf;
@@ -113,20 +113,18 @@ void ModifiablePixelBuffer::fillRect(const Rect& r, Pixel pix)
if (b == 1) {
while (h--) {
- memset(buf, pix, w);
+ memset(buf, *(const U8*)pix, w);
buf += stride * b;
}
} else {
- U8 pixbuf[4], *start;
+ U8 *start;
int w1;
start = buf;
- format.bufferFromPixel(pixbuf, pix);
-
w1 = w;
while (w1--) {
- memcpy(buf, pixbuf, b);
+ memcpy(buf, pix, b);
buf += b;
}
buf += (stride - w) * b;
@@ -309,9 +307,11 @@ void ModifiablePixelBuffer::copyRect(const Rect &rect,
}
void ModifiablePixelBuffer::fillRect(const PixelFormat& pf, const Rect &dest,
- Pixel pix)
+ const void* pix)
{
- fillRect(dest, format.pixelFromPixel(pf, pix));
+ rdr::U8 buf[4];
+ format.bufferFromBuffer(buf, pf, (const rdr::U8*)pix, 1);
+ fillRect(dest, buf);
}
void ModifiablePixelBuffer::imageRect(const PixelFormat& pf, const Rect &dest,
eral.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
class AddQueriesColumnNames < ActiveRecord::Migration[4.2]
  def self.up
    add_column :queries, :column_names, :text
  end

  def self.down
    remove_column :queries, :column_names
  end
end