Commit 95949ef8 authored by twanvl's avatar twanvl

played with profiling

parent 488aa15d
......@@ -18,12 +18,13 @@ const int text_scaling = 4;
// Fills an image with the specified color
void fill_image(Image& image, const Color& color) {
Byte* pos = image.GetData();
Byte* end = image.GetData() + image.GetWidth() * image.GetHeight() * 3;
Byte* end = pos + image.GetWidth() * image.GetHeight() * 3;
Byte r = color.Red(), g = color.Green(), b = color.Blue();
// fill the image
while (pos != end) {
pos[0] = color.Red();
pos[1] = color.Green();
pos[2] = color.Blue();
pos += 3;
*pos++ = r;
*pos++ = g;
*pos++ = b;
}
}
......@@ -58,6 +59,27 @@ void downsample_to_alpha(Image& img_in, Image& img_out) {
out[x + line_size * y] = total / text_scaling;
}
}
/*
img_out.InitAlpha();
Byte* in = img_in.GetData();
Byte* out = img_out.GetAlpha();
int w = img_out.GetWidth(), h = img_out.GetHeight();
int line_size = 3 * w * text_scaling;
for (int y = 0 ; y < h ; ++y) {
for (int x = 0 ; x < w ; ++x) {
int total = 0;
for (int i = 0 ; i < text_scaling ; ++i) {
for (int j = 0 ; j < text_scaling ; ++j) {
total += in[3*j];
}
in += line_size;
}
*out++ = total / (text_scaling * text_scaling);
in += 3 * text_scaling - line_size * text_scaling;
}
in += line_size * (text_scaling - 1);
}*/
}
// Draw text by first drawing it using a larger font and then downsampling it
......
......@@ -9,6 +9,7 @@
#include <gui/update_checker.hpp>
#include <data/settings.hpp>
#include <util/version.hpp>
#include <script/value.hpp> // for some strange reason the profile build needs this :(
#include <wx/dialup.h>
#include <wx/url.h>
#include <wx/html/htmlwin.h>
......
......@@ -10,6 +10,7 @@ Global
Release = Release
Release Profile Unicode = Release Profile Unicode
Release Unicode = Release Unicode
Release Unicode fast build = Release Unicode fast build
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Debug.ActiveCfg = Debug|Win32
......@@ -18,9 +19,11 @@ Global
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Debug Unicode.Build.0 = Debug Unicode|Win32
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Release.ActiveCfg = Release|Win32
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Release.Build.0 = Release|Win32
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Release Profile Unicode.ActiveCfg = Release Unicode|Win32
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Release Profile Unicode.Build.0 = Release Unicode|Win32
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Release Profile Unicode.ActiveCfg = Release Profile Unicode|Win32
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Release Profile Unicode.Build.0 = Release Profile Unicode|Win32
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Release Unicode.ActiveCfg = Release Unicode|Win32
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Release Unicode fast build.ActiveCfg = Release Unicode fast build|Win32
{A78D6E04-7637-4C7A-AC63-DAAC3C4DB81B}.Release Unicode fast build.Build.0 = Release Unicode fast build|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
......
This diff is collapsed.
......@@ -10,6 +10,7 @@
#include <render/symbol/viewer.hpp>
#include <gfx/gfx.hpp>
#include <util/error.hpp>
#include <script/value.hpp> // for some strange reason the profile build needs this :(
// ----------------------------------------------------------------------------- : Symbol filtering
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment