diff options
| author | Lukas Venhoda <lvenhoda@redhat.com> | 2015-12-17 12:14:47 +0100 |
|---|---|---|
| committer | Pavel Grunt <pgrunt@redhat.com> | 2015-12-18 11:41:15 +0100 |
| commit | a78da942a7e9022025c70c60f9944585f29fce2e (patch) | |
| tree | 3ab7c18fda0d70c58af55a4385f13b811f547ed9 /common | |
| parent | 1118712c5989f7eeb723e830bd6b7371796b8ba6 (diff) | |
| download | spice-common-a78da942a7e9022025c70c60f9944585f29fce2e.tar.gz spice-common-a78da942a7e9022025c70c60f9944585f29fce2e.tar.xz spice-common-a78da942a7e9022025c70c60f9944585f29fce2e.zip | |
Remove trailing whitespace
Diffstat (limited to 'common')
| -rw-r--r-- | common/canvas_utils.c | 2 | ||||
| -rw-r--r-- | common/lines.c | 10 | ||||
| -rw-r--r-- | common/log.c | 4 | ||||
| -rw-r--r-- | common/sw_canvas.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/common/canvas_utils.c b/common/canvas_utils.c index 46eb012..a3e205f 100644 --- a/common/canvas_utils.c +++ b/common/canvas_utils.c @@ -307,7 +307,7 @@ pixman_image_t *alloc_lz_image_surface(LzDecodeUsrData *canvas_data, /* pixman requires strides to be 4-byte aligned */ stride = SPICE_ALIGN(stride, 4); - + if (!top_down) { stride = -stride; } diff --git a/common/lines.c b/common/lines.c index 36b40a7..10ca318 100644 --- a/common/lines.c +++ b/common/lines.c @@ -927,7 +927,7 @@ end of the line, we will find the largest number of Y steps that satisfies the inequality. In that case, since we are representing the Y steps as (dy - N), we will actually want to solve for the smallest N in that equation. - + Case 1: X major, starting X coordinate moved by M steps -2dx <= 2Mdy - 2Ndx - dx - B < 0 @@ -975,7 +975,7 @@ steps, so we want the highest N, so we use the < inequality: = floor((2Mdy + dx + B + 2dx - 1) / 2dx) - 1 = floor((2Mdy + dx + B + 2dx - 1 - 2dx) / 2dx) = floor((2Mdy + dx + B - 1) / 2dx) - + Case 3: Y major, starting X coordinate moved by M steps -2dy <= 2Ndx - 2Mdy - dy - B < 0 @@ -1021,7 +1021,7 @@ Same analysis as Case 4, but we want the smallest number of Y steps which means the largest N, so we use the <= inequality: N = floor((2Mdy + dy - B) / 2dx) - + Now let's try the Y coordinates, we have the same 4 cases. Case 5: X major, starting Y coordinate moved by N steps @@ -1066,7 +1066,7 @@ Same derivations as Case 6, but we want the smallest # of X steps which means the largest M, so use the <= inequality: M = floor((2Ndx + dx - B) / 2dy) - + Case 7: Y major, starting Y coordinate moved by N steps -2dy <= 2Ndx - 2Mdy - dy - B < 0 @@ -1111,7 +1111,7 @@ steps which means the largest M, so we use the < inequality: = floor((2Ndx + dy + B + 2dy - 1) / 2dy) - 1 = floor((2Ndx + dy + B + 2dy - 1 - 2dy) / 2dy) = floor((2Ndx + dy + B - 1) / 2dy) - + So, our equations are: 1: X major move x1 to x1+M floor((2Mdy + dx - B) / 2dx) diff --git a/common/log.c b/common/log.c index fc5c129..df394d2 100644 --- a/common/log.c +++ b/common/log.c @@ -52,7 +52,7 @@ static const char * spice_log_level_to_string(SpiceLogLevel level) }; #endif const char *str = NULL; - + if (level < SPICE_N_ELEMENTS(to_string)) { str = to_string[level]; } @@ -76,7 +76,7 @@ void spice_logv(const char *log_domain, va_list args) { const char *level = spice_log_level_to_string(log_level); - + if (debug_level == -1) { debug_level = getenv("SPICE_DEBUG_LEVEL") ? atoi(getenv("SPICE_DEBUG_LEVEL")) : SPICE_LOG_LEVEL_WARNING; } diff --git a/common/sw_canvas.c b/common/sw_canvas.c index 7d67ca5..a43cee4 100644 --- a/common/sw_canvas.c +++ b/common/sw_canvas.c @@ -95,7 +95,7 @@ static pixman_image_t *get_image(SpiceCanvas *canvas, int force_opaque) uint32_t *data; int stride; int width, height; - + /* Remove alpha bits from format */ format = (pixman_format_code_t)(((uint32_t)format) & ~(0xf << 12)); data = pixman_image_get_data (sw_canvas->image); |
