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
54687db0
Kaydet (Commit)
54687db0
authored
Nis 04, 2014
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add CG_TRACEs to this (OS X -only) file, too, for completeness
Change-Id: Ib97ca36821b00b40bdda68da6ca0b4b7f789386c
üst
89a8511b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
salgdiutils.cxx
vcl/quartz/salgdiutils.cxx
+22
-0
No files found.
vcl/quartz/salgdiutils.cxx
Dosyayı görüntüle @
54687db0
...
...
@@ -29,6 +29,7 @@
#include "vcl/svapp.hxx"
#include "quartz/salgdi.h"
#include "quartz/utils.h"
#include "osx/salframe.h"
#include "osx/saldata.hxx"
...
...
@@ -77,11 +78,13 @@ void AquaSalGraphics::UnsetState()
{
if
(
mrContext
)
{
CG_TRACE
(
"CGContextRestoreGState("
<<
mrContext
<<
")"
);
CGContextRestoreGState
(
mrContext
);
mrContext
=
0
;
}
if
(
mxClipPath
)
{
CG_TRACE
(
"CGPathRelease("
<<
mxClipPath
<<
")"
);
CGPathRelease
(
mxClipPath
);
mxClipPath
=
NULL
;
}
...
...
@@ -115,19 +118,27 @@ bool AquaSalGraphics::CheckContext()
NSGraphicsContext
*
pNSGContext
=
[
NSGraphicsContext
graphicsContextWithWindow
:
mpFrame
->
getNSWindow
()];
CGContextRef
xCGContext
=
reinterpret_cast
<
CGContextRef
>
([
pNSGContext
graphicsPort
]);
mxLayer
=
CGLayerCreateWithContext
(
xCGContext
,
aLayerSize
,
NULL
);
CG_TRACE
(
"CGLayerCreateWithContext("
<<
xCGContext
<<
","
<<
aLayerSize
<<
",NULL) = "
<<
mxLayer
);
if
(
mxLayer
)
{
mrContext
=
CGLayerGetContext
(
mxLayer
);
CG_TRACE
(
"CGLayerGetContext("
<<
mxLayer
<<
") = "
<<
mrContext
);
}
if
(
mrContext
)
{
// copy original layer to resized layer
if
(
rReleaseLayer
)
{
CG_TRACE
(
"CGContextDrawLayerAtPoint("
<<
mrContext
<<
","
<<
CGPointZero
<<
","
<<
rReleaseLayer
<<
")"
);
CGContextDrawLayerAtPoint
(
mrContext
,
CGPointZero
,
rReleaseLayer
);
}
CGContextTranslateCTM
(
mrContext
,
0
,
nHeight
);
CGContextScaleCTM
(
mrContext
,
1.0
,
-
1.0
);
CGContextSetFillColorSpace
(
mrContext
,
GetSalData
()
->
mxRGBSpace
);
CGContextSetStrokeColorSpace
(
mrContext
,
GetSalData
()
->
mxRGBSpace
);
CG_TRACE
(
"CGContextSaveGState("
<<
mrContext
<<
") "
<<
++
mnContextStackDepth
);
CGContextSaveGState
(
mrContext
);
SetState
();
...
...
@@ -138,10 +149,16 @@ bool AquaSalGraphics::CheckContext()
}
if
(
rReleaseLayer
)
{
CG_TRACE
(
"CGLayerRelease("
<<
rReleaseLayer
<<
")"
);
CGLayerRelease
(
rReleaseLayer
);
}
else
if
(
rReleaseContext
)
{
CG_TRACE
(
"CGContextRelease("
<<
rReleaseContext
<<
")"
);
CGContextRelease
(
rReleaseContext
);
}
}
DBG_ASSERT
(
mrContext
||
mbPrinter
,
"<<<WARNING>>> AquaSalGraphics::CheckContext() FAILED!!!!
\n
"
);
return
(
mrContext
!=
NULL
);
...
...
@@ -181,17 +198,22 @@ void AquaSalGraphics::UpdateWindow( NSRect& )
if
(
(
mxLayer
!=
NULL
)
&&
(
pContext
!=
NULL
)
)
{
CGContextRef
rCGContext
=
reinterpret_cast
<
CGContextRef
>
([
pContext
graphicsPort
]);
CG_TRACE
(
"[[NSGraphicsContext currentContext] graphicsPort] = "
<<
rCGContext
);
CGMutablePathRef
rClip
=
mpFrame
->
getClipPath
();
if
(
rClip
)
{
CGContextSaveGState
(
rCGContext
);
CG_TRACE
(
"CGContextBeginPath("
<<
rCGContext
<<
")"
);
CGContextBeginPath
(
rCGContext
);
CG_TRACE
(
"CGContextAddPath("
<<
rCGContext
<<
","
<<
rClip
<<
")"
);
CGContextAddPath
(
rCGContext
,
rClip
);
CG_TRACE
(
"CGContextClip("
<<
rCGContext
<<
")"
);
CGContextClip
(
rCGContext
);
}
ApplyXorContext
();
CG_TRACE
(
"CGContextDrawLayerAtPoint("
<<
rCGContext
<<
","
<<
CGPointZero
<<
","
<<
mxLayer
<<
")"
);
CGContextDrawLayerAtPoint
(
rCGContext
,
CGPointZero
,
mxLayer
);
if
(
rClip
)
// cleanup clipping
CGContextRestoreGState
(
rCGContext
);
...
...
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