gfx/ycbcr/QuellGccWarnings.patch

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 diff --git a/gfx/ycbcr/yuv_convert.cpp b/gfx/ycbcr/yuv_convert.cpp
michael@0 2 --- a/gfx/ycbcr/yuv_convert.cpp
michael@0 3 +++ b/gfx/ycbcr/yuv_convert.cpp
michael@0 4 @@ -337,16 +337,17 @@ NS_GFX_(void) ScaleYCbCrToRGB32(const ui
michael@0 5 source_dx_uv >> kFractionBits);
michael@0 6 }
michael@0 7 }
michael@0 8 else {
michael@0 9 ScaleYUVToRGB32Row_C(y_ptr, u_ptr, v_ptr,
michael@0 10 dest_pixel, width, source_dx);
michael@0 11 }
michael@0 12 #else
michael@0 13 + (void)source_dx_uv;
michael@0 14 ScaleYUVToRGB32Row(y_ptr, u_ptr, v_ptr,
michael@0 15 dest_pixel, width, source_dx);
michael@0 16 #endif
michael@0 17 }
michael@0 18 }
michael@0 19 // MMX used for FastConvertYUVToRGB32Row and FilterRows requires emms.
michael@0 20 if (has_mmx)
michael@0 21 EMMS();
michael@0 22 diff --git a/gfx/ycbcr/yuv_row.h b/gfx/ycbcr/yuv_row.h
michael@0 23 --- a/gfx/ycbcr/yuv_row.h
michael@0 24 +++ b/gfx/ycbcr/yuv_row.h
michael@0 25 @@ -129,14 +129,14 @@ extern SIMD_ALIGNED(int16 kCoefficientsR
michael@0 26 #if defined(ARCH_CPU_X86) && !defined(ARCH_CPU_X86_64)
michael@0 27 #if defined(_MSC_VER)
michael@0 28 #define EMMS() __asm emms
michael@0 29 #pragma warning(disable: 4799)
michael@0 30 #else
michael@0 31 #define EMMS() asm("emms")
michael@0 32 #endif
michael@0 33 #else
michael@0 34 -#define EMMS()
michael@0 35 +#define EMMS() ((void)0)
michael@0 36 #endif
michael@0 37
michael@0 38 } // extern "C"
michael@0 39
michael@0 40 #endif // MEDIA_BASE_YUV_ROW_H_

mercurial