Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
ed2f0490
Kaydet (Commit)
ed2f0490
authored
Nis 10, 2014
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid a couple of pointless constant variables
Change-Id: If1dcb577d2dcc6477f43ad1be0e970e08d9093c6
üst
590d851f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
salgdicommon.cxx
vcl/quartz/salgdicommon.cxx
+2
-4
salvd.cxx
vcl/quartz/salvd.cxx
+3
-9
No files found.
vcl/quartz/salgdicommon.cxx
Dosyayı görüntüle @
ed2f0490
...
...
@@ -1458,8 +1458,6 @@ SalColor AquaSalGraphics::getPixel( long nX, long nY )
return
COL_BLACK
;
}
// prepare creation of matching a CGBitmapContext
CGColorSpaceRef
aCGColorSpace
=
GetSalData
()
->
mxRGBSpace
;
CGBitmapInfo
aCGBmpInfo
=
kCGImageAlphaNoneSkipFirst
|
kCGBitmapByteOrder32Big
;
#if defined OSL_BIGENDIAN
struct
{
unsigned
char
b
,
g
,
r
,
a
;
}
aPixel
;
#else
...
...
@@ -1469,8 +1467,8 @@ SalColor AquaSalGraphics::getPixel( long nX, long nY )
// create a one-pixel bitmap context
// TODO: is it worth to cache it?
CGContextRef
xOnePixelContext
=
CGBitmapContextCreate
(
&
aPixel
,
1
,
1
,
8
,
sizeof
(
aPixel
)
,
aCGColorSpace
,
aCGBmpInfo
);
CGBitmapContextCreate
(
&
aPixel
,
1
,
1
,
8
,
32
,
GetSalData
()
->
mxRGBSpace
,
kCGImageAlphaNoneSkipFirst
|
kCGBitmapByteOrder32Big
);
CG_TRACE
(
"CGBitmapContextCreate(1x1x8) = "
<<
xOnePixelContext
);
...
...
vcl/quartz/salvd.cxx
Dosyayı görüntüle @
ed2f0490
...
...
@@ -184,8 +184,6 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
if
(
mnBitmapDepth
&&
(
mnBitmapDepth
<
16
)
)
{
mnBitmapDepth
=
8
;
// TODO: are 1bit vdevs worth it?
const
CGColorSpaceRef
aCGColorSpace
=
GetSalData
()
->
mxGraySpace
;
const
CGBitmapInfo
aCGBmpInfo
=
kCGImageAlphaNone
;
const
int
nBytesPerRow
=
(
mnBitmapDepth
*
nDX
+
7
)
/
8
;
void
*
pRawData
=
rtl_allocateMemory
(
nBytesPerRow
*
nDY
);
...
...
@@ -194,7 +192,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
((
sal_uInt8
*
)
pRawData
)[
i
]
=
(
i
&
0xFF
);
#endif
mxBitmapContext
=
CGBitmapContextCreate
(
pRawData
,
nDX
,
nDY
,
mnBitmapDepth
,
nBytesPerRow
,
aCGColorSpace
,
aCGBmpInfo
);
mnBitmapDepth
,
nBytesPerRow
,
GetSalData
()
->
mxGraySpace
,
kCGImageAlphaNone
);
CG_TRACE
(
"CGBitmapContextCreate("
<<
nDX
<<
"x"
<<
nDY
<<
"x"
<<
mnBitmapDepth
<<
") = "
<<
mxBitmapContext
);
xCGContext
=
mxBitmapContext
;
}
...
...
@@ -233,8 +231,6 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
{
// fall back to a bitmap context
mnBitmapDepth
=
32
;
const
CGColorSpaceRef
aCGColorSpace
=
GetSalData
()
->
mxRGBSpace
;
const
CGBitmapInfo
aCGBmpInfo
=
kCGImageAlphaNoneSkipFirst
;
const
int
nBytesPerRow
=
(
mnBitmapDepth
*
nDX
)
/
8
;
void
*
pRawData
=
rtl_allocateMemory
(
nBytesPerRow
*
nDY
);
...
...
@@ -243,15 +239,13 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
((
sal_uInt8
*
)
pRawData
)[
i
]
=
(
i
&
0xFF
);
#endif
mxBitmapContext
=
CGBitmapContextCreate
(
pRawData
,
nDX
,
nDY
,
8
,
nBytesPerRow
,
aCGColorSpace
,
aCGBmpInfo
);
8
,
nBytesPerRow
,
GetSalData
()
->
mxRGBSpace
,
kCGImageAlphaNoneSkipFirst
);
CG_TRACE
(
"CGBitmapContextCreate("
<<
nDX
<<
"x"
<<
nDY
<<
"x32) = "
<<
mxBitmapContext
);
xCGContext
=
mxBitmapContext
;
}
}
#else
mnBitmapDepth
=
32
;
const
CGColorSpaceRef
aCGColorSpace
=
GetSalData
()
->
mxRGBSpace
;
const
CGBitmapInfo
aCGBmpInfo
=
kCGImageAlphaNoneSkipFirst
;
const
int
nBytesPerRow
=
(
mnBitmapDepth
*
nDX
)
/
8
;
void
*
pRawData
=
rtl_allocateMemory
(
nBytesPerRow
*
nDY
);
...
...
@@ -260,7 +254,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
((
sal_uInt8
*
)
pRawData
)[
i
]
=
(
i
&
0xFF
);
#endif
mxBitmapContext
=
CGBitmapContextCreate
(
pRawData
,
nDX
,
nDY
,
8
,
nBytesPerRow
,
aCGColorSpace
,
aCGBmpInfo
);
8
,
nBytesPerRow
,
GetSalData
()
->
mxRGBSpace
,
kCGImageAlphaNoneSkipFirst
);
CG_TRACE
(
"CGBitmapContextCreate("
<<
nDX
<<
"x"
<<
nDY
<<
"x32) = "
<<
mxBitmapContext
);
xCGContext
=
mxBitmapContext
;
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment