equal
deleted
inserted
replaced
|
1 # HG changeset patch |
|
2 # User M. Sirringhaus <msirringhaus@suse.de> |
|
3 # Date 1645518286 -3600 |
|
4 # Tue Feb 22 09:24:46 2022 +0100 |
|
5 # Node ID 81832d035e101471dcf52dd91de287268add7a91 |
|
6 # Parent 66f7ce16eb4965108687280e5443edd610631efb |
|
7 imported patch svg-rendering.patch |
|
8 |
|
9 diff --git a/image/imgFrame.cpp b/image/imgFrame.cpp |
|
10 --- a/image/imgFrame.cpp |
|
11 +++ b/image/imgFrame.cpp |
|
12 @@ -372,6 +372,17 @@ nsresult imgFrame::InitWithDrawable(gfxD |
|
13 return NS_ERROR_OUT_OF_MEMORY; |
|
14 } |
|
15 |
|
16 +#if MOZ_BIG_ENDIAN() |
|
17 + if (aBackend == gfx::BackendType::SKIA && canUseDataSurface) { |
|
18 + // SKIA is lying about what format it returns on big endian |
|
19 + for (int ii=0; ii < mRawSurface->GetSize().Height()*mRawSurface->Stride() / 4; ++ii) { |
|
20 + uint32_t *vals = (uint32_t*)(mRawSurface->GetData()); |
|
21 + uint32_t val = ((vals[ii] << 8) & 0xFF00FF00 ) | ((vals[ii] >> 8) & 0xFF00FF ); |
|
22 + vals[ii] = (val << 16) | (val >> 16); |
|
23 + } |
|
24 + } |
|
25 +#endif |
|
26 + |
|
27 if (!canUseDataSurface) { |
|
28 // We used an offscreen surface, which is an "optimized" surface from |
|
29 // imgFrame's perspective. |