зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1055265 - Correct the SkColorType used for 32-bit in SkANP r=snorp
This commit is contained in:
Родитель
d349beb9d9
Коммит
1772aea8cc
|
@ -146,11 +146,6 @@ for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
|
|||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'):
|
||||
DEFINES['MOZ_ENABLE_FREETYPE'] = True
|
||||
|
||||
DEFINES['SK_A32_SHIFT'] = 24
|
||||
DEFINES['SK_R32_SHIFT'] = 16
|
||||
DEFINES['SK_G32_SHIFT'] = 8
|
||||
DEFINES['SK_B32_SHIFT'] = 0
|
||||
|
||||
if CONFIG['MOZ_DEBUG']:
|
||||
DEFINES['GFX_LOG_DEBUG'] = True
|
||||
DEFINES['GFX_LOG_WARNING'] = True
|
||||
|
|
|
@ -76,11 +76,6 @@ LOCAL_INCLUDES += [
|
|||
'trunk/src/utils/win',
|
||||
]
|
||||
|
||||
DEFINES['SK_A32_SHIFT'] = 24
|
||||
DEFINES['SK_R32_SHIFT'] = 16
|
||||
DEFINES['SK_G32_SHIFT'] = 8
|
||||
DEFINES['SK_B32_SHIFT'] = 0
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'qt', 'gonk', 'cocoa'):
|
||||
DEFINES['SK_USE_POSIX_THREADS'] = 1
|
||||
|
||||
|
|
|
@ -908,11 +908,6 @@ LOCAL_INCLUDES += [
|
|||
'trunk/src/utils/win',
|
||||
]
|
||||
|
||||
DEFINES['SK_A32_SHIFT'] = 24
|
||||
DEFINES['SK_R32_SHIFT'] = 16
|
||||
DEFINES['SK_G32_SHIFT'] = 8
|
||||
DEFINES['SK_B32_SHIFT'] = 0
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'qt', 'gonk', 'cocoa'):
|
||||
DEFINES['SK_USE_POSIX_THREADS'] = 1
|
||||
|
||||
|
|
|
@ -151,16 +151,6 @@
|
|||
*/
|
||||
//#undef SK_USER_TRACE_INCLUDE_FILE
|
||||
|
||||
/* Change the ordering to work in X windows.
|
||||
*/
|
||||
#ifdef SK_SAMPLES_FOR_X
|
||||
#define SK_R32_SHIFT 16
|
||||
#define SK_G32_SHIFT 8
|
||||
#define SK_B32_SHIFT 0
|
||||
#define SK_A32_SHIFT 24
|
||||
#endif
|
||||
|
||||
|
||||
/* Determines whether to build code that supports the GPU backend. Some classes
|
||||
that are not GPU-specific, such as SkShader subclasses, have optional code
|
||||
that is used allows them to interact with the GPU backend. If you'd like to
|
||||
|
@ -202,6 +192,12 @@
|
|||
# define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_x86.h"
|
||||
#endif
|
||||
|
||||
// On all platforms we have this byte order
|
||||
#define SK_A32_SHIFT 24
|
||||
#define SK_R32_SHIFT 16
|
||||
#define SK_G32_SHIFT 8
|
||||
#define SK_B32_SHIFT 0
|
||||
|
||||
#define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0
|
||||
|
||||
#define SK_SUPPORT_LEGACY_GETDEVICE
|
||||
|
|
|
@ -60,7 +60,9 @@ SkBitmap* SkANP::SetBitmap(SkBitmap* dst, const ANPBitmap& src) {
|
|||
|
||||
switch (src.format) {
|
||||
case kRGBA_8888_ANPBitmapFormat:
|
||||
colorType = kRGBA_8888_SkColorType;
|
||||
// Let Skia choose the correct colour type for us based on its
|
||||
// endianness. This should be correct.
|
||||
colorType = kN32_SkColorType;
|
||||
break;
|
||||
case kRGB_565_ANPBitmapFormat:
|
||||
colorType = kRGB_565_SkColorType;
|
||||
|
|
Загрузка…
Ссылка в новой задаче