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
f040c43a
Kaydet (Commit)
f040c43a
authored
Mar 02, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tweak to return a cairo_context instead of a cairo_surface
Change-Id: Ifd5c9b1c2cc1561d9ca5dfd70ab7c3c74a1af216
üst
95493cd4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
15 deletions
+22
-15
cairotextrender.hxx
vcl/inc/cairotextrender.hxx
+1
-1
cairotextrender.cxx
vcl/unx/generic/gdi/cairotextrender.cxx
+6
-8
openglx11cairotextrender.cxx
vcl/unx/generic/gdi/openglx11cairotextrender.cxx
+6
-2
openglx11cairotextrender.hxx
vcl/unx/generic/gdi/openglx11cairotextrender.hxx
+1
-1
x11cairotextrender.cxx
vcl/unx/generic/gdi/x11cairotextrender.cxx
+7
-2
x11cairotextrender.hxx
vcl/unx/generic/gdi/x11cairotextrender.hxx
+1
-1
No files found.
vcl/inc/cairotextrender.hxx
Dosyayı görüntüle @
f040c43a
...
...
@@ -79,7 +79,7 @@ class CairoTextRender : public TextRenderImpl
protected
:
virtual
GlyphCache
&
getPlatformGlyphCache
()
=
0
;
virtual
cairo_
surface_t
*
getCairoSurface
()
=
0
;
virtual
cairo_
t
*
getCairoContext
()
=
0
;
virtual
void
getSurfaceOffset
(
double
&
nDX
,
double
&
nDY
)
=
0
;
virtual
void
drawSurface
(
cairo_t
*
cr
)
=
0
;
...
...
vcl/unx/generic/gdi/cairotextrender.cxx
Dosyayı görüntüle @
f040c43a
...
...
@@ -199,20 +199,18 @@ void CairoTextRender::DrawServerFontLayout( const ServerFontLayout& rLayout )
if
(
cairo_glyphs
.
empty
())
return
;
cairo_surface_t
*
surface
=
getCairoSurface
();
DBG_ASSERT
(
surface
!=
NULL
,
"no cairo surface for text"
);
if
(
!
surface
)
return
;
/*
* It might be ideal to cache surface and cairo context between calls and
* only destroy it when the drawable changes, but to do that we need to at
* least change the SalFrame etc impls to dtor the SalGraphics *before* the
* destruction of the windows they reference
*/
cairo_t
*
cr
=
cairo_create
(
surface
);
cairo_surface_destroy
(
surface
);
cairo_t
*
cr
=
getCairoContext
();
if
(
!
cr
)
{
SAL_WARN
(
"vcl"
,
"no cairo context for text"
);
return
;
}
if
(
const
void
*
pOptions
=
Application
::
GetSettings
().
GetStyleSettings
().
GetCairoFontOptions
())
cairo_set_font_options
(
cr
,
static_cast
<
const
cairo_font_options_t
*>
(
pOptions
));
...
...
vcl/unx/generic/gdi/openglx11cairotextrender.cxx
Dosyayı görüntüle @
f040c43a
...
...
@@ -20,7 +20,7 @@ OpenGLX11CairoTextRender::OpenGLX11CairoTextRender(X11SalGraphics& rParent)
{
}
cairo_
surface_t
*
OpenGLX11CairoTextRender
::
getCairoSurface
()
cairo_
t
*
OpenGLX11CairoTextRender
::
getCairoContext
()
{
// static size_t id = 0;
// OString aFileName = OString("/tmp/libo_logs/text_rendering") + OString::number(id++) + OString(".svg");
...
...
@@ -37,7 +37,11 @@ cairo_surface_t* OpenGLX11CairoTextRender::getCairoSurface()
}
surface
=
cairo_image_surface_create
(
CAIRO_FORMAT_ARGB32
,
aClipRect
.
GetWidth
(),
aClipRect
.
GetHeight
()
);
}
return
surface
;
if
(
!
surface
)
return
NULL
;
cairo_t
*
cr
=
cairo_create
(
surface
);
cairo_surface_destroy
(
surface
);
return
cr
;
}
void
OpenGLX11CairoTextRender
::
getSurfaceOffset
(
double
&
nDX
,
double
&
nDY
)
...
...
vcl/unx/generic/gdi/openglx11cairotextrender.hxx
Dosyayı görüntüle @
f040c43a
...
...
@@ -17,7 +17,7 @@ class OpenGLX11CairoTextRender : public X11CairoTextRender
public
:
OpenGLX11CairoTextRender
(
X11SalGraphics
&
rParent
);
virtual
cairo_
surface_t
*
getCairoSurface
()
SAL_OVERRIDE
;
virtual
cairo_
t
*
getCairoContext
()
SAL_OVERRIDE
;
virtual
void
getSurfaceOffset
(
double
&
nDX
,
double
&
nDY
)
SAL_OVERRIDE
;
virtual
void
drawSurface
(
cairo_t
*
cr
)
SAL_OVERRIDE
;
};
...
...
vcl/unx/generic/gdi/x11cairotextrender.cxx
Dosyayı görüntüle @
f040c43a
...
...
@@ -52,7 +52,7 @@ GlyphCache& X11CairoTextRender::getPlatformGlyphCache()
return
X11GlyphCache
::
GetInstance
();
}
cairo_
surface_t
*
X11CairoTextRender
::
getCairoSurface
()
cairo_
t
*
X11CairoTextRender
::
getCairoContext
()
{
// find a XRenderPictFormat compatible with the Drawable
XRenderPictFormat
*
pVisualFormat
=
mrParent
.
GetXRenderFormat
();
...
...
@@ -73,7 +73,12 @@ cairo_surface_t* X11CairoTextRender::getCairoSurface()
mrParent
.
GetVisual
().
visual
,
SAL_MAX_INT16
,
SAL_MAX_INT16
);
}
return
surface
;
if
(
!
surface
)
return
NULL
;
cairo_t
*
cr
=
cairo_create
(
surface
);
cairo_surface_destroy
(
surface
);
return
cr
;
}
void
X11CairoTextRender
::
getSurfaceOffset
(
double
&
nDX
,
double
&
nDY
)
...
...
vcl/unx/generic/gdi/x11cairotextrender.hxx
Dosyayı görüntüle @
f040c43a
...
...
@@ -40,7 +40,7 @@ public:
X11CairoTextRender
(
X11SalGraphics
&
rParent
);
virtual
GlyphCache
&
getPlatformGlyphCache
()
SAL_OVERRIDE
;
virtual
cairo_
surface_t
*
getCairoSurface
()
SAL_OVERRIDE
;
virtual
cairo_
t
*
getCairoContext
()
SAL_OVERRIDE
;
virtual
void
getSurfaceOffset
(
double
&
nDX
,
double
&
nDY
)
SAL_OVERRIDE
;
virtual
void
clipRegion
(
cairo_t
*
cr
)
SAL_OVERRIDE
;
virtual
void
drawSurface
(
cairo_t
*
cr
)
SAL_OVERRIDE
;
...
...
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